- list - List payouts created
- create - Create a payout
- get - Get a payout
Returns a list of payouts made.
declare(strict_types=1);
require 'vendor/autoload.php';
use Gr4vy;
$sdk = Gr4vy\SDK::builder()
->setMerchantAccountId('default')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$responses = $sdk->payouts->list(
cursor: 'ZXhhbXBsZTE',
limit: 20
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}
| Parameter |
Type |
Required |
Description |
Example |
cursor |
?string |
➖ |
A pointer to the page of results to return. |
ZXhhbXBsZTE |
limit |
?int |
➖ |
The maximum number of items that are at returned. |
20 |
merchantAccountId |
?string |
➖ |
The ID of the merchant account to use for this request. |
default |
?ListPayoutsResponse
| Error Type |
Status Code |
Content Type |
| Errors\Error400 |
400 |
application/json |
| Errors\Error401 |
401 |
application/json |
| Errors\Error403 |
403 |
application/json |
| Errors\Error404 |
404 |
application/json |
| Errors\Error405 |
405 |
application/json |
| Errors\Error409 |
409 |
application/json |
| Errors\HTTPValidationError |
422 |
application/json |
| Errors\Error425 |
425 |
application/json |
| Errors\Error429 |
429 |
application/json |
| Errors\Error500 |
500 |
application/json |
| Errors\Error502 |
502 |
application/json |
| Errors\Error504 |
504 |
application/json |
| errors\APIException |
4XX, 5XX |
*/* |
Creates a new payout.
declare(strict_types=1);
require 'vendor/autoload.php';
use Gr4vy;
$sdk = Gr4vy\SDK::builder()
->setMerchantAccountId('default')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$payoutCreate = new Gr4vy\PayoutCreate(
amount: 1299,
currency: 'EUR',
paymentServiceId: 'ed8bd87d-85ad-40cf-8e8f-007e21e55aad',
paymentMethod: new Gr4vy\PaymentMethodStoredCard(
id: '852b951c-d7ea-4c98-b09e-4a1c9e97c077',
),
);
$response = $sdk->payouts->create(
payoutCreate: $payoutCreate
);
if ($response->payoutSummary !== null) {
// handle response
}
| Parameter |
Type |
Required |
Description |
Example |
payoutCreate |
PayoutCreate |
✔️ |
N/A |
|
merchantAccountId |
?string |
➖ |
The ID of the merchant account to use for this request. |
default |
?CreatePayoutResponse
| Error Type |
Status Code |
Content Type |
| Errors\Error400 |
400 |
application/json |
| Errors\Error401 |
401 |
application/json |
| Errors\Error403 |
403 |
application/json |
| Errors\Error404 |
404 |
application/json |
| Errors\Error405 |
405 |
application/json |
| Errors\Error409 |
409 |
application/json |
| Errors\HTTPValidationError |
422 |
application/json |
| Errors\Error425 |
425 |
application/json |
| Errors\Error429 |
429 |
application/json |
| Errors\Error500 |
500 |
application/json |
| Errors\Error502 |
502 |
application/json |
| Errors\Error504 |
504 |
application/json |
| errors\APIException |
4XX, 5XX |
*/* |
Retrieves a payout.
declare(strict_types=1);
require 'vendor/autoload.php';
use Gr4vy;
$sdk = Gr4vy\SDK::builder()
->setMerchantAccountId('default')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->payouts->get(
payoutId: '4344fef2-bc2f-49a6-924f-343e62f67224'
);
if ($response->payoutSummary !== null) {
// handle response
}
| Parameter |
Type |
Required |
Description |
Example |
payoutId |
string |
✔️ |
N/A |
|
merchantAccountId |
?string |
➖ |
The ID of the merchant account to use for this request. |
default |
?GetPayoutResponse
| Error Type |
Status Code |
Content Type |
| Errors\Error400 |
400 |
application/json |
| Errors\Error401 |
401 |
application/json |
| Errors\Error403 |
403 |
application/json |
| Errors\Error404 |
404 |
application/json |
| Errors\Error405 |
405 |
application/json |
| Errors\Error409 |
409 |
application/json |
| Errors\HTTPValidationError |
422 |
application/json |
| Errors\Error425 |
425 |
application/json |
| Errors\Error429 |
429 |
application/json |
| Errors\Error500 |
500 |
application/json |
| Errors\Error502 |
502 |
application/json |
| Errors\Error504 |
504 |
application/json |
| errors\APIException |
4XX, 5XX |
*/* |