Skip to main content
This guide takes you from application credentials to a completed P2P transfer in the sandbox. It uses the real endpoints and request shapes, with placeholder values you replace.

Prerequisites

  • A registered application with sandbox credentials: clientId, clientSecret, and apiKey.
  • The base URL https://api.zeam.money/gw/v1 (shared by sandbox and production).
  • A server-side environment to hold credentials and make requests.
  • At least one wallet in your association (create one with POST /v1/wallets).
  • Optional: an https webhook endpoint for asynchronous updates.
Throughout, replace YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, YOUR_ACCESS_TOKEN, and YOUR_APP_SECRET with your own values.

Authenticate

Exchange your client ID and secret for a bearer token. This route is public, so it does not take the x-zeam-auth header.
cURL
Response
Keep the accessToken. The association is resolved server-side from the token, so every protected request sends only two headers:
Common errors: 401 means the client ID or secret is wrong; 400 means the body is missing a field. See Authentication.

List your wallets

Retrieve the wallets available to your association and pick a source. For an own transfer, pick a second wallet as the destination.
cURL
Response
Each wallet exposes its id, publicKey, and best-effort on-chain balances. Use the id values as walletId and destinationWalletId below.

Send a P2P transfer

Create a same-asset transfer between two of your own wallets with POST /v1/payments/p2p/own. Supply the source walletId, destinationWalletId, and sendingAssetCode (a bare asset code — the gateway resolves the issuer). To pay a registered beneficiary instead, use POST /v1/payments/p2p/beneficiary with beneficiaryId and paymentDestinationId.
cURL
202 Accepted
A P2P transfer runs asynchronously. The 202 means it was queued, not settled. Keep the transactionRecordId to track it. Reusing the same idempotencyKey returns the original result with isIdempotent: true.

Confirm the outcome

Retrieve the transaction to see its current status.
cURL
Response
Rather than polling in a loop, subscribe to webhooks: Zeam sends IntentSuccessful on success and IntentFailed on failure. Reconcile the event against this transaction by transactionRecordId (or your externalReference). You can also re-list your wallets to see the updated balances.

Multi-operation transfers

To send multiple same-asset transfers between your own wallets in one atomic Stellar transaction, use POST /v1/payments/p2p/own/multi. All legs settle or fail together under a single transactionRecordId, intent, and webhook lifecycle. Supply the shared idempotencyKey, transactionId, externalReference, optional memo, and a transfers[] array where each entry has walletId, destinationWalletId, sendingAssetCode, and amount. For non-P2P operations (/swap and /offramp), submit each individually and reconcile by its own transactionRecordId.

Next steps

Off-ramp testing

Simulate successful and failed off-ramps in the sandbox.

Webhooks

Receive lifecycle events instead of polling.

API reference

Full request and response shapes for each endpoint.

Moving to production

Promote your application when you are ready.