Create a customer token
Use this API call to create a Ledyer Customer Token.
- Example Request
- Example Response
curl -X POST \
-H 'authorization: Bearer v4.public.eyJpc3MiOiJs...' \
-H 'content-type: application/json' \
-d '{
"country": "SE",
"currency": "SEK",
"locale": "sv-SE",
"companyId": "556751-5019",
"email": "bodil.andersson@alfonskritor.com",
"firstName": "Bodil",
"lastName": "Andersson",
"phone": "0700000000",
"reference1": "",
"reference2": "",
"billingAddress": {
"attentionName": "",
"careOf": "",
"city": "Stockholm",
"companyName": "Alfons kritor AB",
"country": "SE",
"postalCode": "11359",
"streetAddress": "Sveavägen 49",
},
}'
https://api.sandbox.ledyer.com/v1/authorization-tokens/:token/customer-token
Path parameters
token
The token that was obtained when the authorization was created.
Request body
country
stringCountry code such as SE
, FI
etc (ISO 3166-1 alpha-2).
currency
stringExample SEK
, NOK
(ISO 4217 alpha).
locale
stringSpecify language for the payments application, sv-SE
, da-DK
etc (BCP 47).
customer
objectOptionalAll customer information.
{
"customerToken": "ct_2gHjkw8YbWYkYuHdmtU3G8EmIZ6"
}