Disbursements
Send payments to recipients programmatically via the Payouts API. Some use cases may include:
- Vendor and supplier payments
- Employee reimbursements
- Partner commissions
- Customer refunds to external accounts
The noticeable difference between withdrawals is that on disbursements, the destination object is setup by the merchant manually on the request body. This destination is the recipients bank account that is not registered in Martis.
Creating a Disbursement
curl https://core-api.qpsolution.com/v1/payouts \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"client_reference_id": null,
"amount": 1,
"currency": "",
"destination": {
"type": "",
"bank_account": {
"bank_code": "",
"account_number": "",
"account_holder_name": null
}
},
"description": null,
"payout_method": ""
}'
Batch Disbursements
For multiple disbursements, iterate through recipients with separate API calls. Use the client_reference_id field to track each disbursement against internal records.
# Disbursement 1
curl -X POST `https://api-staging.martis.id/api/v1/payouts` \
--header 'Authorization: Bearer {API_KEY}' \
--data '{"amount": 100000, "currency": "idr", "destination": {...}}'
# Disbursement 2
curl -X POST `https://api-staging.martis.id/api/v1/payouts` \
--header 'Authorization: Bearer {API_KEY}' \
--data '{"amount": 150000, "currency": "idr", "destination": {...}}'
Any batch payments or payouts are considered Idempotent in the Martis's Core API service.