Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 1.92 KB

PayoutApi.md

File metadata and controls

61 lines (44 loc) · 1.92 KB

Algocash\PayoutApi

All URIs are relative to https://virtserver.swaggerhub.com/gitdevstar/Algocash/1.0.0

Method HTTP request Description
createPayout POST /payout create payout

createPayout

\Algocash\Model\PayoutResponse createPayout($body)

create payout

create a payout

Example

<?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;
}
?>

Parameters

Name Type Description Notes
body \Algocash\Model\PayoutRequest Payout request body

Return type

\Algocash\Model\PayoutResponse

Authorization

basicAuth, signatureAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]