How to update payment method in Zuora using PHP

126 Views Asked by At

Can you help me on how to update payment method in Zuora using PHP? I have this sample JSON code below.

PUT https://api.zuora.com/rest/v1/accounts/{account-key}

JSON Request { "paymentGateway" : "TestGateway" }

Thanks

1

There are 1 best solutions below

0
user2763008 On

If you are updating a payment method on an Account you can issue an update REST call using this endpoint : https://www.zuora.com/developer/api-reference/#operation/Object_PUTAccount

You will need the Account ID and the existing PaymentMethod ID

In your op, you referenced a Gateway, are you trying to update the PaymentMethod? or the Gateway?

If you're updating the Gateway, you can update the PaymentGateway field, using the same endpoint