Skip to Content
KingsPay Docs
Payouts

Creating a Payout

Learn how to send a disbursement to a bank account, check the account first, and follow the payout until it completes.

Before you start

Make sure you already have:

  • An activated KingsPay account with disbursements and at least one payout method enabled. Contact the KingsPay team if they aren't enabled yet.
  • A secret API key with Payouts.Manage access. Send it as a Bearer token. See Authentication.
  • A webhook destination listening for payout events (payout.created, payout.processing, payout.succeeded, payout.failed).

Call POST /v1/payouts/inquiry to confirm the bank account exists and get the account holder name before you send money. Pass the payout_method you plan to use, if any, so the check goes through the same route as the payout. It needs the same Payouts.Manage access and is limited to 30 requests a minute per account.

curl -X POST "https://api.kingsplatform.net/api/api/v1/payouts/inquiry" \
  -H "Authorization: Bearer YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "payout_method": "bi_fast",
    "destination": {
      "type": "bank_account",
      "bank_account": {
        "bank_code": "bca",
        "account_number": "1234567890"
      }
    }
  }'

The response returns bank_code, account_number and account_holder_name. See the Inquiry Payout reference.

2. Create the payout

Call POST /v1/payouts. To retry safely, pass an Idempotency-Key header. See Idempotency. The request accepts the following fields:

FieldTypeDescription
payout_methodstring (optional)How the money is sent: bi_fast or rtol. Leave it out and KingsPay picks one. See Payout Methods.
amountnumberAmount to send, greater than 0. IDR amounts must be whole rupiah.
currencystringISO currency code, for example idr. It must be a currency the payout method sends.
destination.typestringUse bank_account.
destination.bank_account.bank_codestringBank code from Supported Banks.
destination.bank_account.account_numberstringRecipient account number, 1 to 34 digits.
destination.bank_account.account_holder_namestring (optional)If provided, it must match the name the bank has for the account, or the payout is refused.
client_reference_idstring (optional)Your own payout ID, up to 255 letters, digits and _ . : / -. Each value can be used once per account.

Example request

curl -X POST "https://api.kingsplatform.net/api/api/v1/payouts" \
  -H "Authorization: Bearer YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 4b4a0911-3d7d-43a0-9d1d-7a9d7de12c00" \
  -d '{
    "payout_method": "bi_fast",
    "amount": 1250000,
    "currency": "idr",
    "client_reference_id": "payout-20260304-0001",
    "destination": {
      "type": "bank_account",
      "bank_account": {
        "bank_code": "bca",
        "account_number": "1234567890",
        "account_holder_name": "PT Contoso Jaya"
      }
    }
  }'

If the request succeeds, the API returns the payout object, usually with status = "approved": the amount and fee have left your available balance and the transfer is queued. Sending can start right away, so the status may already be processing. Store the id and client_reference_id so you can reconcile later events.

Sending the same client_reference_id again returns 409 duplicate_client_reference_id and doesn't create a second payout. Retrying with the same Idempotency-Key returns the original response. Set at least one of them on every request so a retry after a timeout can't send the money twice.

3. Track the payout

Subscribe to payout events or poll GET /v1/payouts/{id} until the payout reaches a final status (succeeded, failed, rejected or returned). If it fails or is rejected before the money reaches the recipient, the amount and the fee come back to your balance.

See the Create Payout reference for the full schema, and Error Codes for every error the request can return.

On this page