/v0.1/merchants/{merchant_code}/tokensCreates a short-lived token for the merchant account identified by merchant_code and the requested actions.
Call this endpoint from your backend using a supported authentication method. You must have access to the merchant account. Before returning the token, check that the user signed in to your application is allowed to accept payments for that account.
Pass the returned access_token to the SDK. The token expires 15 minutes after creation; use expires_in for its remaining lifetime. To continue after it expires, create a new token through this endpoint.
Required permissions:
{"relation":"tokens.create","object_type":"merchant","object_id_param":"merchant_code"}
Path parameters
Unique code of the merchant account that will receive the payments.
Example:
"MC0X0ABC"
Body parameters
application/jsonrequiredActions the merchant token should allow.
- Options:
"checkout"Actions the token allows for this merchant account.
Example:
["checkout"]
Responses
200application/json
Merchant token created. Pass its access_token to the SDK.
Secret token to pass to the SDK. Treat this value as an opaque string; do not parse it or depend on its format.
Example:
"MERCHANT_TOKEN"- Options:
"Bearer"Authentication scheme used by the token. Always Bearer.
Example:
"Bearer" - minimum:
0Remaining lifetime of the token in seconds when the response is created. Tokens expire 15 minutes after creation. Request a new token when needed.
Example:
899
400application/problem+json
The request body is invalid or contains unsupported or duplicate actions.
- format:
uriA URI reference that identifies the problem type.
Example:
"https://developer.sumup.com/problem/not-found" - titlestring
A short, human-readable summary of the problem type.
Example:
"Requested resource couldn't be found." - statusinteger
The HTTP status code generated by the origin server for this occurrence of the problem.
Example:
404 - detailstring
A human-readable explanation specific to this occurrence of the problem.
Example:
"The requested resource doesn't exist or does not belong to you." - instancestringformat:
uriA URI reference that identifies the specific occurrence of the problem.
Example:
"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
401application/json
Authentication is missing, invalid, or expired.
- format:
uriA URI reference that identifies the problem type.
Example:
"https://developer.sumup.com/problem/not-found" - titlestring
A short, human-readable summary of the problem type.
Example:
"Requested resource couldn't be found." - statusinteger
The HTTP status code generated by the origin server for this occurrence of the problem.
Example:
404 - detailstring
A human-readable explanation specific to this occurrence of the problem.
Example:
"The requested resource doesn't exist or does not belong to you." - instancestringformat:
uriA URI reference that identifies the specific occurrence of the problem.
Example:
"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
application/problem+json
- format:
uriA URI reference that identifies the problem type.
Example:
"https://developer.sumup.com/problem/not-found" - titlestring
A short, human-readable summary of the problem type.
Example:
"Requested resource couldn't be found." - statusinteger
The HTTP status code generated by the origin server for this occurrence of the problem.
Example:
404 - detailstring
A human-readable explanation specific to this occurrence of the problem.
Example:
"The requested resource doesn't exist or does not belong to you." - instancestringformat:
uriA URI reference that identifies the specific occurrence of the problem.
Example:
"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"
{
"type": "https://developer.sumup.com/problem/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Token is invalid or expired."
}403application/json
The authenticated identity does not have permission to create tokens for this merchant account.
- format:
uriA URI reference that identifies the problem type.
Example:
"https://developer.sumup.com/problem/not-found" - titlestring
A short, human-readable summary of the problem type.
Example:
"Requested resource couldn't be found." - statusinteger
The HTTP status code generated by the origin server for this occurrence of the problem.
Example:
404 - detailstring
A human-readable explanation specific to this occurrence of the problem.
Example:
"The requested resource doesn't exist or does not belong to you." - instancestringformat:
uriA URI reference that identifies the specific occurrence of the problem.
Example:
"https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"