Skip to main content
After you’ve received a challenge from POST /api/auth/challenge and signed the message field with your Stellar wallet, submit the signature here to complete sign-in. Pay3 verifies the signature against the challenge, marks it as consumed, and creates your session. For browser clients, an httpOnly pay3_session cookie is set automatically and sent with every subsequent request.

Endpoint

POST /api/auth/verify No authentication is required to call this endpoint.

Request Body

string
required
The same Stellar public key (G...) you used when requesting the challenge.
string
required
The nonce string returned by POST /api/auth/challenge. Pay3 uses this to look up the exact challenge record server-side.
string
required
Your Ed25519 signature of the challenge message, encoded as base64 (or as a 128-character lowercase hex string). Pay3 accepts both raw Ed25519 signatures and SEP-53 Freighter-style signatures (where the message is pre-hashed as SHA256("Stellar Signed Message:\n" + message) before signing).

Response

All Pay3 API responses are wrapped in a standard envelope:
A successful 200 OK response confirms authentication and returns the new session context inside data. The session is established via the pay3_session httpOnly cookie set in the response headers — the session token is not present in the response body.
object
The authenticated session context.
string
A unique identifier for this API request, useful for support and debugging.
The pay3_session cookie is httpOnly — it is not accessible to JavaScript and is sent automatically by the browser on all subsequent requests to api.pay3.dev. For server-to-server or CLI usage, read the Set-Cookie header from the verify response and pass the session token value via the Authorization: Bearer <session-token> header on protected endpoints.

Signature Formats

Pay3 supports two signature formats, detected automatically: Freighter’s signMessage() produces a SEP-53 signature (hashed before signing). Pay3 verifies both the raw and SEP-53 variants transparently — you do not need to pre-hash the message yourself.

Example

Request

Response Body


Error Responses