How to generate a Deposit Page JWT token
Cashier uses JWT tokens for authorization purposes.
Generated JWT token with HS256 algorithm signature contains Customer and Merchant data in the payload.
Merchant API Key (CRM API Key) is used for generating the JWT token.
Token payload parameters:
| Name | Type | Size/Format | Description |
|---|---|---|---|
customerId | string | Chars (100) | Customer unique identifier from Merchant system. |
tradingAccountId | string | Chars (100) | Trading Account unique identifier of the Customer from Merchant system . |
account_uuid | string | UUID, Chars (36) | Merchant ID of the Merchant in Cashier System. Provided by Cashier Customer Support Team. |
exp | string | timestamp | Expiration date. Example: 1738771955 |
brand | string | Chars (100) | Brand identifier. |
Example:
To generate your unique token, you can enter your data in JSON format into JWT token online generator like: https://jwt.io/
Please see the table below on how to correctly fill the fields in the token generator.
| Field | Value |
|---|---|
| HEADER: | {"typ": "JWT", "alg": "HS256"} |
| PAYLOAD: | {"tradingAccountId": "987654321","account_uuid": "a9282105-9db0-46d9-8aa0-0d9f96c10b97","customerId": "1234567890","brand": "testmerchant", "exp": 1738771955} |
| SIGN JWT: | Paste your Merchant API KEY in the highlighted field. Example: 123457890123456789012345678901234567890 |
As a result, you should have:
JSON WEB TOKEN:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0cmFkaW5nQWNjb3VudElkIjoiOTg3NjU0MzIxIiwiYWNjb3VudF91dWlkIjoiYTkyODIxMDUtOWRiMC00NmQ5LThhYTAtMGQ5Zjk2YzEwYjk3IiwiY3VzdG9tZXJJZCI6IjEyMzQ1Njc4OTAiLCJicmFuZCI6InRlc3RtZXJjaGFudCIsImV4cCI6MTczODc3MTk1NX0.U9Wx2xTa_qJdI-pqkWmJwae_5U5Hr6usDBRts8ZU7sw
