Skip to main content
GET
/
payouts
C#
using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

ListPayoutsRequest req = new ListPayoutsRequest() {
    Cursor = "ZXhhbXBsZTE",
};

ListPayoutsResponse? res = await sdk.Payouts.ListAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}
package main

import(
"context"
"os"
gr4vygo "github.com/gr4vy/gr4vy-go"
"log"
)

func main() {
ctx := context.Background()

s := gr4vygo.New(
gr4vygo.WithMerchantAccountID("default"),
gr4vygo.WithSecurity(os.Getenv("GR4VY_BEARER_AUTH")),
)

res, err := s.Payouts.List(ctx, gr4vygo.Pointer("ZXhhbXBsZTE"), gr4vygo.Pointer[int64](20))
if err != nil {
log.Fatal(err)
}
if res != nil {
for {
// handle items

res, err = res.Next()

if err != nil {
// handle error
}

if res == nil {
break
}
}
}
}
package hello.world;

import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.errors.*;
import com.gr4vy.sdk.models.operations.ListPayoutsRequest;
import com.gr4vy.sdk.models.operations.ListPayoutsResponse;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws Exception {

Gr4vy sdk = Gr4vy.builder()
.merchantAccountId("default")
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();

ListPayoutsRequest req = ListPayoutsRequest.builder()
.cursor("ZXhhbXBsZTE")
.build();


sdk.payouts().list()
.callAsStream()
.forEach((ListPayoutsResponse item) -> {
// handle page
});

}
}
declare(strict_types=1);

require 'vendor/autoload.php';

use Gr4vy;

$sdk = Gr4vy\SDK::builder()
->setId('example')
->setServer('sandbox')
->setSecuritySource(Auth::withToken($privateKey))
->setMerchantAccountId('default')
->build();

$request = new Gr4vy\ListPayoutsRequest(
cursor: 'ZXhhbXBsZTE',
);

$responses = $sdk->payouts->list(
request: $request
);


foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}
from gr4vy import Gr4vy
import os


with Gr4vy(
id="example",
server="sandbox",
merchant_account_id="default",
bearer_auth=auth.with_token(open("./private_key.pem").read())
) as g_client:

res = g_client.payouts.list(cursor="ZXhhbXBsZTE", limit=20)

while res is not None:
# Handle items

res = res.next()
import { Gr4vy, withToken } from "@gr4vy/sdk";
import fs from "fs";

const gr4vy = new Gr4vy({
id: "example",
server: "sandbox",
merchantAccountId: "default",
bearerAuth: withToken({
privateKey: fs.readFileSync("private_key.pem", "utf8"),
}),
});

async function run() {
const result = await gr4vy.payouts.list();

for await (const page of result) {
console.log(page);
}
}

run();
curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/payouts \
--header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "amount": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "currency": "<string>",
      "payment_method": {
        "type": "payment-method",
        "approval_url": "https://gr4vy.app/redirect/12345",
        "country": "US",
        "currency": "USD",
        "details": {
          "bin": "<string>",
          "card_issuer_name": "<string>"
        },
        "expiration_date": "12/30",
        "fingerprint": "20eb353620155d2b5fc864cc46a73ea77cb92c725238650839da1813fa987a17",
        "label": "1234",
        "last_replaced_at": "2013-07-16T19:23:00.000+00:00",
        "mode": "card",
        "scheme": "visa",
        "id": "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
        "approval_target": "any",
        "external_identifier": "card-12345",
        "payment_account_reference": "V0010014629724763377327521982"
      },
      "payment_service": {
        "payment_service_definition_id": "<string>",
        "type": "payment-service",
        "id": "b6c9eb12-2b62-4103-99b9-e3efc94e396d",
        "method": "card",
        "display_name": "Nuvei"
      },
      "updated_at": "2023-11-07T05:31:56Z",
      "type": "payout",
      "id": "6f96a57e-a35b-4f98-b192-d298995f811a",
      "buyer": {
        "type": "buyer",
        "id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
        "display_name": "John Doe",
        "external_identifier": "buyer-12345",
        "billing_details": {
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "john@example.com",
          "phone_number": "+1234567890",
          "address": {
            "city": "San Jose",
            "country": "US",
            "postal_code": "94560",
            "state": "California",
            "state_code": "US-CA",
            "house_number_or_name": "10",
            "line1": "Stafford Appartments",
            "line2": "29th Street",
            "organization": "Gr4vy"
          },
          "tax_id": {
            "value": "<string>"
          }
        },
        "account_number": "<string>"
      },
      "category": "online_gambling",
      "external_identifier": "payout-12345",
      "merchant": {
        "name": "<string>",
        "identification_number": "<string>",
        "phone_number": "<string>",
        "url": "<string>",
        "merchant_category_code": "<string>",
        "type": "merchant",
        "statement_descriptor": "Winnings",
        "address": {
          "city": "San Jose",
          "country": "US",
          "postal_code": "94560",
          "state": "California",
          "state_code": "US-CA",
          "house_number_or_name": "10",
          "line1": "Stafford Appartments",
          "line2": "29th Street",
          "organization": "Gr4vy"
        }
      },
      "merchant_account_id": "default",
      "payment_service_payout_id": "pout-12345"
    }
  ],
  "limit": 20,
  "next_cursor": "ZXhhbXBsZTE",
  "previous_cursor": "Xkjss7asS"
}
{
"type": "error",
"code": "bad_request",
"status": 400,
"message": "Generic error",
"details": []
}
{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}
{
"type": "error",
"code": "forbidden",
"status": 403,
"message": "Generic error",
"details": []
}
{
"type": "error",
"code": "not_found",
"status": 404,
"message": "The resource could not be found",
"details": []
}
{
"type": "error",
"code": "method_not_allowed",
"status": 405,
"message": "Method Not Allowed",
"details": []
}
{
"type": "error",
"code": "duplicate_record",
"status": 409,
"message": "Generic error",
"details": [],
"resource_id": "cdc70639-cb9c-4222-a73f-b8ce39f7821b"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
{
"type": "error",
"code": "too_early",
"status": 425,
"message": "Generic error",
"details": []
}
{
"type": "error",
"code": "too_many_requests",
"status": 429,
"message": "Generic error",
"details": []
}
{
"type": "error",
"code": "server_error",
"status": 500,
"message": "Request could not be processed",
"details": []
}
{
"type": "error",
"code": "bad_gateway",
"status": 502,
"message": "Request could not be processed",
"details": []
}
{
"type": "error",
"code": "gateway_timeout",
"status": 504,
"message": "Request could not be processed",
"details": []
}
This endpoint requires the payouts.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-gr4vy-merchant-account-id
string

The ID of the merchant account to use for this request.

Example:

"default"

Query Parameters

cursor
string | null

A pointer to the page of results to return.

Example:

"ZXhhbXBsZTE"

limit
integer
default:20

The maximum number of items that are at returned.

Required range: 1 <= x <= 100
Example:

20

created_at_lte
string<date-time> | null

Filters the results to only payouts created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. 2022-01-01T12:00:00+08:00 must be encoded as 2022-01-01T12%3A00%3A00%2B08%3A00.

Example:

"2022-01-01T12:00:00+08:00"

created_at_gte
string<date-time> | null

Filters the results to only payouts created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. 2022-01-01T12:00:00+08:00 must be encoded as 2022-01-01T12%3A00%3A00%2B08%3A00.

Example:

"2022-01-01T12:00:00+08:00"

updated_at_lte
string<date-time> | null

Filters the results to only payouts updated before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. 2022-01-01T12:00:00+08:00 must be encoded as 2022-01-01T12%3A00%3A00%2B08%3A00.

Example:

"2022-01-01T12:00:00+08:00"

updated_at_gte
string<date-time> | null

Filters the results to only payouts updated after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. 2022-01-01T12:00:00+08:00 must be encoded as 2022-01-01T12%3A00%3A00%2B08%3A00.

Example:

"2022-01-01T12:00:00+08:00"

external_identifier
string | null

Filters the results to only the payouts that have an external_identifier that exactly matches this value.

Example:

"payout-12345"

payment_service_payout_id
string | null

Filters the results to only the payouts that have a payment_service_payout_id that exactly matches this value.

Example:

"po_1234567890"

status
enum<string>[] | null

Filters the results to only the payouts that have a status that matches with any of the provided status values.

Available options:
declined,
failed,
pending,
succeeded
Example:

"succeeded"

Response

Successful Response

items
PayoutSummary · object[]
required

A list of items returned for this request.

limit
integer
default:20

The number of items for this page.

Required range: 1 <= x <= 100
Example:

20

next_cursor
string | null

The cursor pointing at the next page of items.

Required string length: 1 - 1000
Example:

"ZXhhbXBsZTE"

previous_cursor
string | null

The cursor pointing at the previous page of items.

Required string length: 1 - 1000
Example:

"Xkjss7asS"