using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Payouts.GetAsync(payoutId: "4344fef2-bc2f-49a6-924f-343e62f67224");
// handle responsepackage 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.Get(ctx, "4344fef2-bc2f-49a6-924f-343e62f67224")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}package hello.world;
import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.errors.*;
import com.gr4vy.sdk.models.operations.GetPayoutResponse;
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();
GetPayoutResponse res = sdk.payouts().get()
.payoutId("4344fef2-bc2f-49a6-924f-343e62f67224")
.call();
if (res.payoutSummary().isPresent()) {
System.out.println(res.payoutSummary().get());
}
}
}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();
$response = $sdk->payouts->get(
payoutId: '4344fef2-bc2f-49a6-924f-343e62f67224'
);
if ($response->payoutSummary !== null) {
// 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.get(payout_id="4344fef2-bc2f-49a6-924f-343e62f67224")
# Handle response
print(res)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.get("4344fef2-bc2f-49a6-924f-343e62f67224");
console.log(result);
}
run();curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/payouts/{payout_id} \
--header 'Authorization: Bearer <token>'{
"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"
}{
"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": []
}Get a payout
Retrieves a payout.
using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Payouts.GetAsync(payoutId: "4344fef2-bc2f-49a6-924f-343e62f67224");
// handle responsepackage 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.Get(ctx, "4344fef2-bc2f-49a6-924f-343e62f67224")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}package hello.world;
import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.errors.*;
import com.gr4vy.sdk.models.operations.GetPayoutResponse;
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();
GetPayoutResponse res = sdk.payouts().get()
.payoutId("4344fef2-bc2f-49a6-924f-343e62f67224")
.call();
if (res.payoutSummary().isPresent()) {
System.out.println(res.payoutSummary().get());
}
}
}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();
$response = $sdk->payouts->get(
payoutId: '4344fef2-bc2f-49a6-924f-343e62f67224'
);
if ($response->payoutSummary !== null) {
// 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.get(payout_id="4344fef2-bc2f-49a6-924f-343e62f67224")
# Handle response
print(res)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.get("4344fef2-bc2f-49a6-924f-343e62f67224");
console.log(result);
}
run();curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/payouts/{payout_id} \
--header 'Authorization: Bearer <token>'{
"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"
}{
"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": []
}payouts.read scope.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The ID of the merchant account to use for this request.
"default"
Path Parameters
Response
Successful Response
PayoutSummary
Represents a summary of a payout.
The monetary amount for this payout, in the smallest currency unit for the given currency, for example 1299 cents to create an authorization for $12.99.
1299
The date this payout was created at.
"2013-07-16T19:23:00.000+00:00"
A supported ISO-4217 currency code.
^[A-Z]{3}$"EUR"
"GBP"
"USD"
The payment method used for this payout.
Show child attributes
Show child attributes
The payment service used for this payout.
Show child attributes
Show child attributes
The status of the payout.
declined, failed, pending, succeeded "succeeded"
The date this payout was last updated at.
"2013-07-16T19:23:00.000+00:00"
Always payout.
"payout""payout"
The ID for the payout.
"6f96a57e-a35b-4f98-b192-d298995f811a"
The buyer used for this payout.
Show child attributes
Show child attributes
The type of payout to process.
online_gambling "online_gambling"
The merchant identifier for this payout.
1 - 200"payout-12345"
The merchant details associated to this payout.
Show child attributes
Show child attributes
The ID of the merchant account this payout was created for.
"default"
The ID of the payout in the underlying payment service.
1 - 200"pout-12345"