Skip to Content
Docs

Settlement account routing

Route transactions to a specific settlement account by passing the settlement_account parameter in your API request.

When you operate multiple settlement accounts, pass settlement_account in your API request to choose the account yourself. Pay.com sends the transaction to that settlement account without applying your routing rules, and records the routing methodology as merchant_provided.

When to choose the account yourself

Pass settlement_account when your backend already knows which acquirer to use for a transaction. Common cases:

  • Contractual obligations: certain transactions must settle through a specific provider regardless of routing logic.
  • Your own routing logic: your code decides the account, for example to keep a customer's repeat payments on the account that approved their first one.

To route by conditions, percentages, and fallbacks without code, use routing rules in the Pay.com dashboard instead. A settlement_account in the request takes precedence over them.

Supported resources

The settlement_account parameter is accepted when creating the following resources:

ResourceEndpointUse case
ChargePOST /v1/chargesRoute a payment to a specific acquirer
HoldPOST /v1/holdsAuthorize funds through a specific acquirer
Payment methodPOST /v1/payment_methodsVault a payment method against a specific account
Payment method verificationPOST /v1/payment_methods/{id}/verifyVerify a saved card through a specific account
Payment sessionPOST /v1/sessions/paymentBook the session's payment to a specific account
Setup sessionPOST /v1/sessions/setupUse a specific account for the session
PayoutPOST /v1/payoutsSend funds through a specific acquirer

Requirements

Before you begin, make sure you have the following:

  • An sk-pay-com-sandbox- API key for https://api.sandbox.pay.com/v1 (see authentication).
  • At least two settlement accounts configured in your workspace. Go to Settings → Settlement Accounts to verify.

Route a transaction

Find the ID of the account you want, pass it in your request, and check which account processed the transaction.

  1. 1

    Find your settlement account ID

    Go to Settings → Settlement Accounts in the Pay.com dashboard. Each configured account displays its ID, sa_ followed by 18 to 20 digits (for example, sa_296645958265997349).

    Settlement accounts page in the Pay.com dashboard showing account IDs

    Copy the ID of the settlement account you want to route transactions to. You'll pass this value as the settlement_account parameter in your API requests.

    If you pass a settlement_account ID that doesn't exist or isn't connected to your workspace, the API returns HTTP 400 with the message Settlement account id is invalid. Check the ID in Settings → Settlement Accounts before you use it in requests.

  2. 2

    Pass settlement_account in your request

    Include the settlement_account parameter in your request body when creating a transaction. The following example creates a charge for $80.00 (amount is in minor units) and routes it to settlement account sa_296645958265997349.

    curl -X POST https://api.sandbox.pay.com/v1/charges \
      -u ':sk-pay-com-sandbox-…' \
      -H "Content-Type: application/json" \
      -H "idempotency-key: $(uuidgen)" \
      -d '{
        "amount": 8000,
        "currency": "usd",
        "source_data": {
          "type": "card",
          "card": {
            "number": "4242424242424242",
            "expiry_month": "12",
            "expiry_year": "2028",
            "cvv": "123",
            "name": "John Smith"
          }
        },
        "settlement_account": "sa_296645958265997349"
      }'

    The same pattern works for holds, payment methods, payment method verifications, payment sessions, setup sessions, and payouts. Add the settlement_account field to the request body, and Pay.com routes the resource to that account. If the account is disabled, Pay.com declines the payment instead of choosing another account.

    For a payout to a stored payment method that is bound to a settlement account, settlement_account must match that account. Otherwise the API returns HTTP 400 with the message settlement_account does not match the account this payment method is bound to.

  3. 3

    Verify the routing

    Confirm that the transaction was processed through the correct settlement account. There are three ways to verify:

    • API response: check underlying_processing_details.settlement_account in the response body. It confirms which account handled the transaction, and routing_details.selected_methodology is merchant_provided.
    • Webhooks: listen for events like charge.succeeded or hold.requires_capture. The webhook data field contains the full resource object, including underlying_processing_details.settlement_account. See webhook events for the full list of events.
    • Dashboard: go to Activity → Transactions and check the Settlement Account column, or select the transaction to see its details.

    The API response and the webhooks carry underlying_processing_details only when processor details are enabled for your account. Contact your Pay.com account team to enable them.

Next steps

Was this page helpful?