Create a Payment Instrument
This section shows you how to create a payment instrument token.
Endpoint
Test:
POST
https://apitest.cybersource.com
/tms/v1/paymentinstrumentsProduction:
POST
https://api.cybersource.com
/tms/v1/paymentinstrumentsProduction in India:
POST
https://api.in.cybersource.com
/tms/v1/paymentinstrumentsRequired Fields for Creating a Payment Instrument
- card.type
- instrumentIdentifier.id
- Include the ID of the instrument identifier token you want to use to create a payment instrument.
Related Information
Optional Fields for Creating a Payment Instrument
- default
- Set value totrueif default, otherwise set value tofalse.
- bankAccount.type
- billTo.firstName
- billTo.lastName
- billTo.company
- billTo.address1
- billTo.locality
- billTo.administrativeArea
- billTo.postalCode
- billTo.country
- billTo.email
- billTo.phoneNumber
- card.expirationMonth
- card.expirationYear
- card.issueNumber
- card.startMonth
- card.startYear
- card.useAs
- tokenizedInformation.requestorID
- tokenizedInformation.transactionType
- buyerInformation.companyTaxID
- buyerInformation.currency
- buyerInformation.dateOfBirth
- buyerInformation.personalIdentification.id
- buyerInformation.personalIdentification.type
- buyerInformation.personalIdentification.issuedBy.administrativeArea
- billTo.address2
- processingInformation.billPaymentProgramEnabled
- processingInformation.bankTransferOptions.SECCode
- merchantInformation.merchantDescriptor.alternateName
Related Information
REST Example: Creating a Payment Instrument
Request
{ "card": { "expirationMonth": "12", "expirationYear": "2031", "type": "visa" }, "billTo": { "firstName": "John", "lastName": "Doe", "company": "Company Name", "address1": "1 Market St", "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":https://apitest.cybersource.com/tms/v1/paymentinstruments/F39763E8CFDF2354E053AF598E0AF684" } }, "id": "F39763E8CFDF2354E053AF598E0AF684", "object": "paymentInstrument", "state": "ACTIVE", "card": { "expirationMonth": "12", "expirationYear": "2031", "type": "visa" }, "billTo": { "firstName": "John", "lastName": "Doe", "company": "Company Name", "address1": "1 Market St", "locality": "San Francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "test@cybs.com", "phoneNumber": "4158880000" }, "metadata": { "creator": "testrest" }, "_embedded": { "instrumentIdentifier": { "_links": { "self": { "href": "https://apitest.cybersource.com/tms/v1/instrumentidentifiers/7010000000016241111" }, "paymentInstruments": { "href": "https://apitest.cybersource.com/tms/v1/instrumentidentifiers/7010000000016241111/paymentinstruments" } }, "id": "7010000000016241111", "object": "instrumentIdentifier", "state": "ACTIVE", "card": { "number": "411111XXXXXX1111" }, "processingInformation": { "authorizationOptions": { "initiator": { "merchantInitiatedTransaction": { "previousTransactionId": "123456789619999" } } } }, "metadata": { "creator": "testrest" } } } }