Create a Customer

This section shows you how to create a customer token with no payment details.

Endpoint

Test:
POST
https://apitest.cybersource.com
/tms/v2/customers
Production:
POST
https://api.cybersource.com
/tms/v2/customers
Production in India:
POST
https://api.in.cybersource.com
/tms/v2/customers

Required Fields for Creating a Customer

You can include any of the following fields in the body of the request:
buyerInformation.merchantCustomerID
buyerInformation.email
clientReferenceInformation.code
merchantDefinedInformation.name
merchantDefinedInformation.value
Create a Customer

REST Example: Creating a Customer

Request
{ "buyerInformation": { "merchantCustomerID": "Your customer identifier", "email": "
test@cybs.com
" }, "clientReferenceInformation": { "code": "123456" }, "merchantDefinedInformation": [ { "name": "data1", "value": "Your customer data" } ] }
Response to a Successful Request
{ "_links": { "self": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078" }, "paymentInstruments": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/payment-instruments" }, "shippingAddresses": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/shipping-addresses" } }, "id": "F2F3ADA770102B51E053A2598D0A9078", "buyerInformation": { "merchantCustomerID": "Your customer identifier", "email": "
test@cybs.com
" }, "clientReferenceInformation": { "code": "TC50171_3" }, "merchantDefinedInformation": [ { "name": "data1", "value": "Your customer data" } ], "metadata": { "creator": "testrest" } }
Create a Customer