Change a Customer's Default Payment Instrument
This section shows you how to change a customer's default payment instrument.
Endpoint
Test:
PATCH
https://apitest.visaacceptance.com
/tms/v2/customers/{customerTokenId}
/payment-instruments/{paymentInstrumentTokenId}
Production:
PATCH
https://api.visaacceptance.com
/tms/v2/customers/{customerTokenId}
/payment-instruments/{paymentInstrumentTokenId}
The is the customer token ID returned in
the is the payment instrument
token ID you want to retrieve. For more information, see Create a Customer and Create a Customer Payment Instrument.
{customerTokenId}
id
field when you created the customer token. The
{paymentInstrumentTokenId}
Required Fields for Changing a Customer's Default Payment Instrument
- default
- Set value totrue.
REST Example: Changing a Customer's Default Payment Instrument
Request
1{"default": true}
Response to a Successful Request
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364{"_links": { "self": { "href": "/tms/v2/customers/F4D5E715F75E9910E053A2598D0A7278/payment-instruments/F4D5E715F7BD9910E053A2598D0A7278" }, "customer": { "href": "/tms/v2/customers/F4D5E715F75E9910E053A2598D0A7278" } }, "id": "F4D5E715F7BD9910E053A2598D0A7278", "default": true, "state": "ACTIVE", "card": { "expirationMonth": "12", "expirationYear": "2031", "type": "001" }, "billTo": { "firstName": "John", "lastName": "Doe", "company": "Visa", "address1": "1 Market St", "locality": "san francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "test@vas.com", "phoneNumber": "4158880000" }, "instrumentIdentifier": { "id": "7010000000016241111" }, "metadata": { "creator": "testrest" }, "_embedded": { "instrumentIdentifier": { "_links": { "self": { "href": "/tms/v1/instrumentidentifiers/7010000000016241111" }, "paymentInstruments": { "href": "/tms/v1/instrumentidentifiers/7010000000016241111/paymentinstruments" } }, "id": "7010000000016241111", "object": "instrumentIdentifier", "state": "ACTIVE", "card": { "number": "411111XXXXXX1111" }, "processingInformation": { "authorizationOptions": { "initiator": { "merchantInitiatedTransaction": { "previousTransactionId": "123456789619999" } } } }, "metadata": { "creator": "testrest" } } }}