Creating an eCheck Token Using the REST API
This section shows how to create an eCheck token for your customer using the REST
API.
IMPORTANT
No transaction is run in this use case. The token is created for
future use with this customer.
Creating a Customer Token With No Payment Details
Follow these steps to create an eCheck token for your customer using your customer's
bank account details:
- Create the message with the required API fields.
- Send the message to one of these endpoints:
- Production:POSThttps://api.cybersource.com/tms/v2/customers
- Test:POSThttps://apitest.cybersource.com/tms/v2/customers
- Verify the response messages to make sure that the request was successful. A 200-level HTTP response code indicates success.
Required Fields for Creating an eCheck Token
- paymentInstrument.bankAccount.type
- paymentInstrument.instrumentIdentifier.bankAccount.number
- paymentInstrument.instrumentIdentifier.bankAccount.routingNumber
REST Example: Creating an eCheck Token
Request
1234567891011{"paymentInstrument": { "bankAccount": { "type": "savings" }, "instrumentIdentifier": { "bankAccount": { "number": "12345678901234567", "routingNumber": "071923284" } } }}
Response
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859{"_links": { "self": { "href": "/tms/v2/customers/2281788029E0D2B4E0633F36CF0AB40D" }, "paymentInstruments": { "href": "/tms/v2/customers/2281788029E0D2B4E0633F36CF0AB40D/payment-instruments" }, "shippingAddresses": { "href": "/tms/v2/customers/2281788029E0D2B4E0633F36CF0AB40D/shipping-addresses" } }, "id": "2281788029E0D2B4E0633F36CF0AB40D", "objectInformation": { "title": "subscription_title", "comment": "comments" }, "buyerInformation": { "merchantCustomerID": "customer_account_id" }, "clientReferenceInformation": { "code": "merchant_ref_number" }, "merchantDefinedInformation": [ { "name": "data1", "value": "merchant_defined_data1" }, { "name": "data2", "value": "merchant_defined_data2" }, { "name": "data3", "value": "merchant_defined_data3" }, { "name": "data4", "value": "merchant_defined_data4" }, { "name": "sensitive1", "value": "merchant_secure_data1" }, { "name": "sensitive2", "value": "merchant_secure_data2" }, { "name": "sensitive3", "value": "merchant_secure_data3" }, { "name": "sensitive4", "value": "merchant_secure_data4" } ], "metadata": { "creator": "npr_fnbo" }}