Update a Customer Payment Instrument

This section shows you how to update a customer payment instrument token.

Endpoint

Test:
PATCH
https://apitest.cybersource.com
/tms/v2/customers/
{customerTokenId}
/payment-instruments/
{paymentInstrumentTokenId}
Production:
PATCH
https://api.cybersource.com
/tms/v2/customers/
{customerTokenId}
/payment-instruments/
{paymentInstrumentTokenId}
Production in India:
PATCH
https://api.in.cybersource.com
/tms/v2/customers/
{customerTokenId}
/payment-instruments/
{paymentInstrumentTokenId}
The
{customerTokenId}
is the customer token ID returned in the
id
field when you created the customer token. The
{paymentInstrumentTokenId}
is the payment instrument token ID you want to retrieve. For more information, see Create a Customer and Create a Customer Payment Instrument.

Required Fields for Updating a Customer Payment Instrument

customerTokenId
Include the ID of the customer token you want to retrieve in the URL path.
paymentInstrumentTokenId
Include the ID of the payment instrument token you want to retrieve in the URL path.
Update a Customer Payment Instrument

Optional Fields for Updating a Customer Payment Instrument

bankAccount.type
billTo.address1
billTo.address2
billTo.aminstrativeArea
billTo.company
billTo.country
billTo.email
billTo.firstName
billTo.lastName
billTo.locality
billTo.phoneNumber
billTo.postalCode
buyerInformation.companyTaxID
buyerInformation.currency
buyerInformation.dateOfBirth
buyerInformation.personalIdentification.id
buyerInformation.personalIdentification.issuedBy.administrativeArea
buyerInformation.personalIdentification.type
card.expirationMonth
card.expirationYear
card.issueNumber
card.startMonth
card.startYear
card.type
card.useAs
card.tokenizedInformation.requestorID
card.tokenizedInformation.transactionType
default
Set value to
true
if default, otherwise set value to
false
.
instrumentIdentifier.id
processingInformation.billPaymentProgramEnabled
merchantInformation.merchantDescriptor.alternateName
Update a Customer Payment Instrument

REST Example: Updating a Customer Payment Instrument

Request
{ "default": "true", "card": { "expirationMonth": "12", "expirationYear": "2031", "type": "001" }, "billTo": { "firstName": "John", "lastName": "Doe", "company": "Company Name", "address1": "1 Market St", "address2": "Unit B", "locality": "San Francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "
test@cybs.com
", "phoneNumber": "4158880000" }, "instrumentIdentifier": { "id": "7010000000016241111" } }
Response to a Successful Request
{ "_links": { "self": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/payment-instruments/F39732BE4BDA9A1EE053AF598E0A4081" }, "customer": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078" } }, "id": "F39732BE4BDA9A1EE053AF598E0A4081", "default": true, "state": "ACTIVE", "card": { "expirationMonth": "12", "expirationYear": "2031", "type": "001" }, "billTo": { "firstName": "John", "lastName": "Doe", "company": "Company Name", "address1": "1 Market St", "address2": "Unit B", "locality": "San Francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "
test@cybs.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": "123456789012345" } } } }, "metadata": { "creator": "testrest" } } } }
Update a Customer Payment Instrument