Creating Disbursements

Flow for Creating Disbursements

1. Make sure that you have enough funds in your Xfers account

Before making any disbursements, check that you have sufficient funds in your Xfers account by logging into the Xfers Dashboard.

If there isn't enough funds, make a deposit by following the instructions you get from the dashboard Deposit flow.

2. Request for a Disbursement, it's that simple!

Create a disbursement by calling the Payout API with the following parameters:

  • amount
  • referenceId
  • description
  • disbursementMethod
curl https://www.xfers.com/api/v4/disbursements/ \
  --header 'content-type: application/vnd.api+json' \
  -u test_xxxx:password \
  -d '
  {
    "data": {
      "attributes": {
        "amount": 1000,
        "referenceId": "order_id_123456",
        "description": "Your delivery payout.",
        "disbursementMethod": {
          "type": "bank_transfer",
          "bankShortCode": "DBS",
          "bankAccountNo": "0102030405"
        }
      }
    }
  }
'

3. Xfers notifies you of the status of the Payout via callbacks

Once the disbursement status is confirmed, Xfers will notify your platform with callbacks that will notify you of the status of the Disbursement.

If you have not, make sure to set callback URLs on the Xfers Dashboard Callback Settings page.

{
  "data": {
    "id": "contract_4a2d252b059f4d13ab3568dd5ce3c344",
    "type": "disbursement",
    "attributes": {
      "referenceId": "order_id_123456",
      "description": "Your delivery payout.",
      "amount": "1000",
      "status": "completed",
      "createdAt": "2020-08-20T10:19:49+08:00",
      "fees": "0.20",
      "disbursementMethod": {
        "type": "bank_transfer",
        "bankAccountNo": "0102030405",
        "bankShortCode": "DBS"
      }
    }
  }
}

Did this page help you?