POST
/
auth
/
client-tokens
curl --request POST \
  --url https://api.sandbox.sardine.ai/v1/auth/client-tokens \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "referenceId": "42eadcb0-4a93-45af-9c8c-d295db5aeb6c",
  "identityPrefill": {
    "firstName": "John",
    "lastName": "Doe",
    "dateOfBirth": "1995-01-01",
    "emailAddress": "foobar@gmail.com",
    "phone": "+19254485826",
    "address": {
      "street1": "123 main st",
      "street2": "",
      "city": "irvine",
      "regionCode": "CA",
      "postalCode": "02747",
      "countryCode": "US"
    }
  }
}'
{
  "clientToken": "b4c34b68-0f41-4ca9-aaee-251361e5d0da",
  "expiresAt": "2022-08-02T15:41:26Z"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
referenceId
string

Unique id representing a new session, must be regenerated for each call

customerId
string

ID of customer

externalUserId
string

An ID generated by the merchant to uniquely identity a user.

identityPrefill
object

If these fields are filled, they will be pre filled into the UI

paymentMethodTypeConfig
object

Response

200 - application/json
OK
clientToken
string

Authentication token returned

expiresAt
string

Timestamp when clientToken will expire