Set customer payment token details
POST
/cms/customer/{id}/token_details
const url = 'https://api.example.com/cms/customer/1/token_details';const options = { method: 'POST', headers: {'API-Key': '<API-Key>', 'Content-Type': 'application/json'}, body: '{"payment_method":"example","token":"example","expiry":"example","lastdigits":"example","card_type":"example","card_brand":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.example.com/cms/customer/1/token_details \ --header 'API-Key: <API-Key>' \ --header 'Content-Type: application/json' \ --data '{ "payment_method": "example", "token": "example", "expiry": "example", "lastdigits": "example", "card_type": "example", "card_brand": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Customer ID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
payment_method
required
string
token
required
string
expiry
Card expiry date, format YYYY-MM-DD
string
lastdigits
Last digits of the card
string
card_type
Eg: card or credit
string
card_brand
Eg: visa, mastercard
string
Example generated
{ "payment_method": "example", "token": "example", "expiry": "example", "lastdigits": "example", "card_type": "example", "card_brand": "example"}Responses
Section titled “Responses”Payment token details updated
Media typeapplication/json
object
success
boolean
Example generated
{ "success": true}Bad Request
Unauthorized
Customer not found