You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use the APIs below to interface with Xendit's PayoutApi.
To start using the API, you need to configure the secret key and initiate the client instance.
API to cancel requested payouts that have not yet been sent to partner banks and e-wallets. Cancellation is possible if the payout has not been sent out via our partner and when payout status is ACCEPTED.
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
useXendit\Configuration;
useXendit\Payout\PayoutApi;
Configuration::setXenditKey("YOUR_API_KEY_HERE");
$apiInstance = newPayoutApi();
$id = "disb-7baa7335-a0b2-4678-bb8c-318c0167f332"; // string | Payout id returned from the response of /v2/payouts$for_user_id = "5f9a3fbd571a1c4068aa40ce"; // string | The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information.try {
$result = $apiInstance->getPayoutById($id, $for_user_id);
print_r($result);
} catch (\Xendit\XenditSdkException$e) {
echo'Exception when calling PayoutApi->getPayoutById: ', $e->getMessage(), PHP_EOL;
echo'Full Error: ', json_encode($e->getFullError()), PHP_EOL;
}
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
useXendit\Configuration;
useXendit\Payout\PayoutApi;
Configuration::setXenditKey("YOUR_API_KEY_HERE");
$apiInstance = newPayoutApi();
$currency = "IDR, PHP"; // string | Filter channels by currency from ISO-4217 values$channel_category = array(new \Xendit\Payout\ChannelCategory()); // \Payout\ChannelCategory[] | Filter channels by category$channel_code = "ID_MANDIRI, PH_GCASH"; // string | Filter channels by channel code, prefixed by ISO-3166 country code$for_user_id = "5f9a3fbd571a1c4068aa40ce"; // string | The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information.try {
$result = $apiInstance->getPayoutChannels($currency, $channel_category, $channel_code, $for_user_id);
print_r($result);
} catch (\Xendit\XenditSdkException$e) {
echo'Exception when calling PayoutApi->getPayoutChannels: ', $e->getMessage(), PHP_EOL;
echo'Full Error: ', json_encode($e->getFullError()), PHP_EOL;
}
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
useXendit\Configuration;
useXendit\Payout\PayoutApi;
Configuration::setXenditKey("YOUR_API_KEY_HERE");
$apiInstance = newPayoutApi();
$reference_id = "DISB-123"; // string | Reference_id provided when creating the payout$limit = 10; // float | Number of records to fetch per API call$after_id = "disb-7baa7335-a0b2-4678-bb8c-318c0167f332"; // string | Used to fetch record after this payout unique id$before_id = "disb-7baa7335-a0b2-4678-bb8c-318c0167f332"; // string | Used to fetch record before this payout unique id$for_user_id = "5f9a3fbd571a1c4068aa40ce"; // string | The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information.try {
$result = $apiInstance->getPayouts($reference_id, $limit, $after_id, $before_id, $for_user_id);
print_r($result);
} catch (\Xendit\XenditSdkException$e) {
echo'Exception when calling PayoutApi->getPayouts: ', $e->getMessage(), PHP_EOL;
echo'Full Error: ', json_encode($e->getFullError()), PHP_EOL;
}
API to cancel requested payouts that have not yet been sent to partner banks and e-wallets. Cancellation is possible if the payout has not been sent out via our partner and when payout status is ACCEPTED.
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
useXendit\Configuration;
useXendit\Payout\PayoutApi;
Configuration::setXenditKey("YOUR_API_KEY_HERE");
$apiInstance = newPayoutApi();
$id = "disb-7baa7335-a0b2-4678-bb8c-318c0167f332"; // string | Payout id returned from the response of /v2/payouts$for_user_id = "5f9a3fbd571a1c4068aa40ce"; // string | The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information.try {
$result = $apiInstance->cancelPayout($id, $for_user_id);
print_r($result);
} catch (\Xendit\XenditSdkException$e) {
echo'Exception when calling PayoutApi->cancelPayout: ', $e->getMessage(), PHP_EOL;
echo'Full Error: ', json_encode($e->getFullError()), PHP_EOL;
}