All URIs are relative to https://virtserver.swaggerhub.com/gitdevstar/Algocash/1.0.0
Method | HTTP request | Description |
---|---|---|
createPayout | POST /payout | create payout |
\Algocash\Model\PayoutResponse createPayout($body)
create payout
create a payout
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$algo = Algocash::getInstance()
->setApiKey('merchant_key', 'merchant_secret')
->setAccessToken('api_access_token');
// ->enableProdMode(false); // default prod mode
$apiInstance = new PayoutApi($algo);
$payer = new Payer("email", "phone");
$url = new Url("callback_url");
$bank = new Bank("account_number", "beneficiary_name", "bank_account_type","bank_code");
$body = new PayoutRequest("invoiceId", "amount", $payer, $bank, $url, "payment_method");
try {
$result = $apiInstance->createPayout($body);
print_r($result);
} catch (\Algocash\ApiException $e) {
echo 'Api Exception when calling PayoutApi->createPayout: ', json_encode($e->getError()), PHP_EOL;
} catch (\Exception $e) {
echo 'Exception when calling PayoutApi->createPayout: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Algocash\Model\PayoutRequest | Payout request body |
\Algocash\Model\PayoutResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]