> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pawapay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# API tokens

The PawaPay Merchant API can only be used with an authentication token. You can read more about how this token can be used to access our API from our [API docs](https://docs.pawapay.io/using_the_api.md#authentication).

This functionality is available to users with the Technical Administration role. Read more about [User roles](https://docs.pawapay.io/dashboard/user_management/user_roles.md).

## Generating an API token

Press the "Generate token" button to generate an API token. You can have at most 10 active API tokens at a time.

![](https://docs.pawapay.io/images/dashboard/other/dev-generate-token-light.svg)

> [!TIP]
>
> You can use the "Copy to clipboard" button to easily copy the API token.

> [!WARNING]
>
> **Store your token safely as PawaPay does not store your token after generating it for security reasons.**
>
> **You need to configure your [Callback URLs](https://docs.pawapay.io/using_the_api.md#callback-urls) to be able to generate API tokens.**

## Active API tokens

Your active API tokens are listed together with the information about who generated them, when they were generated, and the Token ID.
Note that the Token ID is not usable as the token itself but is only used for identifying a specific token when contacting our support team.

![](https://docs.pawapay.io/images/dashboard/other/dev-active-tokens-light.svg)

## Revoking tokens

If you need to revoke an API token, you can press the "Revoke" button which is found under the "Actions" column.

![](https://docs.pawapay.io/images/dashboard/other/dev-revoke-token-light.svg)

> [!WARNING]
>
> **Revoking an API token will immediately stop all payments that use the given token to authenticate API calls!**

## Signed requests

You can enable PawaPay to only accept signed requests for financial calls. You will need to provide us with the public key of the key pair you are signing your requests with.

### Accepted algorithms

We accept 4 kinds of encryption algorithms:

* [RSASSA-PSS Using SHA-512](https://datatracker.ietf.org/doc/html/rfc9421#name-rsassa-pss-using-sha-512)
* [RSASSA-PKCS1-v1\_5 Using SHA-256](https://datatracker.ietf.org/doc/html/rfc9421#name-rsassa-pkcs1-v1_5-using-sha)
* [ECDSA Using Curve P-256 DSS and SHA-256](https://datatracker.ietf.org/doc/html/rfc9421#name-ecdsa-using-curve-p-256-dss)
* [ECDSA Using Curve P-384 DSS and SHA-384](https://datatracker.ietf.org/doc/html/rfc9421#name-ecdsa-using-curve-p-384-dss)

### Adding a public key

**1. Add your public key**

You can add your public key by navigating to the API Security tab and pressing on “Add public key”.

![](https://docs.pawapay.io/images/dashboard/other/dev-add-public-key-light.svg)

**2. Enter public key details**

You will then be presented a window where you can:

1. Name your public key
2. Enter the public key itself
3. Choose whether you want to immediately start accepting only signed requests (shown when you add your first key)

![](https://docs.pawapay.io/images/dashboard/other/dev-enter-public-key-light.svg)

After successfully adding a key you will be able to view and remove it.

![](https://docs.pawapay.io/images/dashboard/other/dev-view-key-light.svg)

You can also switch this feature on and off by using the toggle. Switching the feature off **will not** remove any existing keys.

![](https://docs.pawapay.io/images/dashboard/other/dev-signed-only-light.svg)

## Signed callbacks

Enable this feature to make PawaPay sign all callbacks.
You can then verify those signatures when receiving the callback to ensure they have not been tampered with and are coming from PawaPay.

![](https://docs.pawapay.io/images/dashboard/other/dev-signed-callbacks-light.svg)

Read more about signed callbacks in our [API docs](https://docs.pawapay.io/using_the_api.md#signatures-in-callbacks).

## IP allowlist

You can restrict your API tokens to the servers you call PawaPay from. When the IP allowlist is on, PawaPay rejects API calls from any IP address that is not on the list, even when the token itself is valid. A leaked token can then not be used from anywhere else.

You manage the list on the "IP allowlist" tab of the Developers page. You can add and remove addresses while the allowlist is off. Nothing is enforced until you turn it on.

> [!NOTE]
>
> The allowlist applies to calls made with your API tokens. Payments your customers make on PawaPay's hosted payment page are not affected.

### Adding an IP address

Press "Add IP address". In the "New IP address" window, enter an IPv4 address, for example 203.0.113.10, or a range in CIDR notation, for example 198.51.100.0/24. A label such as the server's name is optional. Press "Add" to save the address. The list shows who added each address and when.

![](https://docs.pawapay.io/images/dashboard/other/dev-ip-allowlist-add-light.svg)

> [!TIP]
>
> IPv6 addresses are not supported. An address that is already on the list cannot be added again.

### Turning the allowlist on

Add at least one address first. Then use the toggle at the top of the tab and confirm. From that moment only the listed addresses can use your API tokens.

![](https://docs.pawapay.io/images/dashboard/other/dev-ip-allowlist-enable-light.svg)

> [!WARNING]
>
> **Make sure every server that calls the PawaPay API is on the list before you turn the allowlist on.** Calls from any other address are rejected with HTTP 403 Forbidden. Changes take effect within a minute.

### Removing an IP address

Press "Remove" in the "Actions" column and confirm.

![](https://docs.pawapay.io/images/dashboard/other/dev-ip-allowlist-remove-light.svg)

> [!WARNING]
>
> **If you remove the last address while the allowlist is on, the allowlist is turned off and your API tokens can be used from any IP address again.**

### Turning the allowlist off

Use the toggle and confirm. Your addresses stay saved and apply again when you turn the allowlist back on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.