Update primary payment method
Changed onChange the primary payment method token for an existing customer. Ensure that the new primary token is valid prior to the request.
put/billing/customers/{customerId}/paymentmethods/{paymentMethodToken}/primary
Request
- Base URLhttps://api-sandbox.ezypay.com/v2
- URLhttps://api-sandbox.ezypay.com/v2/billing/customers/{customerId}/paymentmethods/{paymentMethodToken}/primary
- AuthOAuth 2Client credentialsToken URL: https://identity-sandbox.ezypay.com/token
Path parameters
paymentMethodTokenstring required
Auto-generated unique identifier of the payment method token generated by vault. PromptPay payment method token cannot be set as the primary payment method.
customerIdstring required
Auto-generated unique identifier of the customer.
Headers
merchantstring required
Merchant ID
Response
200
Example response
{
"paymentMethodToken": "187b485f-1f40-4c35-8c0d-81f87888ffcd",
"customerId": "37a2e1dd-c1d9-4fda-a077-6908877aa84c",
"type": "CARD",
"card": {
"first6": "498765",
"last4": "8769",
"accountHolderName": "JaneDoe",
"type": "VISA",
"expiryMonth": "12",
"expiryYear": "25"
},
"valid": true,
"primary": true
}Changes
- info
endpoint added
- info