Create Payout
POST /payouts/create
Creates a payout request
The endpoint creates a Transaction
object
Request Body
tenant_id
string
REQUIRED
The ID of the Tenant that originated the payout transaction.
Example value: ten_0521aadc-5fbd-4b3c-af0a-a4f4b8d6f20a
amount
integer
REQUIRED
The amount of money, in the smallest denomination of the currency indicated by currency, including the values after the decimal separator. For example, when currency is USD, amount is in cents. $10.00 USD is 1000.
Example value: 10000
destination_account_id
string
REQUIRED
The ID of the account where the funds from this transaction will be deposited.
Example value: acc_7985e8a4-8f38-4eab-8b27-a5d1c6dbf340
currency
string
REQUIRED
The type of currency, in ISO 4217 format. See Currency for values. For example, the currency code for US dollars is USD.
Example value: USD
description
string
The description of this transaction. Visible from Portal and API.
Example value: Insurance policy renewal - INV12324
primary_reference
string
An optional primary ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters.
Example value: ABC123
secondary_reference
string
An optional secondary ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters.
Example value: bj39fhow39fhqp3f0hfae4344
metadata
string
Set of key-value pairs that you can attach to an object. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long.
Example value: {"order_id": "6735"}
curl --location 'https://api.druo.com/payouts/create' \ --header 'DRUO-Version: 2021-11-22' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ACCESS_TOKEN' \ --data '{ "tenant_id": "ten_35516d40-ca41-4fa3-885c-d13d0ccdae0a", "amount": 20000, "destination_account_id": "acc_b7c41206-afb4-4954-a15c-dbcd59356120", "currency": "USD" }'
Response Fields
uuid
string
The Transaction’s UUID.
Example value: trx_422f0f81-5001-4cce-a229-242d9ab9960a
code
string
The Transaction’s code.
Example value: TXNMW9PCWE
status
string
The Transaction’s status.
Example value: SUCCESSFUL
remarks
string
The Transaction’s remarks.
Example value: INSUFFICIENT_FUNDS
tenant
object
The ID of the Tenant that originated the transaction.
Example value:
{"uuid": "ten_0521aadc-5fbd-4b3c-af0a-a4f4b8d6f20a"}
creation_source
string
The creation source of the Transaction.
Example value: MERCHANT_API
destination_account
object
The ID of the destination account.
Example value:
{"uuid": "acc_0521aadc-5fbd-4b3c-af0a-a4f4b8d6f20a"}
type
string
The type of Transaction.
Example value: PAYOUT
amount
integer
The amount of money, in the smallest denomination of the currency indicated by currency, including the values after the decimal separator. For example, when currency is USD, amount is in cents. $10.00 USD is 1000.
Example value: 10000
currency
object
The type of currency, in ISO 4217 format. See Currency for values. For example, the currency code for US dollars is USD.
Example value: {"code": "USD"}
description
string
The description of this transaction. Users may see this description (e.g., in email receipts DRUO sends on your behalf).
Example value: Insurance policy renewal - INV12324
primary_reference
string
An optional primary ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters.
Example value: ABC123
secondary_reference
string
An optional secondary ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters.
Example value: bj39fhow39fhqp3f0hfae4344
metadata
string
Set of key-value pairs that you can attach to an object. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long.
Example value: {"order_id": "6735"}
decline_reason
string
The reason behind a transaction being declined.
Example value: INSUFFICCIENT_FUNDS
date_created_gmt
string
Transaction created date
Example value: 2021-11-15T23:23:38
date_updated_gmt
string
Transaction updated date
Example value: 2021-11-15T23:23:38
net_amount
integer
The Transaction’s net amount:
Example value: 20400
fixed_fee
integer
The Transaction’s fixed fee.
Example value: 0
total_fee
integer
The Transaction’s total fee.
Example value: 400
variable_fee
integer
The Transaction’s variable fee.
Example value: 400
{ "payout": { "uuid": "trx_1cb6a2ab-2351-436b-99df-e00fd9b9cf6a", "code": "TIWQVAVG9AA", "status": "PENDING", "remarks": null, "tenant": { "uuid": "ten_35516d40-ca41-4fa3-885c-d13d0ccdae0a" }, "creation_source": null, "type": "PAYOUT", "amount": 1, "currency": { "code": "COP" }, "description": "This is a payout 123", "primary_reference": "primary 123", "secondary_reference": "secondary 123", "metadata": { "key1": "value1", "key2": "value2", "key3": "value3" }, "decline_reason": null, "date_created_gmt": "2023-05-24T10:40:06.474Z", "date_updated_gmt": "2023-05-24T10:40:06.474Z", "net_amount": null, "fixed_fee": null, "total_fee": null, "variable_fee": null } }