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

# Capture transaction

> Captures a previously authorized transaction. You can capture the full or a partial amount, as long as it does not exceed the authorized amount (unless over-capture is enabled).

This endpoint requires the `transactions.write` scope.


## OpenAPI

````yaml /openapi.speakeasy.json POST /transactions/{transaction_id}/capture
openapi: 3.1.0
info:
  title: mattilda Pay
  description: The mattilda Pay API.
  version: 1.0.0
servers:
  - url: https://api.sandbox.mattildapayments.com
    x-speakeasy-server-id: sandbox
  - url: https://api.mattildapayments.com
    x-speakeasy-server-id: production
security:
  - bearerAuth: []
tags:
  - 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 - Payment methods
    description: Query payment methods for buyers.
  - name: Buyers - Shipping details
    description: Manage shipping details for buyers.
  - 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: Merchant accounts
    description: Manage merchant accounts in an instance.
  - name: Payment links
    description: Manage payment links.
  - name: Payment methods
    description: Manage stored payment methods.
  - 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.
paths:
  /transactions/{transaction_id}/capture:
    post:
      tags:
        - Transactions
      summary: Capture transaction
      description: >-
        Captures a previously authorized transaction. You can capture the full
        or a partial amount, as long as it does not exceed the authorized amount
        (unless over-capture is enabled).
      operationId: capture_transaction
      parameters:
        - name: transaction_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The ID of the transaction
            examples:
              - 7099948d-7286-47e4-aad8-b68f7eb44591
            title: Transaction Id
          description: The ID of the transaction
        - 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/TransactionCapture'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '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: csharp
          label: C#
          source: |-
            using Gr4vy;
            using Gr4vy.Models.Components;

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

            var res = await sdk.Transactions.CaptureAsync(
                transactionId: "7099948d-7286-47e4-aad8-b68f7eb44591",
                transactionCapture: new TransactionCapture() {}
            );

            // handle response
        - lang: typescript
          label: Typescript
          source: |-
            import { Gr4vy } from "@gr4vy/sdk";

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

            async function run() {
              const result = await gr4vy.transactions.capture({}, "7099948d-7286-47e4-aad8-b68f7eb44591");

              console.log(result);
            }

            run();
        - lang: python
          label: Python
          source: |-
            from gr4vy import Gr4vy, auth
            import os


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

                res = g_client.transactions.capture(transaction_id="7099948d-7286-47e4-aad8-b68f7eb44591")

                # Handle response
                print(res)
        - lang: go
          label: Go
          source: "package main\n\nimport(\n\t\"context\"\n\tgr4vygo \"github.com/gr4vy/gr4vy-go\"\n\t\"os\"\n\t\"github.com/gr4vy/gr4vy-go/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    privateKey := \"....\"\n\twithToken := gr4vy.WithToken(privateKey, []JWTScope{ReadAll, WriteAll}, 60)\n\n\ts := gr4vy.New(\n\t\tgr4vy.WithID(\"mattilda\"),\n\t\tgr4vy.WithServer(gr4vy.ServerSandbox),\n\t\tgr4vy.WithSecuritySource(withToken),\n\t\tgr4vy.WithMerchantAccountID(\"default\"),\n\t)\n\n    res, err := s.Transactions.Capture(ctx, \"7099948d-7286-47e4-aad8-b68f7eb44591\", components.TransactionCapture{})\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;
            use Gr4vy\Auth;

             
            $privateKey = "..."; 

            $sdk = Gr4vy\SDK::builder()
                -\u003esetId('mattilda')
                -\u003esetServer('sandbox')
                -\u003esetSecuritySource(Auth::withToken($privateKey))
                -\u003esetMerchantAccountId('default')
                -\u003ebuild();

            $transactionCapture = new Gr4vy\TransactionCapture();

            $response = $sdk->transactions->capture(
                transactionId: '7099948d-7286-47e4-aad8-b68f7eb44591',
                transactionCapture: $transactionCapture

            );

            if ($response->transaction !== null) {
                // handle response
            }
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import java.lang.Exception;

            import com.gr4vy.sdk.BearerSecuritySource;

            import com.gr4vy.sdk.Gr4vy;

            import com.gr4vy.sdk.Gr4vy.AvailableServers;

            import org.openapis.openapi.models.components.TransactionCapture;

            import org.openapis.openapi.models.errors.*;

            import
            org.openapis.openapi.models.operations.CaptureTransactionResponse;


            public class Application {

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

                    Gr4vy sdk = Gr4vy.builder()
                            .id("mattilda")
                            .server(AvailableServers.SANDBOX)
                            .merchantAccountId("default")
                            .securitySource(new BearerSecuritySource.Builder(privateKey).build())
                        .build();

                    CaptureTransactionResponse res = sdk.transactions().capture()
                            .transactionId("7099948d-7286-47e4-aad8-b68f7eb44591")
                            .transactionCapture(TransactionCapture.builder()
                                .build())
                            .call();

                    if (res.transaction().isPresent()) {
                        // handle response
                    }
                }
            }
components:
  schemas:
    TransactionCapture:
      properties:
        amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Amount
          description: >-
            The amount to capture, in the smallest currency unit (e.g., cents).
            This must be less than or equal to the authorized amount, unless
            over-capture is available.
          examples:
            - 1299
      additionalProperties: false
      type: object
      title: TransactionCapture
      description: Request body for capturing an authorized transaction.
    Transaction:
      properties:
        type:
          type: string
          const: transaction
          title: Type
          description: Always `transaction`.
          default: transaction
          examples:
            - transaction
        id:
          type: string
          format: uuid
          title: Id
          description: The ID for the transaction.
          examples:
            - 7099948d-7286-47e4-aad8-b68f7eb44591
        reconciliation_id:
          type: string
          title: Reconciliation Id
          description: >-
            The base62 encoded transaction ID. This represents a shorter version
            of this transaction's `id` which is sent to payment services,
            anti-fraud services, and other connectors. You can use this ID to
            reconcile a payment service's transaction against our system. This
            ID is sent instead of the transaction ID because not all services
            support 36 digit identifiers.
          examples:
            - default
        merchant_account_id:
          type: string
          title: Merchant Account Id
          description: The ID of the merchant account this transaction belongs to.
          examples:
            - default
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          title: Currency
          description: The currency code for this transaction.
          examples:
            - EUR
            - GBP
            - MXN
        amount:
          type: integer
          title: Amount
          description: >-
            The total amount for this transaction across all funding sources
            including gift cards.
          examples:
            - 1299
        status:
          $ref: '#/components/schemas/TransactionStatus'
          description: >-
            The status of the transaction for the `payment_method`. The status
            may change over time as asynchronous processing events occur.
          examples:
            - authorization_succeeded
        authorized_amount:
          type: integer
          title: Authorized Amount
          description: >-
            The amount for this transaction that has been authorized for the
            `payment_method`. This can be less than the `amount` if gift cards
            were used.
          examples:
            - 1299
        captured_amount:
          type: integer
          title: Captured Amount
          description: >-
            The total amount captured for this transaction, in the smallest
            currency unit (for example, cents or pence). This can be the full
            value of the `authorized_amount` or less.
          examples:
            - 1299
        refunded_amount:
          type: integer
          title: Refunded Amount
          description: >-
            The total amount refunded for this transaction, in the smallest
            currency unit (for example, cents or pence). This can be the full
            value of the `captured_amount` or less.
          examples:
            - 1299
        country:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Country
          description: >-
            The 2-letter ISO 3166-1 alpha-2 country code for the transaction.
            Used to filter payment services for processing.
          examples:
            - US
        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 transaction
            against your own records.
          examples:
            - transaction-12345
        intent:
          $ref: '#/components/schemas/TransactionIntent'
          description: The original `intent` used when the transaction was created.
          examples:
            - capture
        payment_method:
          anyOf:
            - $ref: '#/components/schemas/TransactionPaymentMethod'
            - type: 'null'
          description: The payment method used for this transaction.
        method:
          anyOf:
            - $ref: '#/components/schemas/Method'
            - type: 'null'
          description: The method used for the transaction.
          examples:
            - card
        instrument_type:
          anyOf:
            - $ref: '#/components/schemas/InstrumentType'
            - type: 'null'
          description: The name of the instrument used to process the transaction.
          examples:
            - pan
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: The standardized error code set by Gr4vy.
          examples:
            - missing_redirect_url
        payment_service:
          anyOf:
            - $ref: '#/components/schemas/TransactionPaymentService'
            - type: 'null'
          description: The payment service used for this transaction.
        pending_review:
          type: boolean
          title: Pending Review
          description: >-
            Whether a manual anti fraud review is pending with an anti fraud
            service.
          default: false
          examples:
            - false
        buyer:
          anyOf:
            - $ref: '#/components/schemas/TransactionBuyer'
            - type: 'null'
          description: The buyer used for this transaction.
        raw_response_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Raw Response Code
          description: >-
            This is the response code received from the payment service. This
            can be set to any value and is not standardized across different
            payment services.
          examples:
            - E104
        raw_response_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Raw Response Description
          description: ' This is the response description received from the payment service. This can be set to any value and is not standardized across different payment services.'
          examples:
            - Missing redirect URL
        shipping_details:
          anyOf:
            - $ref: '#/components/schemas/ShippingDetails'
            - type: 'null'
          description: The shipping details associated with the transaction.
        checkout_session_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Checkout Session Id
          description: >-
            The identifier for the checkout session this transaction is
            associated with.
          examples:
            - 4137b1cf-39ac-42a8-bad6-1c680d5dab6b
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            The date and time when the transaction was created, in ISO 8601
            format.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: >-
            The date and time when the transaction was last updated, in ISO 8601
            format.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        auth_response_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Auth Response Code
          description: This is the response description received from the processor.
          examples:
            - '00'
        avs_response_code:
          anyOf:
            - $ref: '#/components/schemas/AVSResponseCode'
            - type: 'null'
          description: >-
            The response code received from the payment service for the Address
            Verification Check (AVS). This code is mapped to a standardized
            Gr4vy AVS response code.
          examples:
            - match
        cvv_response_code:
          anyOf:
            - $ref: '#/components/schemas/CVVResponseCode'
            - type: 'null'
          description: >-
            The response code received from the payment service for the Card
            Verification Value (CVV). This code is mapped to a standardized
            Gr4vy CVV response code.
          examples:
            - match
        anti_fraud_decision:
          anyOf:
            - $ref: '#/components/schemas/AntiFraudDecision'
            - type: 'null'
          description: >-
            The mapped decision received from the anti-fraud service. In case of
            a review decision this field is not updated once the review is
            resolved.
          examples:
            - accept
        payment_source:
          $ref: '#/components/schemas/TransactionPaymentSource'
          description: The source of the transaction.
          examples:
            - ecommerce
        merchant_initiated:
          type: boolean
          title: Merchant Initiated
          description: >-
            Indicates whether the transaction was initiated by the merchant or
            the customer.
          examples:
            - true
        is_subsequent_payment:
          type: boolean
          title: Is Subsequent Payment
          description: >-
            Indicates whether the transaction represents a subsequent payment or
            an initial one.
          examples:
            - false
        cart_items:
          anyOf:
            - items:
                $ref: '#/components/schemas/CartItem'
              type: array
            - type: 'null'
          title: Cart Items
          description: >-
            An array of cart items that represents the line items of a
            transaction.
        scheme_transaction_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Scheme Transaction Id
          description: >-
            An identifier for the transaction used by the scheme itself, when
            available.
          examples:
            - '123456789012345'
        three_d_secure:
          anyOf:
            - $ref: '#/components/schemas/TransactionThreeDSecureSummary'
            - type: 'null'
          description: >-
            The 3-D Secure data that was sent to the payment service for the
            transaction.
        payment_service_transaction_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Service Transaction Id
          description: The payment service's unique ID for the transaction.
          examples:
            - tx-12345
        additional_identifiers:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          type: object
          title: Additional Identifiers
          description: >-
            A list of additional identifiers that we may keep track of to manage
            this transaction. This may include the authorization ID, capture ID,
            and processor ID, as well as an undefined list of additional
            identifiers.
          examples:
            - payment_service_authorization_id: auth-12345
              payment_service_capture_id: capture-12345
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            Additional information about the transaction stored as key-value
            pairs.
          examples:
            - cohort: cohort-12345
              order: order-12345
        authorized_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Authorized At
          description: The date this transaction was authorized at.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        captured_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Captured At
          description: The date this transaction was captured at.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        voided_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Voided At
          description: The date this transaction was voided at.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        approval_expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Approval Expires At
          description: The date this transaction's approval URL will expire at.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        buyer_approval_timedout_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Buyer Approval Timedout At
          description: The date this transaction's approval timed out at.
          examples:
            - '2013-07-16T19:23:00.000+00:00'
        intent_outcome:
          $ref: '#/components/schemas/TransactionIntentOutcome'
          description: >-
            The outcome of the original intent of a transaction. This allows you
            to understand if the intent of the transaction (e.g. `capture` or
            `authorize`) has been achieved when dealing with multiple payment
            instruments.
          examples:
            - succeeded
        multi_tender:
          type: boolean
          title: Multi Tender
          description: >-
            The outcome of the original intent of a transaction. This allows you
            to understand if the intent of the transaction (e.g. `capture` or
            `authorize`) has been achieved when dealing with multiple payment
            instruments.
          examples:
            - true
        merchant_advice_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Merchant Advice Code
          description: >-
            An optional merchant advice code which provides insight into the
            type of transaction or reason why the payment failed.
          examples:
            - '02'
            - '21'
        installment_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Installment Count
          description: The number of installments for this transaction, if applicable.
          examples:
            - 3
      additionalProperties: false
      type: object
      required:
        - id
        - reconciliation_id
        - merchant_account_id
        - currency
        - amount
        - status
        - authorized_amount
        - captured_amount
        - refunded_amount
        - intent
        - gift_card_redemptions
        - created_at
        - updated_at
        - payment_source
        - merchant_initiated
        - is_subsequent_payment
        - intent_outcome
        - multi_tender
      title: Transaction
      description: A full transaction resource.
    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: []
      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
    TransactionStatus:
      type: string
      enum:
        - processing
        - authorization_succeeded
        - authorization_declined
        - authorization_failed
        - authorization_voided
        - authorization_void_pending
        - capture_succeeded
        - capture_pending
        - buyer_approval_pending
      title: TransactionStatus
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    TransactionIntent:
      type: string
      enum:
        - authorize
        - capture
      title: TransactionIntent
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    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
                - MXN
            - 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:
            - MXN
        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 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:
          $ref: '#/components/schemas/Method'
          description: The type of this payment method.
          examples:
            - card
        mode:
          anyOf:
            - $ref: '#/components/schemas/Mode'
            - type: 'null'
          description: The mode to use with this payment method.
          examples:
            - card
        scheme:
          anyOf:
            - $ref: '#/components/schemas/CardScheme'
            - 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:
            - $ref: '#/components/schemas/ApprovalTarget'
            - 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
    Method:
      type: string
      enum:
        - card
        - oxxo
        - spei
        - pse
        - tapi
        - tapifintechs
      title: Method
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    InstrumentType:
      type: string
      enum:
        - pan
        - card_token
        - redirect
        - redirect_token
        - googlepay
        - applepay
        - network_token
      title: InstrumentType
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    TransactionPaymentService:
      properties:
        type:
          type: string
          const: payment-service
          title: Type
          description: Always `payment-service`.
          default: payment-service
          examples:
            - payment-service
        id:
          type: string
          format: uuid
          title: Id
          description: The ID for the payment-service.
          examples:
            - 824ff064-7f4b-430b-9801-59aff90d013e
        payment_service_definition_id:
          type: string
          maxLength: 50
          minLength: 1
          title: Payment Service Definition Id
          description: The definition ID of the service used to process this payment.
          examples:
            - stripe-card
        method:
          $ref: '#/components/schemas/Method'
          description: The payment method that this service handles.
          examples:
            - card
        display_name:
          type: string
          title: Display Name
          description: The display name for the payment service.
          examples:
            - Stripe USA
      additionalProperties: false
      type: object
      required:
        - id
        - payment_service_definition_id
        - method
        - display_name
      title: TransactionPaymentService
    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-Output'
            - 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
    ShippingDetails:
      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.
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: The ID for the shipping details.
          examples:
            - bf8c36ad-02d9-4904-b0f9-a230b149e341
        buyer_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Buyer Id
          description: The ID for the buyer.
          examples:
            - fe26475d-ec3e-4884-9553-f7356683f7f9
        type:
          type: string
          const: shipping-details
          title: Type
          description: Always `shipping-details`.
          default: shipping-details
          examples:
            - shipping-details
      additionalProperties: false
      type: object
      title: ShippingDetails
    AVSResponseCode:
      type: string
      enum:
        - match
        - no_match
        - partial_match_address
        - partial_match_postcode
        - unavailable
      title: AVSResponseCode
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    CVVResponseCode:
      type: string
      enum:
        - match
        - no_match
        - unavailable
        - not_provided
      title: CVVResponseCode
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    AntiFraudDecision:
      type: string
      enum:
        - accept
        - error
        - exception
        - reject
        - review
        - skipped
      title: AntiFraudDecision
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    TransactionPaymentSource:
      type: string
      enum:
        - ecommerce
        - moto
        - recurring
        - installment
        - card_on_file
      title: TransactionPaymentSource
      description: The way payment method information made it to this transaction.
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    CartItem:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: >-
            The name of the cart item. The value you set for this property may
            be truncated if the maximum length accepted by a payment service
            provider is less than 255 characters.
          examples:
            - GoPro HD
        quantity:
          type: integer
          maximum: 99999999
          exclusiveMinimum: 0
          title: Quantity
          description: >-
            The quantity of this item in the cart. This value cannot be negative
            or zero.
          examples:
            - 2
        unit_amount:
          type: integer
          maximum: 99999999
          minimum: 0
          title: Unit Amount
          description: >-
            The amount for an individual item represented as a monetary amount
            in the smallest currency unit for the given currency, for example
            `1299` MXN cents represents `$12.99`. The amount sent through to the
            payment processor as unitary amount will be calculated to include
            the discount and tax values sent as part of this cart item.
          examples:
            - 1299
        discount_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Discount Amount
          description: >-
            The amount discounted for this item represented as a monetary amount
            in the smallest currency unit for the given currency, for example
            `1299` MXN cents represents `$12.99`.
          default: 0
          examples:
            - 0
        tax_amount:
          anyOf:
            - type: integer
              maximum: 99999999
              minimum: 0
            - type: 'null'
          title: Tax Amount
          description: >-
            The tax amount for this item represented as a monetary amount in the
            smallest currency unit for the given currency, for example `1299`
            MXN cents represents `$12.99`.
          default: 0
          examples:
            - 0
        external_identifier:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: External Identifier
          description: >-
            An external identifier for the cart item. This can be set to any
            value and is not sent to the payment service.
          examples:
            - goprohd
        sku:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
            - type: 'null'
          title: Sku
          description: The SKU for the item.
          examples:
            - GPHD1078
        product_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Url
          description: The product URL for the item.
          examples:
            - https://example.com/catalog/go-pro-hd
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
          description: The URL for the image of the item.
          examples:
            - https://example.com/images/go-pro-hd.jpg
        categories:
          anyOf:
            - items:
                type: string
                maxLength: 50
                minLength: 1
              type: array
            - type: 'null'
          title: Categories
          description: A list of strings containing product categories for the item.
          examples:
            - - camera
              - travel
              - gear
        product_type:
          anyOf:
            - $ref: '#/components/schemas/ProductType'
            - type: 'null'
          description: The product type of the cart item.
          examples:
            - physical
        seller_country:
          anyOf:
            - type: string
              pattern: ^[A-Z]{2}$
              examples:
                - DE
                - GB
                - US
            - type: 'null'
          title: Seller Country
          description: The seller country of the cart item.
          examples:
            - US
            - GB
      additionalProperties: false
      type: object
      required:
        - name
        - quantity
        - unit_amount
      title: CartItem
    TransactionThreeDSecureSummary:
      properties:
        version:
          anyOf:
            - type: string
              pattern: ^[12](\.\d+){0,2}$
            - type: 'null'
          title: Version
          description: The version of 3DS used for this transaction.
          examples:
            - 2.2.0
        status:
          anyOf:
            - $ref: '#/components/schemas/ThreeDSecureStatus'
            - type: 'null'
          description: The status of the 3DS challenge for this transaction.
          examples:
            - complete
        method:
          anyOf:
            - $ref: '#/components/schemas/ThreeDSecureMethod'
            - type: 'null'
          description: The method used for 3DS authentication for this transaction.
          examples:
            - challenge
        response_data:
          anyOf:
            - $ref: '#/components/schemas/ThreeDSecureDataV1'
            - $ref: '#/components/schemas/ThreeDSecureV2'
            - type: 'null'
          title: Response Data
          description: >-
            The 3DS data sent to the payment service for this transaction. This
            will only be populated if external 3DS data was passed in directly
            as part of the transaction API call, or if our 3DS server returned a
            status code of `Y` or `A`. In case of a failure to authenticate
            (status `N`, `R`, or `U`) this field will not be populated. To see
            full details about the 3DS calls please use our transaction events
            API.
        error_data:
          anyOf:
            - $ref: '#/components/schemas/ThreeDSecureError'
            - type: 'null'
          description: >-
            The error data received from our 3DS server. This will not be
            populated if the customer failed the authentication with a status
            code of `N`, `R`, or `U`.  To see full details about the 3DS calls
            in those situations please use our transaction events API.
      additionalProperties: false
      type: object
      title: TransactionThreeDSecureSummary
    TransactionIntentOutcome:
      type: string
      enum:
        - pending
        - succeeded
        - failed
      title: TransactionIntentOutcome
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    ErrorDetail:
      properties:
        location:
          $ref: '#/components/schemas/ErrorLocation'
          description: >-
            The part of the request where the property can be found that caused
            the error.
          examples:
            - body
        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
    PaymentMethodDetailsCard:
      properties:
        bin:
          anyOf:
            - type: string
              maxLength: 8
              minLength: 6
              pattern: ^\d+$
            - type: 'null'
          title: Bin
        card_type:
          anyOf:
            - $ref: '#/components/schemas/CardType'
            - type: 'null'
        card_issuer_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Card Issuer Name
      additionalProperties: false
      type: object
      title: PaymentMethodDetailsCard
    Mode:
      type: string
      enum:
        - card
        - redirect
        - applepay
        - googlepay
        - checkout-session
        - click-to-pay
        - gift-card
      title: Mode
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    CardScheme:
      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
        - rupay
        - star
        - uatp
        - unionpay
        - visa
      title: CardScheme
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    ApprovalTarget:
      type: string
      enum:
        - new_window
        - any
      title: ApprovalTarget
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    BillingDetails-Output:
      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
    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
    ProductType:
      type: string
      enum:
        - physical
        - discount
        - shipping_fee
        - sales_tax
        - digital
        - gift_card
        - store_credit
        - surcharge
      title: ProductType
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    ThreeDSecureStatus:
      type: string
      enum:
        - setup_error
        - error
        - declined
        - cancelled
        - complete
      title: ThreeDSecureStatus
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    ThreeDSecureMethod:
      type: string
      enum:
        - challenge
        - frictionless
      title: ThreeDSecureMethod
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    ThreeDSecureDataV1:
      properties:
        cavv:
          type: string
          title: Cavv
          description: The cardholder authentication value or AAV.
          examples:
            - 3q2+78r+ur7erb7vyv66vv8=
        eci:
          type: string
          maxLength: 2
          minLength: 1
          pattern: ^0?\d$
          title: Eci
          description: The ecommerce indicator for the 3DS transaction.
          examples:
            - '05'
        version:
          type: string
          pattern: ^[12](\.\d+){0,2}$
          title: Version
          description: The version of 3-D Secure that was used.
          examples:
            - 2.1.0
        directory_response:
          type: string
          maxLength: 1
          title: Directory Response
          description: >-
            For 3-D Secure version 1, the enrolment response. For 3-D Secure
            version 2 and above, the transaction status from the `ARes`.
          examples:
            - C
        scheme:
          anyOf:
            - $ref: '#/components/schemas/CardScheme'
            - type: 'null'
          description: The scheme/brand of the card that is used for 3-D Secure.
          examples:
            - visa
        authentication_response:
          type: string
          maxLength: 1
          title: Authentication Response
          description: ' The response for the 3DS authentication call.'
          examples:
            - 'Y'
        cavv_algorithm:
          type: string
          maxLength: 1
          title: Cavv Algorithm
          description: The CAVV algorithm used.
          examples:
            - A
        xid:
          type: string
          title: Xid
          description: The transaction identifier.
          examples:
            - '12345'
      additionalProperties: false
      type: object
      required:
        - cavv
        - eci
        - version
        - directory_response
        - authentication_response
        - cavv_algorithm
        - xid
      title: ThreeDSecureDataV1
    ThreeDSecureV2:
      properties:
        version:
          type: string
          pattern: ^[12](\.\d+){0,2}$
          title: Version
        authentication_response:
          anyOf:
            - type: string
            - type: 'null'
          title: Authentication Response
        directory_response:
          anyOf:
            - type: string
            - type: 'null'
          title: Directory Response
        directory_transaction_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Directory Transaction Id
        transaction_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Transaction Reason
        cavv:
          anyOf:
            - type: string
            - type: 'null'
          title: Cavv
        eci:
          anyOf:
            - type: string
              maxLength: 2
              minLength: 1
              pattern: ^0?\d$
            - type: 'null'
          title: Eci
        cardholder_info:
          anyOf:
            - type: string
            - type: 'null'
          title: Cardholder Info
      additionalProperties: false
      type: object
      required:
        - version
      title: ThreeDSecureV2
    ThreeDSecureError:
      properties:
        code:
          anyOf:
            - type: string
              maxLength: 3
              minLength: 3
            - type: 'null'
          title: Code
          description: The error code.
          examples:
            - '305'
        description:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Description
          description: The error description.
          examples:
            - Invalid ThreeDSCompInd
        detail:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Detail
          description: Detail about the 3DS error.
          examples:
            - The threeDSCompInd must be 'Y' when successful
        component:
          anyOf:
            - type: string
              maxLength: 1
              minLength: 1
            - type: 'null'
          title: Component
          description: Code indicating the 3-D Secure component that identified the error.
          examples:
            - C
      additionalProperties: false
      type: object
      title: ThreeDSecureError
    ErrorLocation:
      type: string
      enum:
        - query
        - body
        - path
        - header
        - unknown
      title: ErrorLocation
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    CardType:
      type: string
      enum:
        - credit
        - debit
        - prepaid
      title: CardType
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
    TaxId:
      properties:
        value:
          type: string
          maxLength: 50
          minLength: 1
          title: Value
          description: The tax ID for the buyer.
          examples:
            - '12345678931'
        kind:
          $ref: '#/components/schemas/TaxIdKind'
          description: The kind of tax ID
          examples:
            - mx.rfc
      additionalProperties: false
      type: object
      required:
        - value
        - kind
      title: TaxId
    TaxIdKind:
      type: string
      enum:
        - co.itin
        - co.nit
        - mx.curp
        - mx.rfc
        - pe.ruc
      title: TaxIdKind
      x-speakeasy-unknown-values: allow
      overlay: 1.0.0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````