Xtrm API · v4.92.6

Pay everyone you work with from one wallet.

Freelancers, partners, suppliers, whole teams. Xtrm is a global payment platform, and with the Xtrm API you fund one wallet and pay them all with a single request.

That request is a batch. One batch can carry as many payments as your account allows, mix individuals and businesses, and pay each one the way that suits whoever receives it: straight to their Xtrm wallet or bank account, onto a prepaid debit card or digital gift card, to a card with Rapid Transfer, or by mailed check in the US.

You stay in the loop, too. Xtrm checks every payment's details the moment you submit the batch and tells you right away which ones it accepted. From there, webhooks and status calls keep you posted on every payment.

Payments and currency exchange are executed by regulated financial partners.

#Pay for your company, or for your clients

Paying your own recipients? Use your own API credentials and start with the Quickstart.

Running payments for other companies? As a managing platform, you make the same calls with each client company's pseudo credentials, so one integration serves every client. Pseudo credentials require manager services, which Xtrm turns on for your company. Start with How managing platforms work.

#Why use batch payments

  • One request, many payments. Pay individuals and businesses in the same batch, each by the method that suits them. See Payment methods & destinations.
  • Every payment checked first. Xtrm checks each payment's details before any money moves, so fewer payments fail.
  • Wallet-first delivery. Every payment goes through the recipient's Xtrm wallet on its way to their bank, card or other destination, so every payment takes the same path and is easy to reconcile.
  • Wallets picked for you. Leave out the wallet and Xtrm pays into the recipient's wallet in the batch currency, and creates one if they don't have it yet.
  • Your IDs, end to end. You name every batch and payment with your own IDs, and they come back in every response and webhook.
  • Tracking built in. Signed webhooks and status calls tell you where every payment stands.

#How a batch payment works

Every batch payment integration follows the same six steps. Each one links to the page that covers it in depth.

  1. Authenticate

    Exchange your client ID and secret for an access token at /oAuth/token, then send it as Authorization: Bearer <access_token> on every call. See Authentication.

  2. Fund your source wallet

    Every batch is paid from one of your company wallets, its SourceWalletId, and that wallet sets the currency of the whole batch. Check balances with GetCompanyWallets, fund the wallet by bank transfer, bank debit or credit card, and exchange currency when you need to. See Fund your wallet.

  3. Add recipients

    Each payment goes to a RecipientId: an existing individual recipient (PAT…) or business recipient (SPN…) account. Look up or create your recipients, and link the bank accounts or cards you want to pay to. Linking needs a connection to the recipient, which your company has with every recipient it creates.

  4. Submit the batch payment

    Put all the payments in one BatchTransfer request (POST /API/v4/Fund/BatchTransfer). Each item names a RecipientId, an Amount (a JSON number), a SendMethodId and a Destination whose fields depend on that method. A batch holds up to your account's item limit. 202 Accepted means Xtrm accepted the payments that passed its checks for processing. The status endpoints show which payments were stored, and nothing is debited until Xtrm processes each one. You can have several batches in flight. See Create a batch payment.

  5. Track every payment

    Xtrm processes the accepted payments in the background. Check the status of the batch or of a single payment, with history=true to include every attempt. Xtrm can also notify your server with webhooks signed with HMAC-SHA256, on one endpoint per company account that Xtrm support sets up with you; see Enable webhooks. Confirm each payment's final status with the status endpoints. See Batch and payment statuses.

  6. Reconcile and retry

    Match the CustomerBatchId and CustomerTransactionId in each response and webhook to your own records. Every payment ends in one of three statuses:

    • Success: the provider accepted the payment or, for a wallet payment, Xtrm credited the wallet.
    • RetainedInWallet: Xtrm has credited the money to the recipient's Xtrm wallet and is delivering it on. Bank, card, check, gift card and prepaid payments pass through this status, usually only briefly, on their way to Success, so don't act on it while the batch is still Processing. A payment that is still RetainedInWallet once the batch status is final has stuck: the delivery didn't go through, the money stays in the recipient's Xtrm wallet, and the fee isn't refunded. Treat it like a wallet payment: the recipient transfers it out in the Xtrm web app, or, if your company is connected to the recipient, you request that transfer for them with their one-time password. You can't retry it as a batch payment. Webhook events never carry this status: a delivery that didn't go through arrives as a Batch.Item.Completed event with Status Success and DeliveryType Wallet (see Events for a delivery to the destination). See When a payment stays RetainedInWallet.
    • Failed: the payment's latest attempt (with history=true) carries an ErrorCode such as INSUFFICIENT_BALANCE. To retry it once you've fixed the cause, resubmit it under its original CustomerBatchId and CustomerTransactionId; it gets a new AttemptNo and keeps its earlier attempts.

    Batch and payment statuses says what to do for each status and error code, and Retries & idempotency covers resubmitting safely.

#Your first batch payment

Every call starts with an access token. Set XTRM_CLIENT_ID and XTRM_CLIENT_SECRET to the sandbox credentials from your Xtrm dashboard (Settings → Integrations → Get Credentials), then run:

curl -X POST "https://xapisandbox.xtrm.com/oAuth/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "Accept: application/json" \
  --data-urlencode "grant_type=password" \
  --data-urlencode "client_id=$XTRM_CLIENT_ID" \
  --data-urlencode "client_secret=$XTRM_CLIENT_SECRET"

Copy the access_token from the response into XTRM_ACCESS_TOKEN. This batch payment pays a business recipient by ACH bank transfer and an individual recipient with a prepaid debit card, both from wallet 122181. It assumes both recipients exist and the bank account is linked to the business recipient: Pay individual recipients, Pay business recipients and Bank accounts & transfers cover those steps. Replace the account numbers, wallet ID, destinations and IDs with your own sandbox values. CustomerBatchId values are shared across all Xtrm accounts, so make yours unique, for example by including your account number or a UUID.

curl -X POST "https://xapisandbox.xtrm.com/API/v4/Fund/BatchTransfer" \
  -H "Authorization: Bearer $XTRM_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "IssuerAccountNumber": "SPN1111222",
  "SourceWalletId": 122181,
  "CustomerBatchId": "BATCH-HOME-0001",
  "Items": [
    {
      "CustomerTransactionId": "TXN-HOME-0001",
      "RecipientId": "SPN8888777",
      "Amount": 100,
      "Destination": {
        "BeneficiaryBankID": "41953ec32f3e4765a35a902c82bdd995",
        "BeneficiaryBankPaymentMethod": "ACH"
      },
      "SendMethodId": "XTR94500",
      "Description": "TXN-HOME-0001 Q3 Executive Sales Performance Incentive"
    },
    {
      "CustomerTransactionId": "TXN-HOME-0002",
      "RecipientId": "PAT9999888",
      "Amount": 50,
      "Destination": {
        "Email": "[email protected]",
        "SKU": "PREP9001"
      },
      "SendMethodId": "XTR94503",
      "Description": "TXN-HOME-0002 Q3 Top Performer Contractor Reward"
    }
  ]
}'

When at least one payment passes its checks, Xtrm responds with 202 Accepted and a BatchTransferResponse that echoes your CustomerBatchId and counts the accepted and rejected items in ItemsCount. From there, follow the batch with webhooks or the status endpoints. The Quickstart walks through the whole flow.

#Environments

EnvironmentAPI base URLUse it for
Sandboxhttps://xapisandbox.xtrm.com/API/v4Building and testing. It works the same as production, with test data only, and no real money moves.
Productionhttps://xapi.xtrm.com/API/v4Live payments with real funds.

See Sandbox & environments for sandbox access, IP allowlisting and moving to production.

#What's new

  • Batch payments (4.92.4). BatchTransfer pays many recipients from one wallet in a single request. Two GET endpoints return the status of a batch and of a single payment, including the history of every attempt.

See the full changelog.

Need help?

Email [email protected] for sandbox access, IP approval and integration questions. See Support for what to include in a request.