Skip to content

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 ​

CredentialPurpose
Merchant numberAdopay-assigned merchant identifier, sent in X-Merchant-Id. Partners use their primary merchant number.
keyIdAlways the fixed string v1, sent in Authorization; no application needed. The verification public key is located by X-Merchant-Id.
P-256 private keyGenerated and protected by the merchant or partner; used to create ES256 request signatures.
P-256 public keySubmitted to Adopay during onboarding; used by Adopay to verify request signatures.
IP allowlistThe 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:

HeaderDescription
X-Merchant-IdAdopay-assigned merchant number; partners send their primary merchant number.
X-TimestampUnix timestamp in seconds; the server allows a 300-second clock difference.
X-NonceAnti-replay nonce; it must not repeat for the same merchant within 300 seconds.
DigestSHA-256 digest of the raw request body; hash an empty byte string when the request has no body.
AuthorizationES256 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 ​

text
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 you

Determine 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.