Create Token

POST {{auth_url}}/token

Parameters

FieldDescriptionType
Partner IDID of the partner who is authorized to have an app connected to the tomato pay APIsHeader
API KeyA secret key used to authenticate a clientHeader

If you haven't already, you can obtain your API key by signing up here

tomato pay API uses JWT (JSON web tokens) to authenticate requests to all other endpoints. These tokens expire every 30 minutes. To obtain a JWT, use the API key, and click on your app in the ‘My Apps’ section.

Attributes

FieldTypeDescription
access_tokenstringAccess token
expires_instringExpiry time of the token (in seconds) (Default 30 minutes or 1800 seconds)
partner_idstringID of the partner who is authorised to have an app connected to the tomato pay APIs
token_typestringType of token (Bearer in this case)

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
X-Partner-Idstring
X-Api-Keystring

RESPONSES

status: Created

{"access_token":"accesstoken123","expires_in":1800,"partner_id":"partnerid256","token_type":"Bearer"}