Create Agent Disbursement
POST/v2/agent-disbursements
This is the endpoint for creating disbursement for Agent that has been verified.
Request
Header Parameters
Request content type application/x-www-form-urlencoded
Idempotency key. Please see more detail on Idempotent Request section
Request timestamp. The format will follow the ISO8601 format.
- application/x-www-form-urlencoded
Body
required
Agent’s ID from Agent Verificcation API.
The account number of the recipient.
The amount of money to be disbursed
Bank code of the recipient bank.
Possible values: [DOMESTIC_SPECIAL_TRANSFER, FOREIGN_INBOUND_SPECIAL_TRANSFER]
The direction of the transaction.
Remark to be included in the transfer made to the recipient. Usually will appear as berita transfer or remark in the transfer receipt
List of the recipient emails.
Responses
- 200
- 401
- 404
- 422
Create Special Disbursement Response
- application/json; charset=UTF-8
- Schema
- Example (from schema)
Schema
sender
object
{
"id": 10,
"user_id": 20,
"amount": 10000,
"status": "PENDING",
"reason": "asd",
"timestamp": "2017-08-28T14:32:47Z",
"bank_code": "bni",
"account_number": "1122333300",
"recipient_name": "John Doe",
"sender_bank": "bri",
"remark": "some remark",
"receipt": "asdasdasdsa",
"time_served": "0000-00-00T00:00:00Z",
"bundle_id": 0,
"company_id": 7,
"recipient_city": 391,
"created_from": "API",
"direction": "DOMESTIC_TRANSFER",
"sender": {
"sender_name": "John Doe",
"place_of_birth": 391,
"date_of_birth": "1992-01-01",
"address": "Some Address Street 123",
"sender_identity_type": "nat_id",
"sender_identity_number": "123456789",
"sender_country": 100252,
"job": "entrepreneur"
},
"fee": 1500,
"beneficiary_email": "test@mail.com,user@mail.com",
"idempotency_key": "idem-key-1"
}
Sample response when Your Flip api secret key value for Authorization is missing or invalid
- application/json; charset=UTF-8
- Schema
- Example (from schema)
Schema
{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"status": 401
}
Response when the agent Id is invalid
- application/json; charset=UTF-8
- Schema
- Example (from schema)
Schema
{
"name": "Not Found",
"status": 404,
"message": "Agent not found"
}
Sample error response
- application/json; charset=UTF-8
- Schema
- Example (from schema)
- Mising Required Fields
- Mising account_number Field
- Mising bank_code Field
- Mising amount Field
Schema
Array [
]
errors
object[]
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "account_number",
"code": 1001,
"message": "Account number cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "account_number",
"code": 1001,
"message": "Account number cannot be empty"
},
{
"attribute": "bank_code",
"code": 1001,
"message": "Bank code cannot be empty"
},
{
"attribute": "amount",
"code": 1001,
"message": "Amount cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "account_number",
"code": 1001,
"message": "Account number cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "bank_code",
"code": 1001,
"message": "Bank code cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "amount",
"code": 1001,
"message": "Amount cannot be empty"
}
]
}
Callbacks
- POST createAgentDisbursementCallback
POST/your-callback-url
Agent Disbursement callback will be sent to you if you transaction status is changed to DONE or CANCELLED. This callback is used for the V2 and V3 Disbursement. Please make sure that you have set the Transaction callback URL on the Flip for Business dashboard.
- application/x-www-form-urlencoded
Body
- PENDING: Disbursement is still in process
- CANCELLED: The transaction is cancelled and the amount of the transaction plus the transaction fee will be credited to your balance. This will happen if the transfer process are failed for reason such as inactive recipient account, wrong account number, etc
- DONE: Disbursement process is finished and the money have been sent to the recipient
- INACTIVE_ACCOUNT: Inactive account / Nomor rekening tidak aktif
- NOT_REGISTERED_ACCOUNT: Not registered account / Nomor rekening tidak terdaftar
- CANT_RECEIVE_TRANSFER: Can’t receive transfer / Rekening tujuan tidak dapat menerima transfer
- INTERMITTENT_DISTURBANCE_ON_BENEFICIARY_BANK: Intermittent disturbance on destination bank / Bank tujuan sementara mengalami gangguan
- BENEFICIARY_ACCOUNT_NOT_VERIFIED: Account is not verified / Rekening tujuan belum terverifikasi
- INSUFFICIENT_BALANCE: Insufficient deposit balance / Deposit tidak cukup
- EXCEEDED_TRANSACTION_AMOUNT_LIMIT Exceeded amount transaction limit / Batas transaksi melebihi jumlah
- DOMESTIC_TRANSFER: Common Disbursement from Indonesia to Indonesian recipient
- DOMESTIC_SPECIAL_TRANSFER: Special disbursement from the user of a Money Transfer Company residing in Indonesia to Indonesian recipient
- FOREIGN_INBOUND_SPECIAL_TRANSFER: Special disbursement from the user of a Money Transfer Company residing in a foreign country to Indonesian recipient
data
object
JSON array string with content exactly the same as the response of disbursement or bank account inquiry.
Flip’s transaction id
Your account user id in our system
The amount of money to be disbursed in IDR
Possible values: [DONE, CANCELLED]
Transaction status
The reason value will be given if the transaction status is CANCELLED.
The time when the disbursement request created. Time will be in GMT+7 with yyyy-mm-dd hh:mm:ss format
Bank code of the recipient bank
The account number of the recipient
The name of the recipient account holder. If the account number haven’t cached by Flip yet, this attribute will show - (dash) instead
The default sender bank in your account
Remark to be included in the transfer made to the recipient
Url of the transfer receipt. The receipt will be a screenshot taken from the internet banking interface of each bank. This attribute will only show the url when the status is DONE
The time when the transaction is finished. Will only show valid value when the status is DONE
The bundle id of the transaction made from Flip for Business Dashboard (csv upload or manual input). For the transaction created from API, the value will always be 0
Your Flip for Business account user id in our system
The channel of which the transaction was created
The direction of the transactions.
sender
object
Possible values are null if the transaction is a common disbursement, and sender object if the transaction is a special disbursment.
The name of the user of the Money Transfer Company that act as a sender
City/country code of the Sender’s place of birth
Sender’s date of birth
Sender’s address
Sender’s identity type
Sender’s identity number
Country code of the Sender’s country
Sender’s job
The fee of the transaction
List of the recipient emails
The idempotency key used to create the disbursement
Validation token to ensure that the callback is coming from our server. You can get your token in your Flip for Business dashboard.
Callbacks Responses
- 200
URL must return a 200 HTTP Status Code. If the URL returns another HTTP Status Code or if our system doesn’t receive any response within 30 seconds (timeout), our system will retry the request 5 times, with a 2-minute interval for the transaction callback (Money Transfer, Accept Payment, International Transfer).