> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gr4vy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a payout

> Creates a new payout.

This endpoint requires the `payouts.write` scope.


## OpenAPI

````yaml /openapi.speakeasy.json POST /payouts
openapi: 3.1.0
info:
  title: Gr4vy
  description: The Gr4vy API.
  version: 1.0.0
servers:
  - url: https://api.sandbox.{id}.gr4vy.app
    x-speakeasy-server-id: sandbox
    variables:
      id:
        default: example
        description: The subdomain for your Gr4vy instance.
  - url: https://api.{id}.gr4vy.app
    x-speakeasy-server-id: production
    variables:
      id:
        default: example
        description: The subdomain for your Gr4vy instance.
security:
  - bearerAuth: []
tags:
  - name: 3DS scenarios
    description: Manage and create 3DS scenarios in sandbox.
  - name: Account updater
    description: Schedule stored cards for an account update.
  - name: Audit logs
    description: Query user activity.
  - name: Buyers
    description: Manage buyers.
  - name: Buyers - Gift cards
    description: Query gift cards for buyers.
  - name: Buyers - Payment methods
    description: Query payment methods for buyers.
  - name: Buyers - Shipping details
    description: Manage shipping details for buyers.
  - name: Card details
    description: Returns information about a card.
  - name: Card scheme definitions
    description: List definitions for card schemes.
  - name: Checkout sessions
    description: Manage checkout sessions.
  - name: Digital wallets - Sessions
    description: Create sessions for digital wallets like Apple Pay and Google Pay.
  - name: Digital wallets - Setup
    description: Manage digital wallets like Apple Pay and Google Pay.
  - name: Gift cards
    description: Manage stored gift cards.
  - name: Insights
    description: Retrieve Insights data.
  - name: Insights - Presets
    description: Manage presets for Insights.
  - name: Merchant accounts
    description: Manage merchant accounts in an instance.
  - name: Merchant accounts - 3DS configuration
    description: Manage 3DS profiles for merchant accounts.
  - name: Monitoring
    description: Manage monitoring and alerting.
  - name: Payment links
    description: Manage payment links.
  - name: Payment methods
    description: Manage stored payment methods.
  - name: Payment methods - Definitions
    description: Manage payment method definitions.
  - name: Payment methods - Network tokens
    description: Manage network tokens for stored payment methods.
  - name: Payment methods - Payment service tokens
    description: Manage payment service tokens for stored payment methods.
  - name: Payment options
    description: Fetch a list of payment options to display at checkout.
  - name: Payment service definitions
    description: Fetch info about the definition of each payment service.
  - name: Payment services
    description: Manage configured payment services.
  - name: Payouts
    description: Payout API.
  - name: Refunds
    description: Manage transaction refunds.
  - name: Reports
    description: Manage one-off and scheduled reports.
  - name: Reports - Executions
    description: Manage executions of reports.
  - name: Transactions
    description: Manage transaction.
  - name: Transactions - Actions
    description: Read Flow actions triggered for a transaction.
  - name: Transactions - Chargebacks
    description: Read transaction chargeback data.
  - name: Transactions - Chargeback reversals
    description: Read transaction chargeback reversal data.
  - name: Transactions - Settlements
    description: Read transaction settlement data.
  - name: Transactions - Sessions
    description: Manage transaction session data.
  - name: Webhook subscriptions
    description: Manage webhook subscriptions.
paths:
  /payouts:
    post:
      tags:
        - Payouts
      summary: Create a payout
      description: Creates a new payout.
      operationId: create_payout
      parameters:
        - name: x-gr4vy-merchant-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The ID of the merchant account to use for this request.
            examples:
              - default
            title: X-Gr4Vy-Merchant-Account-Id
          description: The ID of the merchant account to use for this request.
          x-speakeasy-name-override: merchantAccountId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayoutCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutSummary'
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: The request was unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '403':
          description: >-
            The credentials were invalid or the caller did not have permission
            to act on the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '405':
          description: The request method was not allowed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error405'
        '409':
          description: A duplicate record was found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '425':
          description: The request was too early.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error425'
        '429':
          description: Too many requests were made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error429'
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
        '502':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error502'
        '504':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error504'
      x-codeSamples:
        - lang: javascript
          label: TypeScript
          source: |-
            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.create({
                amount: 1299,
                currency: "EUR",
                paymentServiceId: "ed8bd87d-85ad-40cf-8e8f-007e21e55aad",
                paymentMethod: {
                  method: "id",
                  id: "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
                },
              });

              console.log(result);
            }

            run();
        - lang: python
          label: Python
          source: |-
            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.create(amount=1299, currency="EUR", payment_service_id="ed8bd87d-85ad-40cf-8e8f-007e21e55aad", payment_method={
                    "method": "id",
                    "id": "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
                })

                # Handle response
                print(res)
        - lang: go
          label: Go
          source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tgr4vygo \"github.com/gr4vy/gr4vy-go\"\n\t\"github.com/gr4vy/gr4vy-go/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := gr4vygo.New(\n        gr4vygo.WithMerchantAccountID(\"default\"),\n        gr4vygo.WithSecurity(os.Getenv(\"GR4VY_BEARER_AUTH\")),\n    )\n\n    res, err := s.Payouts.Create(ctx, components.PayoutCreate{\n        Amount: 1299,\n        Currency: \"EUR\",\n        PaymentServiceID: \"ed8bd87d-85ad-40cf-8e8f-007e21e55aad\",\n        PaymentMethod: components.CreatePayoutCreatePaymentMethodPaymentMethodStoredCard(\n            components.PaymentMethodStoredCard{\n                ID: \"852b951c-d7ea-4c98-b09e-4a1c9e97c077\",\n            },\n        ),\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res != nil {\n        // handle response\n    }\n}"
        - lang: php
          label: PHP
          source: |-
            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();

            $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
            }
        - lang: java
          label: Java
          source: |-
            package hello.world;

            import com.gr4vy.sdk.Gr4vy;
            import com.gr4vy.sdk.models.components.*;
            import com.gr4vy.sdk.models.errors.*;
            import com.gr4vy.sdk.models.operations.CreatePayoutResponse;
            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();

                    CreatePayoutResponse res = sdk.payouts().create()
                            .payoutCreate(PayoutCreate.builder()
                                .amount(1299L)
                                .currency("EUR")
                                .paymentServiceId("ed8bd87d-85ad-40cf-8e8f-007e21e55aad")
                                .paymentMethod(PayoutCreatePaymentMethod.of(PaymentMethodStoredCard.builder()
                                    .id("852b951c-d7ea-4c98-b09e-4a1c9e97c077")
                                    .build()))
                                .build())
                            .call();

                    if (res.payoutSummary().isPresent()) {
                        System.out.println(res.payoutSummary().get());
                    }
                }
            }
        - lang: csharp
          label: C#
          source: >-
            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.CreateAsync(payoutCreate: new
            PayoutCreate() {
                Amount = 1299,
                Currency = "EUR",
                PaymentServiceId = "ed8bd87d-85ad-40cf-8e8f-007e21e55aad",
                PaymentMethod = PayoutCreatePaymentMethod.CreatePaymentMethodStoredCard(
                    new PaymentMethodStoredCard() {
                        Id = "852b951c-d7ea-4c98-b09e-4a1c9e97c077",
                    }
                ),
            });


            // handle response
components:
  schemas:
    PayoutCreate:
      properties:
        amount:
          type: integer
          maximum: 99999999
          minimum: 0
          title: Amount
          description: >-
            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.
          examples:
            - 1299
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          title: Currency
          description: The ISO-4217 currency code for this payout.
          examples:
            - EUR
            - GBP
            - USD
        payment_service_id:
          type: string
          format: uuid
          title: Payment Service Id
          description: The ID of the payment service to use for the payout.
          examples:
            - ed8bd87d-85ad-40cf-8e8f-007e21e55aad
        payment_method:
          anyOf:
            - $ref: '#/components/schemas/PaymentMethodCard'
            - $ref: '#/components/schemas/PaymentMethodStoredCard'
          title: Payment Method
          description: The type of payment method to send funds too.
        category:
          anyOf:
            - type: string
              enum:
                - online_gambling
              title: PayoutCategory
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          description: The type of payout to process.
          examples:
            - online_gambling
        external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: External Identifier
          description: >-
            A value that can be used to match the payout against your own
            records.
          examples:
            - payout-12345
        buyer_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Buyer Id
          description: >-
            The `id` of a stored buyer to use for this payout Use this instead
            of the `buyer` or `buyer_external_identifier`.
          examples:
            - fe26475d-ec3e-4884-9553-f7356683f7f9
        buyer:
          anyOf:
            - $ref: '#/components/schemas/GuestBuyer'
            - type: 'null'
          description: >-
            Inline buyer details for the payout. Use this instead of the
            `buyer_id` or `buyer_external_identifier`.
        buyer_external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Buyer External Identifier
          description: >-
            The `external_identifier` of a stored buyer to use for this payout.
            Use this instead of the `buyer_id` or `buyer`.
          examples:
            - buyer-12345
        merchant:
          anyOf:
            - $ref: '#/components/schemas/PayoutMerchant'
            - type: 'null'
          description: Merchant information for the source of the payout.
        connection_options:
          anyOf:
            - $ref: '#/components/schemas/PayoutConnectionOptions'
            - type: 'null'
          description: Optional fields for processing payouts on specific payment services.
      additionalProperties: false
      type: object
      required:
        - amount
        - currency
        - payment_service_id
        - payment_method
      title: PayoutCreate
      description: |-
        PayoutCreate

        Represents the data required to create a new payout.
    PayoutSummary:
      properties:
        type:
          type: string
          const: payout
          title: Type
          description: Always `payout`.
          default: payout
          examples:
            - payout
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: The ID for the payout.
          examples:
            - 6f96a57e-a35b-4f98-b192-d298995f811a
        amount:
          type: integer
          title: Amount
          description: >-
            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.
          examples:
            - 1299
        buyer:
          anyOf:
            - $ref: '#/components/schemas/TransactionBuyer'
            - type: 'null'
          description: The buyer used for this payout.
        category:
          anyOf:
            - type: string
              enum:
                - online_gambling
              title: PayoutCategory
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          description: The type of payout to process.
          examples:
            - online_gambling
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date this payout was created at.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          title: Currency
          description: A supported ISO-4217 currency code.
          examples:
            - EUR
            - GBP
            - USD
        external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: External Identifier
          description: The merchant identifier for this payout.
          examples:
            - payout-12345
        merchant:
          anyOf:
            - $ref: '#/components/schemas/PayoutMerchantSummary'
            - type: 'null'
          description: The merchant details associated to this payout.
        merchant_account_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Merchant Account Id
          description: The ID of the merchant account this payout was created for.
          examples:
            - default
        payment_method:
          $ref: '#/components/schemas/TransactionPaymentMethod'
          description: The payment method used for this payout.
        payment_service:
          $ref: '#/components/schemas/PayoutPaymentService'
          description: The payment service used for this payout.
        payment_service_payout_id:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Payment Service Payout Id
          description: The ID of the payout in the underlying payment service.
          examples:
            - pout-12345
        status:
          description: The status of the payout.
          examples:
            - succeeded
          type: string
          enum:
            - declined
            - failed
            - pending
            - succeeded
          title: PayoutStatus
          x-speakeasy-unknown-values: allow
          overlay: 1.0.0
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The date this payout was last updated at.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
      additionalProperties: false
      type: object
      required:
        - amount
        - created_at
        - currency
        - payment_method
        - payment_service
        - status
        - updated_at
      title: PayoutSummary
      description: |-
        PayoutSummary

        Represents a summary of a payout.
    Error400:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `bad_request`
          default: bad_request
          examples:
            - bad_request
        status:
          type: integer
          title: Status
          description: Always `400`.
          default: 400
          examples:
            - 400
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error400
    Error401:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `unauthorized`
          default: unauthorized
          examples:
            - unauthorized
        status:
          type: integer
          title: Status
          description: Always `401`.
          default: 401
          examples:
            - 401
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: No valid API authentication found
          examples:
            - No valid API authentication found
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error401
    Error403:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `forbidden`
          default: forbidden
          examples:
            - forbidden
        status:
          type: integer
          title: Status
          description: Always `403`.
          default: 403
          examples:
            - 403
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error403
    Error404:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `not_found`
          default: not_found
          examples:
            - not_found
        status:
          type: integer
          title: Status
          description: Always `404`.
          default: 404
          examples:
            - 404
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: The resource could not be found
          examples:
            - The resource could not be found
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error404
    Error405:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `method_not_allowed`
          default: method_not_allowed
          examples:
            - method_not_allowed
        status:
          type: integer
          title: Status
          description: Always `405`.
          default: 405
          examples:
            - 405
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Method Not Allowed
          examples:
            - Method Not Allowed
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error405
    Error409:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `duplicate_record`
          default: duplicate_record
          examples:
            - duplicate_record
        status:
          type: integer
          title: Status
          description: Always `409`.
          default: 409
          examples:
            - 409
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
          description: The ID of the conflicting resource.
          examples:
            - cdc70639-cb9c-4222-a73f-b8ce39f7821b
      additionalProperties: false
      type: object
      title: Error409
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Error425:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `too_early`
          default: too_early
          examples:
            - too_early
        status:
          type: integer
          title: Status
          description: Always `425`.
          default: 425
          examples:
            - 425
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error425
    Error429:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `too_many_requests`
          default: too_many_requests
          examples:
            - too_many_requests
        status:
          type: integer
          title: Status
          description: Always `429`.
          default: 429
          examples:
            - 429
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Generic error
          examples:
            - Request failed validation
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error429
    Error500:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `server_error`
          default: server_error
          examples:
            - server_error
        status:
          type: integer
          title: Status
          description: Always `500`.
          default: 500
          examples:
            - 500
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Request could not be processed
          examples:
            - Request could not be processed
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error500
    Error502:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `bad_gateway`
          default: bad_gateway
          examples:
            - bad_gateway
        status:
          type: integer
          title: Status
          description: Always `502`.
          default: 502
          examples:
            - 502
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Request could not be processed
          examples:
            - Request could not be processed
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error502
    Error504:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always `error`.
          default: error
          examples:
            - error
        code:
          type: string
          title: Code
          description: Always `gateway_timeout`
          default: gateway_timeout
          examples:
            - gateway_timeout
        status:
          type: integer
          title: Status
          default: 504
        message:
          type: string
          title: Message
          description: A human readable message that provides more context to the error.
          default: Request could not be processed
          examples:
            - Request could not be processed
        details:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Details
          description: A list of details that further ellaborate on the error.
          default: []
      additionalProperties: false
      type: object
      title: Error504
    PaymentMethodCard:
      properties:
        method:
          type: string
          const: card
          title: Method
          description: Set to `card` to use a new card.
          default: card
          examples:
            - card
        number:
          type: string
          maxLength: 19
          minLength: 13
          pattern: ^\d+$
          title: Number
          description: >-
            The 13-19 digit number for this card as it can be found on the front
            of the card.
          examples:
            - '4242424242424242'
        expiration_date:
          type: string
          maxLength: 5
          minLength: 5
          pattern: ^\d{2}/\d{2}$
          title: Expiration Date
          description: The expiration date of the card, formatted `MM/YY`.
          examples:
            - 12/30
        card_scheme:
          anyOf:
            - type: string
              enum:
                - accel
                - amex
                - bancontact
                - carte-bancaire
                - cirrus
                - culiance
                - dankort
                - diners-club
                - discover
                - eftpos-australia
                - elo
                - hipercard
                - jcb
                - maestro
                - mastercard
                - mir
                - nyce
                - other
                - pulse
                - qcard
                - rupay
                - star
                - uatp
                - unionpay
                - visa
              title: CardScheme
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          description: The optional card's network scheme.
          examples:
            - visa
        external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: External Identifier
          description: The merchant identifier for this card.
          examples:
            - card-12345
      additionalProperties: false
      type: object
      required:
        - number
        - expiration_date
      title: PaymentMethodCard
    PaymentMethodStoredCard:
      properties:
        method:
          type: string
          const: id
          title: Method
          description: Set to `id` to use a stored card.
          default: id
          examples:
            - id
        id:
          type: string
          format: uuid
          title: Id
          description: The ID of the stored card to use.
          examples:
            - 852b951c-d7ea-4c98-b09e-4a1c9e97c077
      additionalProperties: false
      type: object
      required:
        - id
      title: PaymentMethodStoredCard
    GuestBuyer:
      properties:
        display_name:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Display Name
          description: The display name for the buyer.
          examples:
            - John Doe
        external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: External Identifier
          description: The merchant identifier for this buyer.
          examples:
            - buyer-12345
        billing_details:
          anyOf:
            - $ref: '#/components/schemas/BillingDetails'
            - type: 'null'
          description: The billing name, address, email, and other fields for this buyer.
        account_number:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Account Number
          description: The buyer account number
        shipping_details:
          anyOf:
            - $ref: '#/components/schemas/ShippingDetailsCreate'
            - type: 'null'
          description: The optional shipping details for this buyer.
      additionalProperties: false
      type: object
      title: GuestBuyer
    PayoutMerchant:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: The name of the merchant.
          examples:
            - Acme Inc
        identification_number:
          type: string
          maxLength: 200
          minLength: 1
          title: Identification Number
          description: >-
            Unique value which identifies a merchant for processing
            transactions, also known as a MID.
          examples:
            - '12345'
        phone_number:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          title: Phone Number
          description: >-
            The phone number for the merchant which should be formatted
            according to the E164 number standard.
          examples:
            - '+14155552671'
            - '+442071838750'
        url:
          type: string
          title: Url
          description: Merchant website URL.
          examples:
            - https://example.com
        statement_descriptor:
          type: string
          maxLength: 22
          minLength: 5
          title: Statement Descriptor
          description: Value to explain charges or payments on bank statements.
          examples:
            - Winnings
        merchant_category_code:
          type: string
          maxLength: 4
          minLength: 1
          title: Merchant Category Code
          description: >-
            Merchant classification for the type of goods or services it
            provides.
          examples:
            - '123456'
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The address for the merchant.
      additionalProperties: false
      type: object
      required:
        - name
        - identification_number
        - phone_number
        - url
        - statement_descriptor
        - merchant_category_code
      title: PayoutMerchant
    PayoutConnectionOptions:
      properties:
        checkout-card:
          anyOf:
            - $ref: '#/components/schemas/CheckoutPayoutOptions'
            - type: 'null'
          description: Custom options for `checkout-card` payment service.
      additionalProperties: false
      type: object
      title: PayoutConnectionOptions
    TransactionBuyer:
      properties:
        type:
          type: string
          const: buyer
          title: Type
          description: Always `buyer`.
          default: buyer
          examples:
            - buyer
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: The ID for the buyer.
          examples:
            - fe26475d-ec3e-4884-9553-f7356683f7f9
        display_name:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Display Name
          description: The display name for the buyer.
          examples:
            - John Doe
        external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: External Identifier
          description: The merchant identifier for this buyer.
          examples:
            - buyer-12345
        billing_details:
          anyOf:
            - $ref: '#/components/schemas/BillingDetails'
            - type: 'null'
          description: The billing name, address, email, and other fields for this buyer.
        account_number:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Account Number
          description: The buyer account number.
      additionalProperties: false
      type: object
      title: TransactionBuyer
    PayoutMerchantSummary:
      properties:
        type:
          type: string
          const: merchant
          title: Type
          description: Always `merchant`.
          default: merchant
          examples:
            - merchant
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: The name of the merchant.
          examples:
            - Acme Inc
        identification_number:
          type: string
          maxLength: 200
          minLength: 1
          title: Identification Number
          description: >-
            Unique value which identifies a merchant for processing
            transactions, also known as a MID.
          examples:
            - '12345'
        phone_number:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          title: Phone Number
          description: >-
            The phone number for the merchant which should be formatted
            according to the E164 number standard.
          examples:
            - '+14155552671'
            - '+442071838750'
        url:
          type: string
          title: Url
          description: Merchant website URL.
          examples:
            - https://example.com
        statement_descriptor:
          anyOf:
            - type: string
              maxLength: 22
              minLength: 5
            - type: 'null'
          title: Statement Descriptor
          description: Value to explain charges or payments on bank statements.
          examples:
            - Winnings
        merchant_category_code:
          type: string
          maxLength: 4
          minLength: 1
          title: Merchant Category Code
          description: >-
            Merchant classification for the type of goods or services it
            provides.
          examples:
            - '1234'
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The address for the merchant.
      additionalProperties: false
      type: object
      required:
        - name
        - identification_number
        - phone_number
        - url
        - merchant_category_code
      title: PayoutMerchantSummary
      description: |-
        PayoutMerchantSummary

        Represents a summary of a merchant.
    TransactionPaymentMethod:
      properties:
        type:
          type: string
          const: payment-method
          title: Type
          description: Always `payment-method`.
          default: payment-method
          examples:
            - payment-method
        approval_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Approval Url
          description: >-
            The optional URL that the buyer needs to be redirected to to further
            authorize their payment.
          examples:
            - https://gr4vy.app/redirect/12345
        country:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Country
          description: >-
            The 2-letter ISO code of the country this payment method can be used
            for. If this value is null the payment method may be used in
            multiple countries.
          examples:
            - US
        currency:
          anyOf:
            - type: string
              pattern: ^[A-Z]{3}$
              examples:
                - EUR
                - GBP
                - USD
            - type: 'null'
          title: Currency
          description: >-
            The ISO-4217 currency code that this payment method can be used for.
            If this value is null the payment method may be used for multiple
            currencies.
          examples:
            - USD
        details:
          anyOf:
            - $ref: '#/components/schemas/PaymentMethodDetailsCard'
            - type: 'null'
          description: Details for credit or debit card payment method.
        expiration_date:
          anyOf:
            - type: string
              maxLength: 5
              minLength: 5
              pattern: ^\d{2}/\d{2}$
            - type: 'null'
          title: Expiration Date
          description: The expiration date for the payment method.
          examples:
            - 12/30
        fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Fingerprint
          description: >-
            The unique hash derived from the payment method identifier (e.g.
            card number).
          examples:
            - 20eb353620155d2b5fc864cc46a73ea77cb92c725238650839da1813fa987a17
        label:
          anyOf:
            - type: string
              maxLength: 320
              minLength: 0
            - type: 'null'
          title: Label
          description: >-
            A label for the card or the account. For a paypal payment method
            this is the user's email address. For a card it is the last 4 digits
            of the card.
          examples:
            - '1234'
        last_replaced_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Replaced At
          description: >-
            The date and time when this card was last replaced by the account
            updater.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        method:
          description: The type of this payment method.
          examples:
            - card
          type: string
          enum:
            - abitab
            - affirm
            - afterpay
            - alipay
            - alipayhk
            - applepay
            - arcuspaynetwork
            - bacs
            - bancontact
            - bank
            - banked
            - bcp
            - becs
            - bitpay
            - blik
            - ach
            - boleto
            - boost
            - breb
            - capitec
            - card
            - cashapp
            - chaseorbital
            - clearpay
            - click-to-pay
            - dana
            - dcb
            - dlocal
            - ebanx
            - eckoh
            - efecty
            - eps
            - everydaypay
            - gcash
            - gem
            - gemds
            - gift-card
            - giropay
            - givingblock
            - gocardless
            - googlepay
            - googlepay_pan_only
            - gopay
            - grabpay
            - ideal
            - kakaopay
            - kcp
            - khipu
            - klarna
            - latitude
            - latitudeds
            - laybuy
            - linepay
            - linkaja
            - maybankqrpay
            - mercadopago
            - multibanco
            - multipago
            - nequi
            - netbanking
            - network-token
            - nupay
            - oney_10x
            - oney_12x
            - oney_3x
            - oney_4x
            - oney_6x
            - onlinebankingcz
            - ovo
            - oxxo
            - p24
            - pagoefectivo
            - payid
            - paymaya
            - paypal
            - paypalpaylater
            - paypay
            - payto
            - payvalida
            - paze
            - picpay
            - pix
            - plaid
            - pse
            - rabbitlinepay
            - razorpay
            - rapipago
            - redpagos
            - scalapay
            - sepa
            - servipag
            - shopeepay
            - singteldash
            - smartpay
            - sofort
            - spei
            - stitch
            - swish
            - stripedd
            - stripetoken
            - tapi
            - tapifintechs
            - thaiqr
            - touchngo
            - truemoney
            - trustly
            - trustlyeurope
            - upi
            - venmo
            - vipps
            - waave
            - webpay
            - wechat
            - wero
            - yape
            - zippay
          title: Method
          x-speakeasy-unknown-values: allow
          overlay: 1.0.0
        mode:
          anyOf:
            - type: string
              enum:
                - card
                - redirect
                - applepay
                - googlepay
                - checkout-session
                - click-to-pay
                - gift-card
                - bank
                - paze
              title: Mode
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          description: The mode to use with this payment method.
          examples:
            - card
        scheme:
          anyOf:
            - type: string
              enum:
                - accel
                - amex
                - bancontact
                - carte-bancaire
                - cirrus
                - culiance
                - dankort
                - diners-club
                - discover
                - eftpos-australia
                - elo
                - hipercard
                - jcb
                - maestro
                - mastercard
                - mir
                - nyce
                - other
                - pulse
                - qcard
                - rupay
                - star
                - uatp
                - unionpay
                - visa
              title: CardScheme
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          description: The scheme of the card. Only applies to card payments.
          examples:
            - visa
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: The ID of the payment method.
          examples:
            - 852b951c-d7ea-4c98-b09e-4a1c9e97c077
        approval_target:
          anyOf:
            - type: string
              enum:
                - new_window
                - any
              title: ApprovalTarget
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
          description: >-
            The browser target that an approval URL must be opened in. If any or
            null, then there is no specific requirement.
          examples:
            - any
        external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: External Identifier
          description: >-
            An external identifier that can be used to match the payment method
            against your own records.
          examples:
            - card-12345
        payment_account_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Account Reference
          description: >-
            The payment account reference (PAR) returned by the card scheme.
            This is a unique reference to the underlying account that has been
            used to fund this payment method.
          examples:
            - V0010014629724763377327521982
      additionalProperties: false
      type: object
      required:
        - method
      title: TransactionPaymentMethod
    PayoutPaymentService:
      properties:
        type:
          type: string
          const: payment-service
          title: Type
          description: Always `payment-service`.
          default: payment-service
          examples:
            - payment-service
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: The ID for the payout service.
          examples:
            - b6c9eb12-2b62-4103-99b9-e3efc94e396d
        method:
          type: string
          const: card
          title: Method
          description: Always `card`.
          default: card
          examples:
            - card
        payment_service_definition_id:
          type: string
          title: Payment Service Definition Id
          description: The ID of the connection used for this payout.
          examples:
            - nuvei-card
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: The display name of the connection used for this payout.
          examples:
            - Nuvei
      additionalProperties: false
      type: object
      required:
        - payment_service_definition_id
      title: PayoutPaymentService
    ErrorDetail:
      properties:
        location:
          description: >-
            The part of the request where the property can be found that caused
            the error.
          examples:
            - body
          type: string
          enum:
            - query
            - body
            - path
            - header
            - unknown
          title: ErrorLocation
          x-speakeasy-unknown-values: allow
          overlay: 1.0.0
        pointer:
          anyOf:
            - type: string
              format: json-pointer
            - type: string
          title: Pointer
          description: A JSON pointer for the particular property that caused the error.
          examples:
            - /currency
        message:
          type: string
          title: Message
          description: A human-readdable explanation of the error.
          examples:
            - 'Unknown ISO 4217 currency code: USX'
        type:
          type: string
          title: Type
          description: The type of error that was raised for this property.
          examples:
            - value_error
      additionalProperties: false
      type: object
      required:
        - location
        - pointer
        - message
        - type
      title: ErrorDetail
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    BillingDetails:
      properties:
        first_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: First Name
          description: The first name(s) or given name for the buyer.
          examples:
            - John
        last_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Last Name
          description: The last name, or family name, of the buyer.
          examples:
            - Doe
        email_address:
          anyOf:
            - type: string
              maxLength: 320
              minLength: 1
            - type: 'null'
          title: Email Address
          description: The email address for the buyer.
          examples:
            - john@example.com
        phone_number:
          anyOf:
            - type: string
              pattern: ^\+[1-9]\d{1,14}$
              examples:
                - '+14155552671'
                - '+442071838750'
            - type: 'null'
          title: Phone Number
          description: >-
            The phone number for the buyer which should be formatted according
            to the E164 number standard.
          examples:
            - '+1234567890'
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The billing address for the buyer.
        tax_id:
          anyOf:
            - $ref: '#/components/schemas/TaxId'
            - type: 'null'
          description: The tax ID information associated with the billing details.
      additionalProperties: false
      type: object
      title: BillingDetails
    ShippingDetailsCreate:
      properties:
        first_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: First Name
          description: The first name(s) or given name for the buyer.
          examples:
            - John
        last_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Last Name
          description: The last name, or family name, of the buyer.
          examples:
            - Doe
        email_address:
          anyOf:
            - type: string
              maxLength: 320
              minLength: 1
            - type: 'null'
          title: Email Address
          description: The email address for the buyer.
          examples:
            - john@example.com
        phone_number:
          anyOf:
            - type: string
              pattern: ^\+[1-9]\d{1,14}$
              examples:
                - '+14155552671'
                - '+442071838750'
            - type: 'null'
          title: Phone Number
          description: >-
            The phone number for the buyer which should be formatted according
            to the E164 number standard.
          examples:
            - '+1234567890'
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The billing address for the buyer.
      additionalProperties: false
      type: object
      title: ShippingDetailsCreate
    Address:
      properties:
        city:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: City
          description: The city for the address.
          examples:
            - San Jose
        country:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Country
          description: The country for the address in ISO 3166 format.
          examples:
            - US
        postal_code:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Postal Code
          description: The postal code or zip code for the address.
          examples:
            - '94560'
        state:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: State
          description: The state, county, or province for the address.
          examples:
            - California
        state_code:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}-[A-Z0-9]{1,3}$
              examples:
                - GB-LND
                - US-CA
            - type: 'null'
          title: State Code
          description: >-
            The code of state, county, or province for the address in ISO 3166-2
            format.
          examples:
            - US-CA
        house_number_or_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: House Number Or Name
          description: >-
            The house number or name for the address. Not all payment services
            use this field but some do.
          examples:
            - '10'
        line1:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Line1
          description: The first line of the address.
          examples:
            - Stafford Appartments
        line2:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Line2
          description: The second line of the address.
          examples:
            - 29th Street
        organization:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Organization
          description: >-
            The optional name of the company or organisation to add to the
            address.
          examples:
            - Gr4vy
      additionalProperties: false
      type: object
      title: Address
    CheckoutPayoutOptions:
      properties:
        processing_channel_id:
          type: string
          title: Processing Channel Id
          description: The processing channel to be used for the payment.
          examples:
            - channel-1234
        source_id:
          type: string
          title: Source Id
          description: The ID of the currency account that will fund the payout.
          examples:
            - acct-1234
      additionalProperties: false
      type: object
      required:
        - processing_channel_id
        - source_id
      title: CheckoutPayoutOptions
    PaymentMethodDetailsCard:
      properties:
        bin:
          anyOf:
            - type: string
              maxLength: 8
              minLength: 6
              pattern: ^\d+$
            - type: 'null'
          title: Bin
        card_type:
          anyOf:
            - type: string
              enum:
                - credit
                - debit
                - prepaid
              title: CardType
              x-speakeasy-unknown-values: allow
              overlay: 1.0.0
            - type: 'null'
        card_issuer_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Card Issuer Name
      additionalProperties: false
      type: object
      title: PaymentMethodDetailsCard
    TaxId:
      properties:
        value:
          type: string
          maxLength: 50
          minLength: 1
          title: Value
          description: The tax ID for the buyer.
          examples:
            - '12345678931'
        kind:
          description: The kind of tax ID
          examples:
            - us.ein
          type: string
          enum:
            - ae.trn
            - au.abn
            - ar.dni
            - ar.cuil
            - ar.cuit
            - br.cnpj
            - br.cpf
            - ca.bn
            - ca.gst_hst
            - ca.pst_bc
            - ca.pst_mb
            - ca.pst_sk
            - ca.qst
            - ch.vat
            - cl.tin
            - co.itin
            - co.nit
            - co.cc
            - co.ce
            - co.de
            - co.rc
            - co.ti
            - co.passport
            - es.cif
            - eu.vat
            - gb.vat
            - hk.br
            - id.nik
            - id.npwp
            - in.gst
            - in.pan
            - jp.cn
            - jp.rn
            - kr.brn
            - li.uid
            - mx.curp
            - mx.rfc
            - my.frp
            - my.itn
            - my.nric
            - my.sst
            - no.vat
            - nz.gst
            - pe.ruc
            - ph.tin
            - ru.inn
            - ru.kpp
            - sa.vat
            - sg.gst
            - sg.uen
            - th.id
            - th.vat
            - tw.vat
            - us.ein
            - za.vat
            - bo.ci
            - uy.rut
            - uy.ci
          title: TaxIdKind
          x-speakeasy-unknown-values: allow
          overlay: 1.0.0
      additionalProperties: false
      type: object
      required:
        - value
        - kind
      title: TaxId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````