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": "<string>",
  "customerId": "<string>",
  "externalUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "identityPrefill": {
    "firstName": "<string>",
    "lastName": "<string>",
    "dateOfBirth": "<string>",
    "emailAddress": "<string>",
    "phone": "<string>",
    "address": {
      "street1": "<string>",
      "street2": "<string>",
      "city": "<string>",
      "regionCode": "<string>",
      "postalCode": "<string>",
      "countryCode": "<string>"
    }
  },
  "paymentMethodTypeConfig": {
    "default": "us_debit",
    "enabled": [
      "us_debit"
    ]
  }
}'
{
  "clientToken": "<string>",
  "expiresAt": "<string>"
}

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