Skip to main content
The challenge endpoint is the first step of wallet-based authentication on Pay3. Send your Stellar public key and receive a one-time, nonce-bound message that you must sign with your wallet’s private key using Freighter (or any compatible Ed25519 signer). The signed message is then submitted to POST /api/auth/verify to complete sign-in and establish a session.

Endpoint

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

Request Body

string
required
Your Stellar Ed25519 public key, beginning with G. Must be a valid Stellar account address (56-character StrKey-encoded key).Example: GAHJJJKMOKYE4RVPZEWZTKH5FVI4PA3VL7GK2LFNUBSGBV8XVMHXV6R

Response

All Pay3 API responses are wrapped in a standard envelope:
A successful 200 OK response returns a challenge object inside data. Pass the message field to your wallet signer, then send the resulting signature along with the nonce to the verify endpoint.
object
The challenge payload.
string
A unique identifier for this API request, useful for support and debugging.
Challenges expire 5 minutes after issuance. If your user takes longer than that to sign, request a fresh challenge. Each new request for the same wallet address automatically invalidates any previously unconsumed challenge for that address.

Example

Request

Response Body


Error Responses