Attach/replace the tokenized payment method.
PUT
Secret API key operationId: set_payment_method/v1/billing/payment-method Authorization
Server-to-server. Send a secret key as a Bearer token plus the x-application-id header.
Request body · required
brandstring requiredlast4string requiredtokenstring required
Responses
200 Payment method set
{
"data": {
"billing_email": "string",
"has_payment_method": false,
"payment_brand": "string",
"payment_last4": "string"
},
"error": {
"code": "string",
"message": "string"
},
"meta": {
"timestamp": "string"
},
"success": false
}Request
curl -X PUT "http://localhost:8080/v1/billing/payment-method" \
-H "Content-Type: application/json" \
-d '{
"brand": "visa",
"last4": "4242",
"token": "pm_1a2b3c"
}'Try it
live requestPUT
http://localhost:8080/v1/billing/payment-method