REST Example: Retrieving a Customer's Default Payment and Shipping Details

Request
GET
https://apitest.cybersource.com
/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF
Response to a Successful Request
{ "_links": { "self": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF" }, "paymentInstruments": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF/payment-instruments" }, "shippingAddresses": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF/shipping-addresses" } }, "id": "F45FB3E443AC3C57E053A2598D0A9CFF", "clientReferenceInformation": { "code": "TC50171_3" }, "defaultPaymentInstrument": { "id": "F45FC6785E3C31A2E053A2598D0A5346" }, "defaultShippingAddress": { "id": "F45FB3E443AF3C57E053A2598D0A9CFF" }, "metadata": { "creator": "testrest" }, "_embedded": { "defaultPaymentInstrument": { "_links": { "self": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF/payment-instruments/F45FC6785E3C31A2E053A2598D0A5346" }, "customer": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF" } }, "id": "F45FC6785E3C31A2E053A2598D0A5346", "default": true, "state": "ACTIVE", "card": { "expirationMonth": "12", "expirationYear": "2031", "type": "001" }, "buyerInformation": { "currency": "USD" }, "billTo": { "firstName": "JOHN", "lastName": "DEO", "address1": "201 S. Division St.", "address2": "Address 2", "locality": "Ann Arbor", "administrativeArea": "MI", "postalCode": "48104-2201", "country": "US", "email": "
test@cybs.com
", "phoneNumber": "999999999" }, "processingInformation": { "billPaymentProgramEnabled": false }, "instrumentIdentifier": { "id": "7030000000014911515" }, "metadata": { "creator": "testrest" }, "_embedded": { "instrumentIdentifier": { "_links": { "self": { "href": "/tms/v1/instrumentidentifiers/7030000000014911515" }, "paymentInstruments": { "href": "/tms/v1/instrumentidentifiers/7030000000014911515/paymentinstruments" } }, "id": "7030000000014911515", "object": "instrumentIdentifier", "state": "ACTIVE", "tokenizedCard": { "state": "ACTIVE", "number": "489537XXXXXX5914", "expirationMonth": "12", "expirationYear": "2022", "type": "visa", "requestorId": "40010052236", "card": { "suffix": "1515", "expirationMonth": "12", "expirationYear": "2031" } }, "card": { "number": "489537XXXXXX1515" }, "issuer": { "paymentAccountReference": "V0010013019326121174070050420" }, "processingInformation": { "authorizationOptions": { "initiator": { "merchantInitiatedTransaction": { "previousTransactionId": "123456789619999" } } } }, "metadata": { "creator": "testrest" } } } }, "defaultShippingAddress": { "_links": { "self": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF/shipping-addresses/F45FB3E443AF3C57E053A2598D0A9CFF" }, "customer": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF" } }, "id": "F45FB3E443AF3C57E053A2598D0A9CFF", "default": true, "shipTo": { "firstName": "JOHN", "lastName": "DEO", "company": "Visa", "address1": "201 S. Division St.", "address2": "Address 2", "locality": "Ann Arbor", "administrativeArea": "MI", "postalCode": "48104-2201", "country": "US" }, "metadata": { "creator": "testrest" } } } }