Paymill API:如何更新订阅的信用卡? [英] Paymill API: How do I update a subscription's credit card?

查看:199
本文介绍了Paymill API:如何更新订阅的信用卡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以创建订阅,但我无法弄清楚如何,以便它使用一个新的信用卡更新订阅。

I can create subscriptions, but I can't figure out how to update a subscription so that it uses a new credit card.

这是我已经试过:(假设已经有一个现有的客户端,支付和订阅)

This is what I've tried: (assuming there is already an existing client, payment and subscription)


  1. 在UI创建令牌

  2. 在服务器上创建一个对象支付

  3. 更​​新客户端是这样的:

  1. create token in ui
  2. create a payment object in server
  3. update client like this:

paymill.clients.update(客户端ID,{付款:payment.id},回调);

我得到这个错误:

Error: Identifier,payment
Exception: Api_Exception_InvalidParameter

其中要求做我需要实现这个

Which calls do I need to make to achieve this?

推荐答案

Paymill已经更新了API和你现在可以提出这个要求,可用于更新订阅CC细节。

Paymill has updated the api and you can now make this request which can be used to update cc details on a subscription.

首先创建一个支付,然后更新为新的支付ID认购。

First create a payment and then update the subscription with the new payment id.

curl -X PUT https://api.paymill.com/v2/subscriptions/<SubscriptionId> -u <ApiKey>: -d payment=<PaymentId>

这篇关于Paymill API:如何更新订阅的信用卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆