G... address. Deposits deliver only to the owner, and withdrawals and sends spend only from it. The API learns the owner from the bearer token on each request.
There are two ways to get a token.
SEP-10
SEP-10 is Stellar’s standard web authentication. Your app asks for a challenge transaction, the user’s wallet signs it, and the API returns a JWT.1
Ask for a challenge
transaction (a base64 XDR challenge) and network_passphrase.2
Sign it with the user's wallet
3
Exchange it for a token
{ "token": "<JWT>" }.Authorization: Bearer <token>. With the SDK, return it from getToken:
Privy access token
If your app signs users in with Pesa’s Privy app, send the Privy access token as the bearer token. The API checks the token’s ES256 signature and looks up the user’s linked Stellar wallet. Only the embedded Privy Stellar wallet counts as the owner.Public routes
GET /v1/routes and the SEP-10 endpoints need no token. Everything else returns 401 without one.