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

查看:28
本文介绍了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(clientId, { payment: payment.id }, callback);

我收到此错误:

Error: Identifier,payment
Exception: Api_Exception_InvalidParameter

我需要进行哪些调用才能实现这一目标?

Which calls do I need to make to achieve this?

推荐答案

Paymill 已更新 api,您现在可以发出此请求,该请求可用于更新订阅的抄送详细信息.

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天全站免登陆