Authentication
Learn how you can authenticate API requests that you make to Datman.
Each API request that you make to Datman must be authenticated. To authenticate your requests, you need API credentials: secret values that Datman issues to you. They act as the identity of your integration, and make sure that every request is authorised and linked to the correct account.
Depending on the endpoint, you use one of the following authentication types:
- API key authentication, with your API key in the
api_keyheader. - API key authentication with the
X-API-Keyheader, with the same API key. - API token authentication, with your API token in the
api_tokenheader. - Document upload API key authentication, with a separate key in the
api_keyheader.
The authentication type for each endpoint is shown on its page in the API Explorer. Each operation's page also shows its sandbox and production URLs.
Keep your credentials on your server. Never put them in a browser, a mobile app, or page source.
API key authentication
Authenticate your request by sending your API key in an api_key HTTP request header. Most endpoints use this type, for example List transactions in a date range and Create, update or patch a merchant.
API key in the request header
api_key: YOUR_API_KEYAPI key in the X-API-Key header
A few endpoints read the same API key from an X-API-Key HTTP request header instead of api_key. Send the header name as exactly X-API-Key or x-api-key. The endpoints that use this header are:
- Sync a legal entity
- Get a merchant's balance
API key in the X-API-Key header
X-API-Key: YOUR_API_KEYAPI token authentication
Authenticate your request by sending your API token in an api_token HTTP request header. The following endpoints use this type:
- Payment modifications: refund, capture, adjustment and authorisation reversal.
- Internal transfers.
- Split commission types.
API token in the request header
api_token: YOUR_API_TOKENDocument upload API key authentication
Authenticate a request to upload an onboarding document by sending your document upload API key in an api_key HTTP request header. This is a different key from your API key.
Document upload API key in the request header
api_key: YOUR_DOCUMENT_UPLOAD_API_KEY
