Skip to main content
Your server authenticates with an API key that belongs to one gateway. Keys start with w3g_. Send it as a bearer token:
X-Api-Key: w3g_... works too, if your HTTP client makes the Authorization header awkward.
An API key can create payment links and manage your keys and webhook secret. Keep it on your server. Never put it in a web page, a mobile app or a public repository.

What a key can do

The payer-side endpoints (reading a link’s checkout, creating an order, reading an order) need no key: anyone with the link or order id can use them, which is what lets the payer pay.

Getting your first key

A Paywire admin creates your gateway in the dashboard; its first key is shown once. After that you can issue more keys yourself with the API.

Rotating a key

A gateway can have up to 5 active keys, so you can rotate without downtime:
1

Issue a new key

The response holds the new key in apiKey, shown this once, and its keyId.
2

Deploy it

Switch your servers to the new key and check they work.
3

Revoke the old key

The old key stops working at once; anything still using it gets 401.
Find a key’s id with GET /payments/merchants/me: it lists every key with its id, prefix (the first characters, to recognise it) and revokedAt.

Errors