How to use API keys to authenticate your requests

API Authentication

We use API keys to authenticate your requests to our API.

⚠️ Your API key allows you to create payment objects and more on your behalf, so make sure to keep it secure. Do not, under any circumstances, share your API keys or store them in publicly accessible places such as code repositories or client-side source code.

Authentication is performed via Basic Auth (username:password), by providing the API key as the username value and leaving the password empty.

HTTPS is required for all API requests, including authentication. Plain HTTP requests to any endpoint will fail.

Below is an example of an authenticated request to our API. You must replace sandbox_api_key_here with your own secret API key.

curl https://sandbox-api.ztlment.com/v1/payment-objects \
    -X POST \
    -u sandbox_api_key_here: \
    -H 'Content-Type: application/json' \
    -d '{
        "amount": 1000,
        "currency": "EUR",
        "payer": "ACC_754215455221",
        "payee": "EXT_289745627252",
        "iban_memo":"Powered By ZTLment"
    }'