authorization
HTTP-header
with a signed JWT token as its value (prefixed with bearer
).
jwt.io
.
At the high level a JWT is build up out of 3 pieces:
jwt.io
for more details on the specification and available
libraries for generating JWTs.
typ
and alg
are fixed and do not allow for other values. The kid
is
the ID of your private key, which you can find in the Integrations panel of
your dashboard.Description | Required | |
---|---|---|
iss | A unique ID that represents your code making this call. This helps identify what library made an API call to mattilda Pay. | Yes |
nbf | The UNIX timestamp (in seconds) that this token was created at. | Yes |
exp | The UNIX timestamp (in seconds) that this token expires at. | Yes |
iat | An optional UNIX timestamp (in seconds) for your internal use to indicate when the token was issued. | No |
jti | A random unique ID used for cryptographic entropy. This needs to be unique for each JWT. | Yes |
scopes | A list of scopes that give this token access to the API. | Yes |
embed | A dictionary of key-value pairs used to pin the amount, currency, and buyer info for use in Embed. | No |
checkout_session_id | The ID of a checkout session. This can be used to tie multiple transactions together as having originated from the same session. | No |
nbf
, exp
, and iat
values are UNIX timestamps defined as seconds since January 1st, 1970 (UTC). Some programming languages will return UNIX timestamps as milliseconds,
requiring the removal of the last 3 digits.scopes
claims.
Scope | Description |
---|---|
*.read | Allows read-access to any resource. This is used by default in the SDKs |
*.write | Allows write-access to any resource. This is used by default in the SDKs. This does not also allow read access. |
{resource_name}.read | Allows read-access to a type or resource. For example, payment-services.read enabled read-access for buyers data. |
{resource_name}.write | Allows write-access to a type or resource. For example, payment-services.write enabled write-access for buyers data. This does not also allow read access. |
embed | A scope that represents all the access needed by Embed. |
anti-fraud-services
api-logs
buyers
buyers.billing-details
card-scheme-definitions
checkout-sessions
digital-wallets
flows
payment-methods
payment-method-definitions
payment-options
payment-service-definitions
payment-services
reports
transactions
.
) and run it through the key’s algorithm.