Create Payout
Creating a payout is simple and easy. You can choose to create it via your dashboard, or via API. All of your payouts will be displayed on the dashboard along with their status and details.
Payouts Rules
Before you create a payout, there are some rules you need to understand:
- Once you created a payout, you can’t change any details of the payout. Should you wish to cancel the payout, you can do so by clicking “Void” in the said payout page from Xendit Dashboard or hitting our Void Payout API.
- Payout link limit is 3 days. If there is no claim in 3 days after payout creation, the payout link will be expired.
- Your payout will be marked as failed if there are 3 wrong secret password input at the point of payout claim.
Create Payouts
You can create payouts via Xendit Dashboard or API depending on what might suit your business needs. Below are the the overview you may want to consider when choosing between the two options:
Payout Creation Platform | Benefits | Trade-offs |
---|---|---|
Dashboard | - Doesnt require technical integration - Create payouts anywhere and anytime as long as you have access to Xendit dashboard - Step-by-step payouts creation is easy to understand | Payouts creation is done manually (can't be automated) |
API | - Payouts creation is automated via API - Create payouts within seconds - User Interface can be customized based on your business needs | Requires developer resources for technical integration |
Create Payouts via Dashboard
To create an payout via dashboard, you Account User should have at least EDIT permission. Follow these steps to create an payout via Xendit dashboard:
- Login to your Xendit dashboard
- Go to Send Payments > Payouts
- Click "Create Payout" to create a payout and use the information below as your guide
Field | What to Fill |
---|---|
External ID | Unique identifier of a payout in your system. There are no character restrictions for External ID. Create your identifier as you like but make sure to create one that is as unique as possible for your business Sample: HOUSE.AP/INV/XXV/341293TPR0004XJEDBDIEFDJIAGDY |
Amount | The total amount of money you want to disburse in IDR |
Email address of the payout recipient. We will send them an email with the password for them to claim the payout |
After you create a payout, an email will be generated and sent to the Recipient Email. This email contains instructions, a password, and a link to the payout UI.
Create Payouts via API
Follow these steps to create an payout via API:
- Follow the instruction in Xendit API Reference on Create Payout section to start creating your payout via API
- Setup your Disbursement Callback URL in Xendit Dashboard for "Disbursement sent"
Example of Create payout via API
- PHP
- Node.js
- Java
- Go
- Python
<?php
use Xendit\Xendit;
require 'vendor/autoload.php';
Xendit::setApiKey('xnd_development_P4qDfOss0OCpl8RtKrROHjaQYNCk9dN5lSfk+R1l9Wbe+rSiCwZ3jw==');
$params = [
'external_id' => 'demo_2392329329',
'amount' => 23000
];
$createPayout = \Xendit\Payouts::create($params);
var_dump($createPayout);
?>
const x = new require('xendit-node')({ secretKey: 'xnd_development_P4qDfOss0OCpl8RtKrROHjaQYNCk9dN5lSfk+R1l9Wbe+rSiCwZ3jw==' });
const { Payout } = x;
const payoutSpecificOptions = {};
const p = new Payout(payoutSpecificOptions);
const resp = await p.createPayout({
externalID: 'demo_2392329329',
amount: 23000,
email: 'demo@xendit.co'
});
console.log(resp);
Xendit.apiKey = "xnd_development_P4qDfOss0OCpl8RtKrROHjaQYNCk9dN5lSfk+R1l9Wbe+rSiCwZ3jw==";
try {
Map<String, Object> params = new HashMap<>();
params.put("external_id", "demo_2392329329");
params.put("amount", 23000);
params.put("email", "demo@xendit.co");
Payout payout = Payout.createPayout(params);
} catch (XenditException e) {
e.printStackTrace();
}
xendit.Opt.SecretKey = "xnd_development_P4qDfOss0OCpl8RtKrROHjaQYNCk9dN5lSfk+R1l9Wbe+rSiCwZ3jw=="
createData := payout.CreateParams{
ExternalID: "demo_2392329329",
Amount: 23000,
Email: "test@email.com",
}
resp, err := payout.Create(&createData)
if err != nil {
log.Fatal(err)
}
fmt.Printf("created payout: %+v\n", resp)
from xendit import Xendit
api_key = "xnd_development_P4qDfOss0OCpl8RtKrROHjaQYNCk9dN5lSfk+R1l9Wbe+rSiCwZ3jw=="
xendit_instance = Xendit(api_key=api_key)
Payout = xendit_instance.Payout
payout = Payout.create(
external_id="payout-1595405117",
amount=50000,
email="test@email.co",
)
print(payout)
Testing Payouts
Test payouts via amount by following these simple steps:
Create a payout with the amount of IDR 90,000 (via Dashboard or API)
Claimed your payout in the payout link and input the secret password
Go to your Payouts tab in Xendit dashboard
Wait 10 minutes and Payout status will be changed to “Completed”
Please note that the testing will only trigger after you have inputted the secret passkey from your email in the payout link. You may also find the testing scenarios based on the Disbursements Testing simulation.
Payouts Statuses
To enhance your experience, Xendit Payouts has its own status that will help you to easily identify which payouts is already completed, claimed, or failed/voided. These are the possible statuses payouts can have:
Status | Description |
---|---|
Pending | Payouts has been successfully created and payout link has been sent to the recipient email. At this point, the disbursement has not been initiated |
Claimed | The recipient has successfully claimed the payouts and disbursement is initiated |
Completed | Funds successfully disbursed to the recipient bank account |
Failed | The payout has failed. Reasons can vary from expiring without being claimed, locking due to password failures, to an issue with the bank disbursement |
Voided | The payout has been voided. This issue is raised because the payout has been expired or manually voided by hitting the void endpoint |