English
API ReferenceSign In

Create Payout

Last updated 09/20/2021

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:

  1. 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.
  2. Payout link limit is 24 hours. If there is no claim in 24 hours after payout creation, the payout link will be expired.
  3. 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 PlatformBenefitsTrade-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:

  1. Login to your Xendit dashboard
  2. Go to Send Payments > Payouts
  3. Click "Create Payout" to create a payout and use the information below as your guide
FieldWhat to Fill
External IDUnique 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
AmountThe total amount of money you want to disburse in IDR
EmailEmail 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:

  1. Follow the instruction in Xendit API Reference on Create Payout section to start creating your payout via API
  2. Setup your Disbursement Callback URL in Xendit Dashboard for "Disbursement sent"

Example of Create payout via API

<?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:

  1. Create a payout with the amount of IDR 90,000 (via Dashboard or API)
  2. Claimed your payout in the payout link and input the secret password
  3. Go to your Payouts tab in Xendit dashboard
  4. 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:

StatusDescription
PendingPayouts has been successfully created and payout link has been sent to the recipient email. At this point, the disbursement has not been initiated
ClaimedThe recipient has successfully claimed the payouts and disbursement is initiated
CompletedFunds successfully disbursed to the recipient bank account
FailedThe payout has failed. Reasons can vary from expiring without being claimed, locking due to password failures, to an issue with the bank disbursement
VoidedThe payout has been voided. This issue is raised because the payout has been expired or manually voided by hitting the void endpoint