Created with Sketch.
Created with Sketch.

CustomerToken

CustomerToken is unique identifier, which can merchant use to load customer information for customers who has done at least one purchase in checkout. Merchant doesn’t need remember sensitive information about customer, he needs know only customer SSN. Merchant obtain CustomerToken by API method SearchCustomerDetails. Next step is adding CustomerToken as a parameter to InitializePayment method. One CustomerToken can be used for more InitializePayment requests and it’s neccesary to generate CustomerToken before use.

Initialize payment request with CustomerToken

{   
    "CustomerToken": "cad74b1144a7fd554189da91ffe5e1f7",
    "Description" : "Instruments",
    "Price" : 100,
    "Items": [
    {
      "Amount": 90,
      "Description" : "quitar"
    },
    {
      "Amount": 10,
      "Description" : "piano"
    }
  ]
}

Return value

The method returns a Purchase ID for the negotiated session formatted as a string. An example:

"19ac0d1ee909c302d212b4324d9194b5"

Result

In the end merchant loads checkout session associated with CustomerToken and customer data are preloaded (no entering of customer details is required).