Change the payment method
Update the payment account used for future renewals. This is useful when a consumer's card has expired or they want to switch to a different payment method.
When you send this request, Centrobill attempts a charge using the new payment method to verify it works. An IPN callback is sent to your ipnUrl with the result.
curl --request PUT \
--url https://api.centrobill.com/subscription/{id}/paymentAccount \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"paymentSource": {
"type": "token",
"token": "d86bdcbb-c369-46d9-a9d0-9c5010e3bfdb"
},
"consumer": {
"id": "cb-gateway-id",
"ip": "203.0.113.45"
}
}'paymentSource field — accepted types:
| Type | Description |
|---|---|
token | Short-lived token from POST /tokenize |
card | Raw card data (requires PCI DSS certification) |
sepa | SEPA bank account details |
consumer required fields:
| Field | Required | Description |
|---|---|---|
id | Yes | Centrobill gateway consumer ID |
ip | Yes | Consumer's IP address |
Optional consumer fields: externalId, email, firstName, lastName, phone, country, state, city, zip, userAgent, deviceId.
A successful response returns a payment object (not a subscription object) reflecting the outcome of the payment account verification attempt. The final result is delivered via IPN callback to your ipnUrl. Respond with 200, 201, or 202 to acknowledge receipt.
Updated 20 days ago
