Authentication
The Merchant API and Partner API use Merchant Credentials or Partner Credentials together with ES256 request signatures for authentication, message-integrity verification, and replay protection. They do not use JWT login sessions.
Integration Credentials
| Credential | Purpose |
|---|---|
| Merchant number | Adopay-assigned merchant identifier, sent in X-Merchant-Id. Partners use their primary merchant number. |
keyId | Always the fixed string v1, sent in Authorization; no application needed. The verification public key is located by X-Merchant-Id. |
| P-256 private key | Generated and protected by the merchant or partner; used to create ES256 request signatures. |
| P-256 public key | Submitted to Adopay during onboarding; used by Adopay to verify request signatures. |
| IP allowlist | The egress IPs of the servers that call the API, registered with Adopay; requests from unregistered IPs get 403. |
Private keys are server-side credentials. Store them in a secrets manager or controlled environment variable; never place them in client code, logs, or public repositories.
Authentication Headers
All Merchant API and Partner API requests require the following headers:
| Header | Description |
|---|---|
X-Merchant-Id | Adopay-assigned merchant number; partners send their primary merchant number. |
X-Timestamp | Unix timestamp in seconds; the server allows a 300-second clock difference. |
X-Nonce | Anti-replay nonce; it must not repeat for the same merchant within 300 seconds. |
Digest | SHA-256 digest of the raw request body; hash an empty byte string when the request has no body. |
Authorization | ES256 signature information containing keyId (always v1), algorithm, signed-header list, and signature value. |
See Request Signing for the canonical string, Digest algorithm, code examples, server-side verification order, response verification (optional), and webhook verification (required) rules. Business fields are defined by each endpoint.
Authentication Flow
Obtain a merchant number (primary merchant number for partners), and register a P-256 public key and the source IPs with Adopay
↓
Compute Digest and an ES256 signature from the final request
↓
Send X-Merchant-Id, X-Timestamp, X-Nonce, Digest, and Authorization
↓
Adopay verifies, in order: merchant status, keyId, timestamp, Digest, signature, nonce, and the IP allowlist
↓
Adopay returns the response with a platform signature (Digest, Authorization); verifying it is optional and up to youDetermine the business result from status in the response body; see Response Status for common response codes. On a timeout or a non-200 HTTP status, do not infer the order status — confirm it through the order query API.