public-api:partner:payouts:create must be granted separately from the default scopes. The commands use request.mjs from the quickstart. Run the write examples on a test installation. Manage API access
Display the referral link, balance, and earnings
result.statistics.exchanges.by_currency and result.statistics.payouts.by_currency from the profile or statistics response. The aggregate paid_amount and pending_amount can be "0" with a null currency when payouts in that status span multiple or unknown currencies. Read the current available balance from result.balance.available.
For a filtered report, use the list endpoints. Each meta.summary covers the entire filtered result set before pagination.
- Earnings.
meta.summary.totalcounts every nonzero ledger entry. The monetary summary inmeta.summary.by_currencyincludes confirmed positive earnings that have not been reversed. History also includes pending entries and reversals withis_reversal: true.reversal_of_idpoints to the original entry when the link is available. An earnings entry for a hidden order can haveorder: null. - Payouts.
meta.summarycontainstotal,pending,paid, andrejectedcounts. To calculate monetary totals with the same filters, sumresult[].amount.requestedacross all pages bystatusandcurrency.code. Use exact decimal arithmetic and keep a separate bucket for unknown currency.
filter[order_id], the numeric string filter[order_public_id], or the tracking string filter[order_tracking_id]. In the payout list, filter[public_id] matches the legacy numeric reference as a string. Save result[].id to look up individual payouts. filter[created_from] and filter[created_to] include the specified creation dates, so a payout date range selects when requests were created.
Start with pagination=cursor. Cursor sorting supports sort=id and sort=-id and defaults to -id. Pass meta.pagination.next_cursor as cursor with the same filters and sorting until the list ends. Response format and pagination
Preview a payout
- Call GET /private/partner/payout-methods with
public-api:partner:payouts:read. Takecurrency_idfromresult.methods. Pass the destination inwalletas a string of 2 to 191 characters. Usewallet.mask,wallet.min_length, andwallet.max_lengthas form hints. Preview checks the destination against the exchanger’s configured validators. - Check
result.balance.can_request. This flag indicates a positive available balance that meets the minimum payout. Passamountas a decimal string inresult.balance.currencybetweenminimum_payoutandavailable, inclusive. The amount must be positive and fitresult.balance.precisionwithout discarding nonzero digits. The format allows up to 30 digits before the decimal point and up to 18 after it. To request the full available balance, omitamountor passnull. - Call POST /private/partner/payouts/preview with the same scope. Preview validates the method, amount, and destination while leaving the balance available. The exchanger recalculates the terms when you submit the payout.
payout.json. Replace currency_id and wallet with values from your test installation.
payout.json
200 response for a test conversion from XTS to XPT, with a 10% fee and a fixed fee of 0.75 XPT.
amount.base as the debit in the base currency and amount.requested as the payout in currency.code. The exchanger deducts the percentage fee in the base currency, converts the remainder, deducts the fixed fee in the payout currency, and rounds the result HALF_UP to the method’s precision. Display the amounts returned by the exchanger.
Submit the payout request and save its ID
After the partner approves the amount and destination, send POST /private/partner/payouts withpublic-api:partner:payouts:create. Before the first attempt, save the body and a unique Idempotency-Key of 8 to 191 ASCII letters, digits, or ., _, :, and -. Include the key in the signing string.
201 response includes result.payout.id, result.payout.status: "pending", and result.replayed: false. The exchange deducts the base amount from the available balance when the request is created. pending means it has been accepted for processing.
If you lose the response, submit the same body and key with a fresh HMAC signature from the same integration. Rotating an API key preserves that integration. Issuing a separate key creates a different integration, even for the same account. A replay can return the stored 201 with Idempotency-Replayed: true, or 200 with result.replayed: true if the response was reconstructed from the saved payout request. Use the returned ID to read the current status. For 409 idempotency_conflict, check the original request body. Retry a request
Read payout status
Call GET /private/partner/payouts/ withpublic-api:partner:payouts:read. Use the numeric result.payout.id from the creation response. A missing payout or a payout belonging to another account returns 404.
Check
status before reading confirmation_required. Email confirmation sets result.payout.verified_at. The payout stays pending until it is processed. Older records can have an empty amount.base_currency and a null currency or currency.code. Treat these as unknown currencies.
For 422 validation_failed, check the available methods and balance again, then verify the amount, precision, and destination format. For 422 invalid_idempotency_key, check the Idempotency-Key header on creation. For 403 scope_denied, check the scope of the specific operation. Error responses · API reference
Prompt for your coding agent
Build a partner report
Build a partner report