openapi: '3.0.1'
info:
  title: Checkout.com API Reference
  version: 'v1.0.0'
  x-logo:
    url: 'https://assets.checkout.com/docs/logos/CKO-API-1.svg'
    backgroundColor: '#E6E7EC'
    altText: 'Checkout.com API logo'
    href: 'https://api-reference.checkout.com/'
  contact:
    name: 'Checkout.com Support'
    url: 'https://dashboard.checkout.com/support'
  termsOfService: https://www.checkout.com/legal/terms-and-policies
  description: >
    # Get started

    Checkout.com provides a collection of APIs that enable you to integrate with our various products and services. 
    </br></br>

    Our APIs accept and return JSON in the HTTP body, and return standard <a href="https://www.checkout.com/docs/resources/codes/http-response-codes">HTTP response codes</a>. You can consume the APIs directly using any HTTP or REST library.
    </br></br>
    
    <a href="https://www.checkout.com/get-test-account">Sign up for a test account</a> to gain access to the sandbox environment, where you can test API calls without affecting live data.
    </br></br>

    For more information, see:

    - <a target="_blank" href="https://www.checkout.com/docs/developer-resources/api/api-endpoints">API endpoints</a>

    - <a target="_blank" href="https://www.checkout.com/docs/developer-resources/api/api-rate-limits">API rate limits</a>

    - <a target="_blank" href="https://www.checkout.com/docs/developer-resources/api/api-changes">API changes</a>

    - <a target="_blank" href="https://www.checkout.com/docs/developer-resources/api/idempotency">Idempotency</a>
    
    - <a target="_blank" href="https://www.checkout.com/docs/developer-resources/api/private-connections">Private connections</a>

    # Base URLs

    The base URLs you must use for your API calls to the sandbox and production environments are unique to you.

    - `https://{prefix}.api.sandbox.checkout.com/{path}`
    - `https://{prefix}.api.checkout.com/{path}`
    - `https://{prefix}.access.sandbox.checkout.com/{path}`
    - `https://{prefix}.access.checkout.com/{path}`
    </br></br>

    The unique API endpoint host names resolve to Checkout.com's [IP addresses](https://www.checkout.com/docs/developer-resources/ip-addresses). Do not allowlist these IP addresses.

    The `{prefix}` value in each base URL is a string containing the first eight characters of each of your environments' unique `client_id`, excluding the `cli_` prefix. 

    To find your unique base URL: 

    1. Sign in to the Dashboard environment you want to retrieve the base URL for:

        - <a target="_blank" href="https://dashboard.sandbox.checkout.com">Sandbox</a>
      
        - <a target="_blank" href="https://dashboard.checkout.com">Production</a>

    2. Go to _Developers_ > _Overview_.
    <br/>Your unique base URL is displayed on the _Developer overview_ page. For example, `https://vkuhvk4v.api.checkout.com`.

    3. Alternatively, go to _Settings_ > _Account details_.
    <br/>Your unique base URL is displayed under _Connection settings_.

    </br></br>
    If you are unsure of your client ID or base URL for either environment, contact your account manager or <a target="_blank" href="https://dashboard.checkout.com/support/new?topic=case_account_management_and_access&amp;issue=issue_account_changes">request support</a>.
    </br></br>

    For more information, see <a target="_blank" href="https://www.checkout.com/docs/developer-resources/api/api-endpoints">API endpoints</a>.

    # Authentication

    When you sign up for an account, you can authenticate with either Access keys (OAuth 2.0), or Secret API keys.

    Unless explicitly stated, all endpoints require authentication using either your Access or Secret API Keys. Public keys should only be used in JavaScript or native applications.

    - <b>Client-side authentication</b>. Use your [public key](#section/Authentication/ApiPublicKey) for client-side authentication. It only has access to a limited set of our APIs – mostly those called as part of your payment environment.

    - <b>Server-to-server authentication</b>. Use your [secret key](#section/Authentication/ApiSecretKey) or [OAuth](#section/Authentication/OAuth) for server-to-server communication. Support for API keys depends on the endpoint.

    Never share your OAuth credentials, API keys, or access tokens. Keep them guarded and secure.

    <SecurityDefinitions />

servers:
  - url: https://{prefix}.api.sandbox.checkout.com
    description: Sandbox environment
    variables:
      prefix:
        description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
        default: "{prefix}"
  - url: https://{prefix}.api.checkout.com
    description: Production environment
    variables:
      prefix:
        description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
        default: "{prefix}"
tags:
  - name: Access
    description: Create an access token to begin using our APIs.
  - name: Apple Pay
    description: Manage your Apple Pay certificates in order to process payments via Apple Pay.
  - name: Google Pay
    description: Manage your domain enrollments to process payments via Google Pay.    
  - name: Balances
    description: View the balances for sub-accounts in an entity.
  - name: Card Metadata
    description: Retrieve card metadata
  - name: Card testing
    description: Simulate transactions using a card on the sandbox environment.
  - name: Onboarding Simulator
    description: >-
      Endpoints for driving entity state in sandbox environments.
      These endpoints are sandbox-only and return 404 in production.
      Use them to simulate status transitions and requirements-due scenarios when testing your integration.
  - name: Cardholder access tokens
    description: Create a cardholder-specific access token for secure data access with our Card Issuing SDK for <a href="https://www.checkout.com/docs/developer-resources/sdks/card-issuing-android-sdk" target="blank">Android</a> or <a href="https://www.checkout.com/docs/developer-resources/sdks/card-issuing-ios-sdk" target="blank">iOS</a>, by exchanging your access key ID and access key secret.
  - name: Cardholders
    description: Create new cardholders to issue cards to, and manage your existing cardholders.
  - name: Cards
    description: Issue new cards to your cardholders, and manage cards you've already issued.
  - name: Compliance Requests
    description: Retrieve and respond to Compliance Requests
  - name: Control groups
    description: Group multiple spending controls together and specify how to apply the combined outcome.
  - name: Control profiles
    description: Creates a control profile and applies it to the specified target.
  - name: Controls
    description: Set spending controls to limit how much can be spent over a given period of time.
  - name: Disputes
    description: Keep track of and act on your open disputes (also known as chargebacks) to submit the best possible response.
  - name: Financial actions
    description: Returns all the processed financial actions associated with your given filter. The results are ordered by processing date in descending order (latest first).
  - name: Flow
    description: |
      A <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website">Flow</a> payment session contains the information required to display relevant payment methods and handle the payment flow.

      To enable access to Flow, contact your solutions engineer or <a href="https://dashboard.checkout.com/support/new?topic=case_account_management_and_access&amp;issue=issue_account_changes" target="_blank">request support</a>.
  - name: Forex
    description: Use the Forex API to access Checkout.com's foreign exchange (FX) services.
  - name: Hosted Payments Page
    description: Create a Hosted Payments Page to accept and process payment details.
  - name: Address Document Verification
    description: Verify your users' addresses by checking their address documents.
  - name: Identity verification
    description: Verify your users' identities.
  - name: Instruments
    description: Create and manage your card and bank account payment instruments.
  - name: Network Tokens
    description: Provision network tokens and cryptograms.
  - name: Payment instruments
    description: Manage bank account payment instruments for your sub-entities.
  - name: Payment Links
    description: Create a Payment Link to accept and process payment details.
  - name: Payment Setups
    description: |
      The Payment Setup API enables you to simplify the management of complex payment flows that cover multiple payment methods.

      For more information, see <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-using-the-payment-setup-api" target="_blank">Accept a payment using the Payment Setup API</a>.
  - name: Payments
    description: Process and manage payments from a variety of sources and to various destinations all within one integration.
  - name: Payout schedules
    description: View and manage payout schedules for your sub-entities.
  - name: Platforms
    description: Manage all your sub-entities (also known as sub-merchants) through one integration, globally.
  - name: Reports
    description: Retrieve your reconciliation reports programmatically with the <a href="https://www.checkout.com/docs/reporting/reports-api">Reports API</a>.
  - name: Reserve rules
    description: View and manage reserve rules for your sub-entities.
  - name: Standalone
    description: Use Standalone Sessions to authenticate transactions with 3D Secure (3DS) and comply with Strong Customer Authentication (SCA) requirements.
  - name: Standalone Account Updater
    description: Retrieve updated card details
  - name: Tokens
    description: Create a token that represents a card's credentials that you can later use to request a payment, without you having to process or store any sensitive information.
  - name: Transfers
    description: Transfer funds while managing the entities to transfer money to recoup funds from a seller, return money from a refund or to make up the difference when running a promotion.
  - name: Workflows
    description: Use Workflows to start receiving webhook notifications for your payments, disputes, and sub-entities.
  - name: Agentic Commerce Protocol
    description: |
      <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px">Beta</span>

      Enable AI platforms to create scoped, single-use payment tokens to securely process agentic commerce transactions. This implementation follows the <a href="https://developers.openai.com/commerce/specs/payment" target="_blank">Agentic Commerce Protocol (ACP)</a> delegated payment specification.

      To onboard your AI platform, <a href="https://www.checkout.com/contact-sales" target="_blank">contact us</a>.

x-tagGroups:
  - name: Set up
    tags:
      - Access
  - name: Handle payments and payouts
    tags:
      - Payments
      - Flow
      - Payment Setups
      - Payment Links
      - Hosted Payments Page
      - Forex
      - Apple Pay
      - Google Pay
      - Transfers
      - Balances
  - name: Payment Context
    tags:
      - Payment Context
  - name: Payment Methods
    tags:
      - Payment Methods
  - name: Store and forward payment credentials
    tags:
      - Tokens
      - Instruments
      - Customers
      - Forward
  - name: Authentication
    tags:
      - Standalone
  - name: Risk management
    tags:
      - Disputes
  - name: Notifications
    tags:
      - Workflows
  - name: Platforms
    tags:
      - Platforms
      - Payment instruments
      - Payout schedules
      - Reserve rules
      - Onboarding Simulator
  - name: Card issuing
    tags:
      - Cardholders
      - Cards
      - Controls
      - Control profiles
      - Control groups
      - Cardholder access tokens
      - Transactions
      - Issuing disputes
      - Card testing
  - name: Identities
    tags:
      - Applicants
      - Identity Verification
      - AML Screening
      - Face Authentication
      - ID Document Verification
      - Address Document Verification
  - name: Reporting
    tags:
      - Reports
      - Financial actions
  - name: Metadata
    tags:
      - Card metadata
  - name: Network Tokens
    tags:
      - Network Tokens
  - name: Standalone Account Updater
    tags:
      - Standalone Account Updater
  - name: Compliance requests
    tags:
      - Compliance requests
  - name: Agentic Commerce
    tags:
      - Agentic Commerce Protocol


paths:
  /account-updater/cards:
    post:
      tags:
        - Standalone Account Updater
      security:
        - OAuth:
            - vault:real-time-account-updater
      summary: Get updated card credentials
      description: |
        Retrieve updated card credentials. <p/> 
        The following card schemes are supported: 
        
        - Mastercard
        - Visa
        - American Express
      operationId: RetrieveUpdatedCardDetails
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountUpdaterRequest'
            examples:
              card_source:
                summary: Using card details as source
                value:
                  source_options:
                    card:
                      number: "5436424242424242"
                      expiry_month: 5
                      expiry_year: 2025
              instrument_source:
                summary: Using instrument ID as source
                value:
                  source_options:
                    instrument:
                      id: "src_nmukohhu7vbe5f55ndwqzwv2c4"
      responses:
        '200':
          description: Request was successful, updated card info is available in the response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountUpdaterResponse'
              examples:
                card_updated:
                  summary: Successful card update
                  value:
                    account_update_status: CARD_UPDATED
                    card:
                      encrypted_card_number: "3nCryp73dFPANv4lu3"
                      bin: "543642"
                      last4: "4242"
                      expiry_month: 5
                      expiry_year: 2025
                      fingerprint: "abc123fingerprint"
                card_closed:
                  summary: Failed update due to card closed
                  value:
                    account_update_status: CARD_CLOSED
                card_expiry_updated:
                  summary: Successful card expiry update
                  value:
                    account_update_status: CARD_EXPIRY_UPDATED
                    card:
                      encrypted_card_number: "3nCryp73dFPANv4lu3"
                      bin: "543642"
                      last4: "4242"
                      expiry_month: 5
                      expiry_year: 2025
                      fingerprint: "abc123fingerprint"
                update_failed:
                  summary: Failure to retrieve updated credentials
                  value:
                    account_update_status: UPDATE_FAILED
                    account_update_failure_code: UP_TO_DATE
    
        '401':
          description: Unauthorized
        '403':
          description: Not authorized to perform this action
        '404':
          description: Not Found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error
        '502':
          description: Bad Gateway error
  /accounts/entities:
    parameters:
    - name: Accept
      in: header
      description: >-
        Used to describe the type of content the client can interpret.
    
        Use the schema_version value to specify the payload format. The latest version is 3.0.
      required: true
      style: simple
      schema:
        type: string
      example: application/json;schema_version=3.0
    post:
      tags:
      - Onboarding
      - Platforms
      summary: Onboard an entity
      operationId: onboardEntity
      description: Onboard an entity so they can start using Checkout services.
      requestBody:
        description: The entity to be onboarded. Use the relevant format for the platform type, region and payload version.
        content:
          application/json:
            schema:
              oneOf:
              - allOf:
                - title: US Company (SaaS)
                - $ref: '#/components/schemas/USISVSellerCompany3-0'
              - allOf:
                - title: US Sole Trader (SaaS)
                - $ref: '#/components/schemas/USISVSellerSoleTrader3-0'
              - allOf:
                - title: GB Company - Full (3.0)
                - $ref: '#/components/schemas/GBCompanyFull3-0'
              - allOf:
                - title: EEA Company - Full (3.0)
                - $ref: '#/components/schemas/EEACompanyFull3-0'
              - allOf:
                - title: US Company - Full (3.0)
                - $ref: '#/components/schemas/USCompanyFull3-0'
              - allOf:
                - title: GB Company - Full (2.0)
                - $ref: '#/components/schemas/GBCompanyFull2-0'
              - allOf:
                - title: EEA Company - Full (2.0)
                - $ref: '#/components/schemas/EEACompanyFull2-0'
              - allOf:
                - title: US Company - Full (2.0)
                - $ref: '#/components/schemas/USCompanyFull2-0'
              - allOf:
                - title: GB Company - Lite (2.0)
                - $ref: '#/components/schemas/GBCompanyLite2-0'
              - allOf:
                - title: EEA Company - Lite (2.0)
                - $ref: '#/components/schemas/EEACompanyLite2-0'
              - allOf:
                - title: US Company - Lite (2.0)
                - $ref: '#/components/schemas/USCompanyLite2-0'
              - allOf:
                - title: GB Sole Trader - Full (3.0)
                - $ref: '#/components/schemas/GBSoleTraderFull3-0'
              - allOf:
                - title: EEA Sole Trader - Full (3.0)
                - $ref: '#/components/schemas/EEASoleTraderFull3-0'
              - allOf:
                - title: US Sole Trader - Full (3.0)
                - $ref: '#/components/schemas/USSoleTraderFull3-0'
              - allOf:
                - title: GB Sole Trader - Full (2.0)
                - $ref: '#/components/schemas/GBSoleTraderFull2-0'
              - allOf:
                - title: EEA Sole Trader - Full (2.0)
                - $ref: '#/components/schemas/EEASoleTraderFull2-0'
              - allOf:
                - title: US Sole Trader - Full (2.0)
                - $ref: '#/components/schemas/USSoleTraderFull2-0'
              - allOf:
                - title: GB Sole Trader - Lite (2.0)
                - $ref: '#/components/schemas/GBSoleTraderLite2-0'
              - allOf:
                - title: EEA Sole Trader - Lite (2.0)
                - $ref: '#/components/schemas/EEASoleTraderLite2-0'
              - allOf:
                - title: US Sole Trader - Lite (2.0)
                - $ref: '#/components/schemas/USSoleTraderLite2-0'
              - allOf:
                - title: Hosted Onboarding Invitation Request
                - $ref: '#/components/schemas/PlatformsHostedOnboardInviteRequest'
        required: true
      responses:
        '201':
          description: Entity onboarded successfully
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                oneOf:
                - allOf:
                  - title: Company - Platform (3.0)
                  - $ref: '#/components/schemas/EntityBasicResponseWithLinksV3'
                - allOf:
                  - title: Company - Platform (2.0)
                  - $ref: '#/components/schemas/EntityBasicResponseWithLinksV2'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '409':
          description: Entity onboarding request conflicted with an existing entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityLinks'
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ValidationError'
      security:
      - OAuth:
        - accounts
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Accounts;\nusing Checkout.Common;\n\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Accounts)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nOnboardEntityRequest request = new OnboardEntityRequest\n{\n    Reference = \"reference\",\n    ContactDetails = new ContactDetails {Phone = new AccountPhone {Number = \"2345678910\"}},\n    Profile =\n        new Profile\n        {\n            Urls = new List<string> {\"https://www.superheroexample.com\"},\n            Mccs = new List<string> {\"5311\"}\n        },\n    Individual = new Individual\n    {\n        FirstName = \"FirstName\",\n        LastName = \"LastName\",\n        TradingName = \"John's Super Hero Masks\",\n        RegisteredAddress = new Address\n        {\n            AddressLine1 = \"123 High St.\",\n            AddressLine2 = \"Flat 456\",\n            City = \"London\",\n            State = \"GB\",\n            Zip = \"SW1A 1AA\",\n            Country = CountryCode.GB\n        },\n        NationalTaxId = \"TAX123456\",\n        DateOfBirth = new DateOfBirth {Day = 5, Month = 6, Year = 1995},\n        Identification = new Identification {NationalIdNumber = \"AB123456C\"}\n    }\n};\n\ntry\n{\n    OnboardEntityResponse response = await api.AccountsClient().CreateEntity(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/accounts\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Accounts}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := accounts.OnboardEntityRequest{\n	Reference: \"reference\",\n	ContactDetails: &accounts.ContactDetails{\n		Phone: &accounts.Phone{Number: \"4155552671\"},\n	},\n	Profile: &accounts.Profile{\n		Urls: []string{\"https://docs.checkout.com/1\", \"https://docs.checkout.com/2\"},\n		Mccs: []string{\"0742\"},\n	},\n	Individual: &accounts.Individual{\n		FirstName:     \"FirstName\",\n		MiddleName:    \"\",\n		LastName:      \"LastName\",\n		TradingName:   \"TradingName\",\n		NationalTaxId: \"TAX123456\",\n		RegisteredAddress: &common.Address{\n			AddressLine1: \"123 High St.\",\n			AddressLine2: \"Flat 456\",\n			City:         \"London\",\n			State:        \"GB\",\n			Zip:          \"SW1A 1AA\",\n			Country:      common.GB,\n		},\n		DateOfBirth: &accounts.DateOfBirth{\n			Day:   5,\n			Month: 6,\n			Year:  1990,\n		},\n		Identification: &accounts.Identification{\n			NationalIdNumber: \"AB123456C\",\n			Document: &accounts.Document{\n				Front: \"number\",\n				Back:  \"number\",\n			},\n		},\n	},\n}\n\nresponse, err := api.Accounts.CreateEntity(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.accounts.AccountPhone;\nimport com.checkout.accounts.ContactDetails;\nimport com.checkout.accounts.DateOfBirth;\nimport com.checkout.accounts.Document;\nimport com.checkout.accounts.DocumentType;\nimport com.checkout.accounts.Identification;\nimport com.checkout.accounts.Individual;\nimport com.checkout.accounts.OnboardEntityRequest;\nimport com.checkout.accounts.OnboardEntityResponse;\nimport com.checkout.accounts.Profile;\nimport com.checkout.common.Address;\nimport com.checkout.common.CountryCode;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.ACCOUNTS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nOnboardEntityRequest onboardEntityRequest = OnboardEntityRequest.builder()\n    .reference(\"reference\")\n    .contactDetails(ContactDetails.builder()\n        .phone(AccountPhone.builder().number(\"2345678910\").build())\n        .build())\n    .profile(Profile.builder()\n        .urls(Arrays.asList(\"https://docs.checkout.com/1\", \"https://docs.checkout.com/2\"))\n        .mccs(Collections.singletonList(\"0742\"))\n        .build())\n    .individual(Individual.builder()\n        .firstName(\"FirstName\")\n        .lastName(\"LastName\")\n        .tradingName(\"TradingName\")\n        .registeredAddress(Address.builder()\n            .addressLine1(\"123 High St.\")\n            .addressLine1(\"Flat 456\")\n            .city(\"London\")\n            .state(\"GB\")\n            .zip(\"SW1A 1AA\")\n            .country(CountryCode.GB)\n            .build())\n        .nationalTaxId(\"TAX123456\")\n        .dateOfBirth(DateOfBirth.builder()\n            .day(5)\n            .month(6)\n            .year(1990)\n            .build())\n        .identification(Identification.builder()\n            .nationalIdNumber(\"AB123456C\")\n            .document(Document.builder()\n                .back(\"number\")\n                .front(\"number\")\n                .type(DocumentType.DRIVING_LICENSE)\n                .build())\n            .build())\n        .build())\n    .build();\n\ntry {\n    OnboardEntityResponse response = api.accountsClient().createEntity(onboardEntityRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\Accounts\\ContactDetails;\nuse Checkout\\Accounts\\DateOfBirth;\nuse Checkout\\Accounts\\Identification;\nuse Checkout\\Accounts\\Individual;\nuse Checkout\\Accounts\\OnboardEntityRequest;\nuse Checkout\\Accounts\\Profile;\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Address;\nuse Checkout\\Common\\Country;\nuse Checkout\\Common\\Phone;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Accounts])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$address = new Address();\n$address->address_line1 = \"123 High St.\";\n$address->address_line2 = \"Flat 456\";\n$address->city = \"London\";\n$address->State = \"GB\";\n$address->zip = \"SW1A 1AA\";\n$address->country = Country::$GB;\n\n$phone = new Phone();\n$phone->country_code = \"+1\";\n$phone->number = \"415 555 2671\";\n\n$dateOfBirth = new DateOfBirth();\n$dateOfBirth->day = 5;\n$dateOfBirth->month = 6;\n$dateOfBirth->year = 1996;\n\n$identification = new Identification();\n$identification->national_id_number = \"AB123456C\";\n\n$request = new OnboardEntityRequest();\n$request->reference = uniqid();\n$request->contact_details = new ContactDetails();\n$request->contact_details->phone = $phone;\n$request->profile = new Profile();\n$request->profile->urls = array(\"https://www.superheroexample.com\");\n$request->profile->mccs = array(\"0742\");\n$request->individual = new Individual();\n$request->individual->first_name = \"Bruce\";\n$request->individual->last_name = \"Wayne\";\n$request->individual->trading_name = \"Batman's Super Hero Masks\";\n$request->individual->registered_address = $address;\n$request->individual->national_tax_id = \"TAX123456\";\n$request->individual->date_of_birth = $dateOfBirth;\n$request->individual->identification = $identification;\n\ntry {\n    $response = $api->getAccountsClient()->createEntity($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.accounts.accounts import OnboardEntityRequest, ContactDetails, Profile, Individual, DateOfBirth, Identification\nfrom checkout_sdk.common.common import Phone, Address\nfrom checkout_sdk.common.enums import Country\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder()\n    .oauth()\n    .client_credentials('client_id', 'client_secret')\n    .environment(Environment.sandbox()) # or Environment.production()\n    .environment_subdomain(\"{prefix}\") # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.ACCOUNTS])\n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\naddress = Address()\naddress.address_line1 = '123 High St.'\naddress.address_line2 = 'Flat 456'\naddress.city = 'London'\naddress.state = 'GB'\naddress.zip = 'SW1A 1AA'\naddress.country = Country.GB\n\nrequest = OnboardEntityRequest()\nrequest.reference = 'reference'\nrequest.contact_details = ContactDetails()\nrequest.contact_details.phone = phone\nrequest.profile = Profile()\nrequest.profile.urls = ['https://docs.checkout.com/url']\nrequest.profile.mccs = ['0742']\nrequest.individual = Individual()\nrequest.individual.first_name = 'First'\nrequest.individual.last_name = 'Last'\nrequest.individual.trading_name = \"Batman's Super Hero Masks\"\nrequest.individual.registered_address = address\nrequest.individual.national_tax_id = 'TAX123456'\nrequest.individual.date_of_birth = DateOfBirth()\nrequest.individual.date_of_birth.day = 5\nrequest.individual.date_of_birth.month = 6\nrequest.individual.date_of_birth.year = 1996\nrequest.individual.identification = Identification()\nrequest.individual.identification.national_id_number = 'AB123456C'\n\ntry:\n    response = api.accounts.create_entity(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /accounts/entities/{entityId}/members:
    parameters:
      - in: path
        name: entityId
        description: The ID of the sub-entity
    
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
    
    get:
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Retrieve information on all users of a sub-entity that has been invited through <a href="https://www.checkout.com/docs/platforms/onboard-sub-entities/onboard-with-hosted-onboarding" target="_blank">Hosted Onboarding</a>. Only one user can be invited to onboard the sub-entity through Hosted Onboarding.
    
        To enable the Hosted Onboarding feature, contact your Account Manager.
      summary: Get sub-entity Members
      operationId: getSubEntityMembers
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '200':
          description: Sub-Entity member retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformsHostedOnboardGetMembers'
              examples:
                Get Members:
                  value:
                    data:
                      - user_id: usr_eyk754cqieqexfh6u46no5nnha
        '401':
          description: Unauthorized
        '404':
          description: Sub-entity not found
      tags:
        - Platforms
  /accounts/entities/{entityId}/members/{userId}:
    parameters:
      - in: path
        name: entityId
        description: The ID of the sub-entity
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
    
      - in: path
        name: userId
        description: The ID of the invited user.
        required: true
        allowEmptyValue: false
        example: usr_eyk754cqieqexfh6u46no5nnha
        style: simple
        schema:
          type: string
    
    put:
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Resend an invitation to the user of a sub-entity. The user will receive another email to continue their <a href="https://www.checkout.com/docs/platforms/onboard-sub-entities/onboard-with-hosted-onboarding" target="_blank">Hosted Onboarding</a> application. An invitation can only be resent to the user originally registered to the sub-entity.
    
        To enable the Hosted Onboarding feature, contact your Account Manager.
      summary: Reinvite a sub-entity member
      operationId: reinviteSubEntityMembers
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformsHostedOnboardReinviteRequest'
      responses:
        '200':
          description: Sub-entity member retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformsHostedOnboardReinviteResponse'
              examples:
                Get Members:
                  value:
                    id: usr_eyk754cqieqexfh6u46no5nnha
        '401':
          description: Unauthorized
        '404':
          description: Sub-entity not found
      tags:
        - Platforms
  /accounts/entities/{entityId}/payment-instruments/{id}:
    parameters:
      - in: path
        name: entityId
        description: The sub-entity's ID.
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
      - in: path
        name: id
        description: The payment instrument's ID.
        required: true
        allowEmptyValue: false
        example: ppi_qn4nis4k3ykpzzu7cvtuvhqqga
        style: simple
        schema:
          type: string
    get:
      description: Retrieve the details of a specific payment instrument used for sub-entity payouts.
      summary: Get payment instrument details
      operationId: getPlatformsPaymentInstrument
    
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '200':
          description: Payment instrument details
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformsPaymentInstrumentRead'
              examples:
                BankAccount:
                  value:
                    id: ppi_qn4nis4k3ykpzzu7cvtuvhqqga
                    label: Bob's Bank Account
                    type: bank_account
                    currency: GBP
                    country: GB
                    document:
                      type: bank_statement
                      file_id: file_wxglze3wwywujg4nna5fb7ldli
                    status: 'verified'
                    instrument_id: 'src_pdasnoaxrtoevpyh3opgaxcrti'
                CardToken:
                  value:
                    id: ppi_cwfekfw2d7mmcto5ql4lpjgrxq
                    instrument_id: 'src_jpu3ev6prk7utb5jonqgvvsshm'
                    label: Carol's Card
                    country: GB
                    currency: GBP
                    status: 'verified'
                    type: card_token
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      tags:
        - Payment instruments
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Accounts}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Accounts.RetrievePaymentInstrumentDetails(\"entity_id\", \"payment_instrument_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
    patch:
      description: Set an existing payment instrument as default. This will make it the destination instrument when a scheduled payout is made. You can also update the label of a payment instrument.
      summary: Update payment instrument details
      operationId: updatePlatformsPaymentInstrument
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformsPaymentInstrumentUpdate'
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '200':
          description: Payment instrument updated successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EntityLinks'
                  - type: object
                    properties:
                      id:
                        type: string
                        example: ppi_qn4nis4k3ykpzzu7cvtuvhqqga
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '428': 
          description: Precondition required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreconditionRequiredError'
      tags:
        - Payment instruments
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/accounts\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Accounts}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := accounts.UpdatePaymentInstrumentRequest{\n	Label:   \"Peter's Personal Account\",\n	Default: true,\n}\n\nresponse, err := api.Accounts.UpdatePaymentInstrumentDetails(\"entity_id\", \"payment_instrument_id\", request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /accounts/entities/{entityId}/reserve-rules/{id}:
    parameters:
      - in: path
        name: entityId
        description: The sub-entity's ID.
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
      - in: path
        name: id
        description: The reserve rule ID.
        required: true
        allowEmptyValue: false
        example: rsv_qn4nis4k3ykpzzu7cvtuvhqqga
        style: simple
        schema:
          type: string
    get:
      description: Retrieve the details of a specific reserve rule.
      summary: Get reserve rule details
      operationId: getReserveRule
    
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '200':
          description: Reserve rule details.
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            ETag:
              description: Identifies the current version of the reserve rule.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReserveRuleReadResponse'
              examples:
                RollingReserveRule:
                  value:
                    id: rsv_qn4nis4k3ykpzzu7cvtuvhqqga
                    type: rolling
                    valid_from: "2001-01-01T13:33:00.000Z"
                    rolling:
                      percentage: 10.00
                      holding_duration:
                        weeks: 2
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      tags:
        - platforms
        - Reserve rules
    
    put:
      description: Update an upcoming reserve rule. Only reserve rules that have never been active can be updated.
      summary: Update reserve rule
      operationId: updateReserveRule
      parameters:
        - in: header
          name: If-Match
          description: Identifies a specific version of a reserve rule to update.
          allowEmptyValue: false
          required: true
          schema:
            type: string
          example: "Y3Y9MCZydj0w"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReserveRuleUpdateRequest'
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '200':
          description: Reserve rule updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReserveRuleWriteResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            ETag:
              description: Identifies a specific version of a reserve rule.
              schema:
                type: string
              example: "Y3Y9MCZydj0w"
        '401':
          description: Unauthorized
        '412': 
          description: Precondition failed. An invalid ETag value was provided in the If-Match header.
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '428': 
          description: Precondition required. The If-Match header is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreconditionRequiredError'
      tags:
        - platforms
        - Reserve rules
  /accounts/entities/{id}:
    parameters:
    - name: Accept
      in: header
      description: >-
        Used to describe the type of content the client can interpret.
    
        Use the schema_version value to specify the payload format. The latest version is 3.0.
      required: true
      style: simple
      schema:
        type: string
      example: application/json;schema_version=3.0
    - name: id
      in: path
      description: The ID of the entity.
      required: true
      style: simple
      schema:
        type: string
      example: ent_w4jelhppmfiufdnatam37wrfc4
    get:
      tags:
      - Onboarding
      - Platforms
      summary: Get entity details
      operationId: getEntityDetails
      description: Use this endpoint to retrieve an entity and its full details.
      responses:
        '200':
          description: Entity retrieved successfully
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                oneOf:
                - allOf:
                  - title: GB Company - Full (3.0)
                  - $ref: '#/components/schemas/GBCompanyFull3-0'
                - allOf:
                  - title: EEA Company - Full (3.0)
                  - $ref: '#/components/schemas/EEACompanyFull3-0'
                - allOf:
                  - title: US Company - Full (3.0)
                  - $ref: '#/components/schemas/USCompanyFull3-0'
                - allOf:
                  - title: GB Company - Full (2.0)
                  - $ref: '#/components/schemas/GBCompanyFull2-0'
                - allOf:
                  - title: EEA Company - Full (2.0)
                  - $ref: '#/components/schemas/EEACompanyFull2-0'
                - allOf:
                  - title: US Company - Full (2.0)
                  - $ref: '#/components/schemas/USCompanyFull2-0'
                - allOf:
                  - title: GB Company - Lite (2.0)
                  - $ref: '#/components/schemas/GBCompanyLite2-0'
                - allOf:
                  - title: EEA Company - Lite (2.0)
                  - $ref: '#/components/schemas/EEACompanyLite2-0'
                - allOf:
                  - title: US Company - Lite (2.0)
                  - $ref: '#/components/schemas/USCompanyLite2-0'
                - allOf:
                  - title: GB Sole Trader - Full (3.0)
                  - $ref: '#/components/schemas/GBSoleTraderFull3-0'
                - allOf:
                  - title: EEA Sole Trader - Full (3.0)
                  - $ref: '#/components/schemas/EEASoleTraderFull3-0'
                - allOf:
                  - title: US Sole Trader - Full (3.0)
                  - $ref: '#/components/schemas/USSoleTraderFull3-0'
                - allOf:
                  - title: GB Sole Trader - Full (2.0)
                  - $ref: '#/components/schemas/GBSoleTraderFull2-0'
                - allOf:
                  - title: EEA Sole Trader - Full (2.0)
                  - $ref: '#/components/schemas/EEASoleTraderFull2-0'
                - allOf:
                  - title: US Sole Trader - Full (2.0)
                  - $ref: '#/components/schemas/USSoleTraderFull2-0'
                - allOf:
                  - title: GB Sole Trader - Lite (2.0)
                  - $ref: '#/components/schemas/GBSoleTraderLite2-0'
                - allOf:
                  - title: EEA Sole Trader - Lite (2.0)
                  - $ref: '#/components/schemas/EEASoleTraderLite2-0'
                - allOf:
                  - title: US Sole Trader - Lite (2.0)
                  - $ref: '#/components/schemas/USSoleTraderLite2-0'
        '401':
          description: Unauthorized
        '404':
          description: Entity not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ValidationError'
      security:
      - OAuth:
        - accounts
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Accounts;\n\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Accounts)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    OnboardEntityDetailsResponse response = await api.AccountsClient().GetEntity(\"entity_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Accounts}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Accounts.GetEntity(\"entity_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.accounts.OnboardEntityDetailsResponse;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.ACCOUNTS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    OnboardEntityDetailsResponse response = api.accountsClient().getEntity(\"entity_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Accounts])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getAccountsClient()->getEntity(\"entity_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder()\n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.ACCOUNTS]) \n    .build()\n)\n\ntry:\n    response = api.accounts.get_entity('entity_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    put:
      tags:
      - Onboarding
      - Platforms
      summary: Update entity details
      operationId: updateEntityDetails
      description: >
        Update an entity.
    
    
        **Note:** when you update a entity we may conduct further due diligence checks when necessary. During these checks, your payment capabilities will remain the same.
      requestBody:
        description: The entity to be updated. Use the relevant format for the platform type, region and payload version.
        content:
          application/json:
            schema:
              oneOf:
              - allOf:
                - title: US Company (SaaS)
                - $ref: '#/components/schemas/USISVSellerCompany3-0'
              - allOf:
                - title: US Sole Trader (SaaS)
                - $ref: '#/components/schemas/USISVSellerSoleTrader3-0'
              - allOf:
                - title: GB Company - Full (3.0)
                - $ref: '#/components/schemas/GBCompanyFull3-0'
              - allOf:
                - title: EEA Company - Full (3.0)
                - $ref: '#/components/schemas/EEACompanyFull3-0'
              - allOf:
                - title: US Company - Full (3.0)
                - $ref: '#/components/schemas/USCompanyFull3-0'
              - allOf:
                - title: GB Company - Full (2.0)
                - $ref: '#/components/schemas/GBCompanyFull2-0'
              - allOf:
                - title: EEA Company - Full (2.0)
                - $ref: '#/components/schemas/EEACompanyFull2-0'
              - allOf:
                - title: US Company - Full (2.0)
                - $ref: '#/components/schemas/USCompanyFull2-0'
              - allOf:
                - title: GB Company - Lite (2.0)
                - $ref: '#/components/schemas/GBCompanyLite2-0'
              - allOf:
                - title: EEA Company - Lite (2.0)
                - $ref: '#/components/schemas/EEACompanyLite2-0'
              - allOf:
                - title: US Company - Lite (2.0)
                - $ref: '#/components/schemas/USCompanyLite2-0'
              - allOf:
                - title: GB Sole Trader - Full (3.0)
                - $ref: '#/components/schemas/GBSoleTraderFull3-0'
              - allOf:
                - title: EEA Sole Trader - Full (3.0)
                - $ref: '#/components/schemas/EEASoleTraderFull3-0'
              - allOf:
                - title: US Sole Trader - Full (3.0)
                - $ref: '#/components/schemas/USSoleTraderFull3-0'
              - allOf:
                - title: GB Sole Trader - Full (2.0)
                - $ref: '#/components/schemas/GBSoleTraderFull2-0'
              - allOf:
                - title: EEA Sole Trader - Full (2.0)
                - $ref: '#/components/schemas/EEASoleTraderFull2-0'
              - allOf:
                - title: US Sole Trader - Full (2.0)
                - $ref: '#/components/schemas/USSoleTraderFull2-0'
              - allOf:
                - title: GB Sole Trader - Lite (2.0)
                - $ref: '#/components/schemas/GBSoleTraderLite2-0'
              - allOf:
                - title: EEA Sole Trader - Lite (2.0)
                - $ref: '#/components/schemas/EEASoleTraderLite2-0'
              - allOf:
                - title: US Sole Trader - Lite (2.0)
                - $ref: '#/components/schemas/USSoleTraderLite2-0'
        required: true
      responses:
        '200':
          description: Entity updated successfully
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                oneOf:
                - allOf:
                  - title: Company - Platform (3.0)
                  - $ref: '#/components/schemas/EntityBasicResponseWithLinksV3'
                - allOf:
                  - title: Company - Platform (2.0)
                  - $ref: '#/components/schemas/EntityBasicResponseWithLinksV2'
        '401':
          description: Unauthorized
        '404':
          description: Entity not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ValidationError'
      security:
      - OAuth:
        - accounts
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Accounts;\nusing Checkout.Common;\n\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Accounts)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nOnboardEntityRequest request = new OnboardEntityRequest\n{\n    Reference = \"reference\",\n    ContactDetails = new ContactDetails {Phone = new AccountPhone {Number = \"2345678910\"}},\n    Profile =\n        new Profile\n        {\n            Urls = new List<string> {\"https://www.superheroexample.com\"},\n            Mccs = new List<string> {\"5311\"}\n        },\n    Individual = new Individual\n    {\n        FirstName = \"FirstName\",\n        LastName = \"LastName\",\n        TradingName = \"John's Super Hero Masks\",\n        RegisteredAddress = new Address\n        {\n            AddressLine1 = \"123 High St.\",\n            AddressLine2 = \"Flat 456\",\n            City = \"London\",\n            State = \"GB\",\n            Zip = \"SW1A 1AA\",\n            Country = CountryCode.GB\n        },\n        NationalTaxId = \"TAX123456\",\n        DateOfBirth = new DateOfBirth {Day = 5, Month = 6, Year = 1995},\n        Identification = new Identification {NationalIdNumber = \"AB123456C\"}\n    }\n};\n\ntry\n{\n    OnboardEntityResponse response = await api.AccountsClient().UpdateEntity(\"entity_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/accounts\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Accounts}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := accounts.OnboardEntityRequest{\n	Reference: \"reference\",\n	ContactDetails: &accounts.ContactDetails{\n		Phone: &accounts.Phone{Number: \"4155552671\"},\n	},\n	Profile: &accounts.Profile{\n		Urls: []string{\"https://docs.checkout.com/1\", \"https://docs.checkout.com/2\"},\n		Mccs: []string{\"0742\"},\n	},\n	Individual: &accounts.Individual{\n		FirstName:     \"FirstName\",\n		MiddleName:    \"\",\n		LastName:      \"LastName\",\n		TradingName:   \"TradingName\",\n		NationalTaxId: \"TAX123456\",\n		RegisteredAddress: &common.Address{\n			AddressLine1: \"123 High St.\",\n			AddressLine2: \"Flat 456\",\n			City:         \"London\",\n			State:        \"GB\",\n			Zip:          \"SW1A 1AA\",\n			Country:      common.GB,\n		},\n		DateOfBirth: &accounts.DateOfBirth{\n			Day:   5,\n			Month: 6,\n			Year:  1990,\n		},\n		Identification: &accounts.Identification{\n			NationalIdNumber: \"AB123456C\",\n			Document: &accounts.Document{\n				Front: \"number\",\n				Back:  \"number\",\n			},\n		},\n	},\n}\n\nresponse, err := api.Accounts.UpdateEntity(\"entity_id\", request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.accounts.AccountPhone;\nimport com.checkout.accounts.ContactDetails;\nimport com.checkout.accounts.DateOfBirth;\nimport com.checkout.accounts.Document;\nimport com.checkout.accounts.DocumentType;\nimport com.checkout.accounts.Identification;\nimport com.checkout.accounts.Individual;\nimport com.checkout.accounts.OnboardEntityRequest;\nimport com.checkout.accounts.OnboardEntityResponse;\nimport com.checkout.accounts.Profile;\nimport com.checkout.common.Address;\nimport com.checkout.common.CountryCode;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.ACCOUNTS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nOnboardEntityRequest request = OnboardEntityRequest.builder()\n    .reference(\"reference\")\n    .contactDetails(ContactDetails.builder()\n    .phone(AccountPhone.builder().number(\"415 555 2671\").build())\n    .build())\n    .profile(Profile.builder()\n        .urls(Collections.singletonList(\"https://docs.checkout.com\"))\n        .mccs(Collections.singletonList(\"0742\"))\n        .build())\n    .individual(Individual.builder()\n        .firstName(\"FirstName\")\n        .lastName(\"LastName\")\n        .tradingName(\"Trading\")\n        .registeredAddress(Address.builder()\n            .addressLine1(\"123 High St.\")\n            .addressLine1(\"Flat 456\")\n            .city(\"London\")\n            .state(\"GB\")\n            .zip(\"SW1A 1AA\")\n            .country(CountryCode.GB)\n            .build())\n        .nationalTaxId(\"TAX123456\")\n        .dateOfBirth(DateOfBirth.builder()\n            .day(5)\n            .month(6)\n            .year(1995)\n            .build())\n        .identification(Identification.builder()\n            .nationalIdNumber(\"AB123456C\")\n            .document(Document.builder()\n                .back(\"number\")\n                .front(\"number\")\n                .type(DocumentType.PASSPORT)\n                .build())\n            .build())\n        .build())\n    .build();\n\ntry {\n    OnboardEntityResponse response = api.accountsClient().updateEntity(request, \"entity_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\Accounts\\ContactDetails;\nuse Checkout\\Accounts\\DateOfBirth;\nuse Checkout\\Accounts\\Identification;\nuse Checkout\\Accounts\\Individual;\nuse Checkout\\Accounts\\OnboardEntityRequest;\nuse Checkout\\Accounts\\Profile;\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Address;\nuse Checkout\\Common\\Country;\nuse Checkout\\Common\\Phone;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Accounts])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$address = new Address();\n$address->address_line1 = \"123 High St.\";\n$address->address_line2 = \"Flat 456\";\n$address->city = \"London\";\n$address->State = \"GB\";\n$address->zip = \"SW1A 1AA\";\n$address->country = Country::$GB;\n\n$phone = new Phone();\n$phone->country_code = \"+1\";\n$phone->number = \"415 555 2671\";\n\n$dateOfBirth = new DateOfBirth();\n$dateOfBirth->day = 5;\n$dateOfBirth->month = 6;\n$dateOfBirth->year = 1996;\n\n$identification = new Identification();\n$identification->national_id_number = \"AB123456C\";\n\n$request = new OnboardEntityRequest();\n$request->reference = uniqid();\n$request->contact_details = new ContactDetails();\n$request->contact_details->phone = $phone;\n$request->profile = new Profile();\n$request->profile->urls = array(\"https://www.superheroexample.com\");\n$request->profile->mccs = array(\"0742\");\n$request->individual = new Individual();\n$request->individual->first_name = \"Bruce\";\n$request->individual->last_name = \"Wayne\";\n$request->individual->trading_name = \"Batman's Super Hero Masks\";\n$request->individual->registered_address = $address;\n$request->individual->national_tax_id = \"TAX123456\";\n$request->individual->date_of_birth = $dateOfBirth;\n$request->individual->identification = $identification;\n\ntry {\n    $response = $api->getAccountsClient()->updateEntity($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.accounts.accounts import OnboardEntityRequest, ContactDetails, Profile, Individual, DateOfBirth, Identification\nfrom checkout_sdk.common.common import Phone, Address\nfrom checkout_sdk.common.enums import Country\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder()\n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.ACCOUNTS]) \n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\naddress = Address()\naddress.address_line1 = '123 High St.'\naddress.address_line2 = 'Flat 456'\naddress.city = 'London'\naddress.state = 'GB'\naddress.zip = 'SW1A 1AA'\naddress.country = Country.GB\n\nrequest = OnboardEntityRequest()\nrequest.reference = 'reference'\nrequest.contact_details = ContactDetails()\nrequest.contact_details.phone = phone\nrequest.profile = Profile()\nrequest.profile.urls = ['https://docs.checkout.com/url']\nrequest.profile.mccs = ['0742']\nrequest.individual = Individual()\nrequest.individual.first_name = 'First'\nrequest.individual.last_name = 'Last'\nrequest.individual.trading_name = \"Batman's Super Hero Masks\"\nrequest.individual.registered_address = address\nrequest.individual.national_tax_id = 'TAX123456'\nrequest.individual.date_of_birth = DateOfBirth()\nrequest.individual.date_of_birth.day = 5\nrequest.individual.date_of_birth.month = 6\nrequest.individual.date_of_birth.year = 1996\nrequest.individual.identification = Identification()\nrequest.individual.identification.national_id_number = 'AB123456C'\n\ntry:\n    response = api.accounts.update_entity(\"entity_id\", request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /accounts/entities/{id}/payment-instruments:
    parameters:
      - in: path
        name: id
        description: The sub-entity's ID.
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
    post:
      description: Create a bank account payment instrument for your sub-entity. You can use this payment instrument as a payout destination.
      summary: Add a payment instrument
      operationId: addPlatformsPaymentInstrument
      requestBody:
        required: true
        description: A JSON payload containing the payment instrument details.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformsPaymentInstrumentCreate'
            examples:
              FasterPaymentsBankAccount:
                value:
                  label: Bob's Bank Account
                  type: bank_account
                  currency: GBP
                  country: GB
                  instrument_details:
                    account_number: '12345678'
                    bank_code: '050389'
                  document:
                    type: bank_statement
                    file_id: file_wxglze3wwywujg4nna5fb7ldli
              SepaBankAccount:
                value:
                  label: Bruno's Bank Account
                  type: bank_account
                  currency: EUR
                  country: FR
                  instrument_details:
                    iban: FR1420041010050500013M02606,
                    swift_bic: LZSKFR2E98I
                  document:
                    type: bank_statement
                    file_id: file_wxglze3wwywujg4nna5fb7ldli
              AchBankAccount:
                value:
                  label: Alex's Bank Account
                  type: bank_account
                  currency: USD
                  country: US
                  instrument_details:
                    account_number: '12345100'
                    routing_number: '026009593'
                    account_type: savings
                  document:
                    type: bank_statement
                    file_id: file_wxglze3wwywujg4nna5fb7ldli
              CardToken:
                value:
                  label: Carol's Card
                  type: card_token
                  currency: GBP
                  instrument_details:
                    token: tok_ru6xnh53uovethkr2gy3gwpl2a
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '201':
          description: Created
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: ppi_qn4nis4k3ykpzzu7cvtuvhqqga
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
      tags: [ Payment instruments ]
    
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/accounts\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/instruments\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Accounts}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := accounts.PaymentInstrumentRequest{\n	Label:              \"Bob's Bank Account\",\n	Type:               instruments.BankAccount,\n	Currency:           common.GBP,\n	Country:            common.GB,\n	DefaultDestination: true,\n	Document: &accounts.InstrumentDocument{\n		Type:   \"document\",\n		FileId: \"file\",\n	},\n	InstrumentDetails: &accounts.InstrumentDetailsFasterPayments{\n		AccountNumber: \"123456789\",\n		BankCode:      \"bank_code\",\n	},\n}\n\nresponse, err := api.Accounts.CreatePaymentInstrument(\"entity_id\", request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
    get:
      description: Fetch all of the payment instruments for a sub-entity. You can filter by `status` to identify `verified` instruments that are ready to be used for Payouts.
      summary: Query payment instruments
      operationId: queryPlatformsPaymentInstruments
    
      parameters:
        - in: query
          name: status
          schema:
            $ref: '#/components/schemas/PlatformsPaymentInstrumentStatus'
    
    
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '200':
          description: OK
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformsPaymentInstrumentQuery'
              examples:
                BankAccounts:
                  value:
                    data: 
                      - id: ppi_qn4nis4k3ykpzzu7cvtuvhqqga
                        label: Bob's Bank Account
                        type: bank_account
                        currency: GBP
                        country: GB
                        status: 'verified'
                        instrument_id: 'src_pdasnoaxrtoevpyh3opgaxcrti'
                      - id: ppi_yk7nmh5jypmqzw5kb6kshj2iiy
                        label: Bruno's Bank Account
                        type: bank_account
                        currency: EUR
                        country: FR
                        status: 'pending'
                    
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      tags:
        - Payment instruments
    
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/accounts\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n	Builder().\n	StaticKeys().\n	WithSecretKey(\"secret_key\").\n	WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n	Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n	Builder().\n	OAuth().\n	WithClientCredentials(\"client_id\", \"client_secret\").\n	WithScopes([]string{configuration.Accounts}).\n	WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n	Build()\nif err != nil {\n	return nil, err\n}\n\nquery := accounts.PaymentInstrumentsQuery{Status: \"pending\"}\n\nresponse, err := api.Accounts.QueryPaymentInstruments(\"entity_id\", query)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /accounts/entities/{id}/payout-schedules:
    get:
      tags:
        - Payout schedules
      parameters:
        - in: path
          name: id
          description: The ID of the sub-entity
          required: true
          allowEmptyValue: false
          example: ent_w4jelhppmfiufdnatam37wrfc4
          style: simple
          schema:
            type: string
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      summary: Retrieve a sub-entity's payout schedule
      operationId: getSubEntitysPayoutSchedule
      description: >-
        You can schedule when your sub-entities receive their funds using our <a href="https://checkout.com/docs/platforms" target="_blank">Platforms solution</a>. Use this endpoint to retrieve information about a sub-entity's schedule.
      responses:
        '200':
          description: Schedule retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetScheduleResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized.
        '404':
          description: Sub-entity not found, or scheduled payouts are not available to the sub-entity.
        '422':
          description: Invalid data sent.
        '429':
          description: Too many requests.
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Accounts.Payout.Response;\n\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Accounts)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    GetScheduleResponse response = await api.AccountsClient().RetrievePayoutSchedule(\"entity_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Accounts}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Accounts.RetrievePayoutSchedule(\"entity_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.accounts.payout.schedule.response.GetScheduleResponse;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.ACCOUNTS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    GetScheduleResponse response = api.accountsClient().retrievePayoutSchedule(\"entity_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Accounts])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getAccountsClient()->retrievePayoutSchedule(\"entity_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder()\n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.ACCOUNTS]) \n    .build()\n)\n\ntry:\n    response = api.accounts.retrieve_payout_schedule(\"entity_id\")\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    put:
      tags:
        - Payout schedules
      parameters:
        - in: path
          name: id
          description: The ID of the sub-entity
          required: true
          allowEmptyValue: false
          example: ent_w4jelhppmfiufdnatam37wrfc4
          style: simple
          schema:
            type: string
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      summary: Update a sub-entity's payout schedule
      operationId: putSubEntitysPayoutSchedule
      description: >-
        You can schedule when your sub-entities receive their funds using our <a href="https://checkout.com/docs/platforms" target="_blank">Platforms solution</a>. Use this endpoint to update a sub-entity's schedule.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScheduleRequest'
      responses:
        '200':
          description: Schedule updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityLinks'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '429':
          description: Too many requests
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Accounts.Payout;\nusing Checkout.Accounts.Payout.Request;\nusing Checkout.Common;\n\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Accounts)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nUpdateScheduleRequest scheduleRequest = new UpdateScheduleRequest\n{\n    Enabled = true,\n    Threshold = 1000,\n    Recurrence =\n        new ScheduleFrequencyWeeklyRequest {ByDay = new[] {DaySchedule.Sunday, DaySchedule.Monday}}\n};\n\ntry\n{\n    EmptyResponse emptyResponse = await api.AccountsClient().UpdatePayoutSchedule(\"entity_id\", Currency.USD, scheduleRequest);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/accounts\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Accounts}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := accounts.CurrencySchedule{\n	Enabled:    true,\n	Threshold:  1000,\n	Recurrence: accounts.NewScheduleFrequencyWeeklyRequest([]accounts.DaySchedule{accounts.Monday}),\n}\n\nresponse, err := api.Accounts.UpdatePayoutSchedule(\"entity_id\", common.GBP, request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.accounts.payout.schedule.DaySchedule;\nimport com.checkout.accounts.payout.schedule.request.ScheduleFrequencyWeeklyRequest;\nimport com.checkout.accounts.payout.schedule.request.UpdateScheduleRequest;\nimport com.checkout.accounts.payout.schedule.response.VoidResponse;\nimport com.checkout.common.Currency;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.ACCOUNTS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nUpdateScheduleRequest request = UpdateScheduleRequest.builder()\n    .enabled(true)\n    .threshold(1000)\n    .recurrence(ScheduleFrequencyWeeklyRequest.builder()\n        .byDay(DaySchedule.MONDAY)\n        .build())\n    .build();\n\ntry {\n    VoidResponse response = api.accountsClient().updatePayoutSchedule(\"entity_id\", Currency.USD, request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\Balances\\BalancesQuery;\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Currency;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Balances])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$query = new BalancesQuery();\n$query->query = \"currency:\" . Currency::$GBP;\n\ntry {\n    $response = $api->getBalancesClient()->retrieveEntityBalances(\"entity_id\", $query);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.accounts.accounts import UpdateScheduleRequest, ScheduleRequest, ScheduleFrequencyWeeklyRequest, DaySchedule\nfrom checkout_sdk.common.enums import Currency\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder()\n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.ACCOUNTS]) \n    .build()\n)\n\nfrequency = ScheduleFrequencyWeeklyRequest()\nfrequency.by_day = DaySchedule.MONDAY\n\nschedule = ScheduleRequest()\nschedule.frequency = frequency\n\nrequest = UpdateScheduleRequest()\nrequest.enabled = True\nrequest.threshold = 1000\nrequest.recurrence = schedule\n\ntry:\n    response = api.accounts.update_payout_schedule(\"entity_id\", Currency.USD, request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /accounts/entities/{id}/requirements:
    parameters:
      - in: header
        name: Accept
        description: >-
          Used to describe the type of content the client can interpret.
    
          Use the schema_version value to specify the payload format. The latest version is 3.0.
        required: true
        style: simple
        schema:
          type: string
        example: application/json;schema_version=3.0
      - in: path
        name: id
        description: The sub-entity's ID.
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
    get:
      tags:
        - Onboarding
        - Platforms
      summary: Get a list of requirements
      operationId: listEntityRequirements
      description: >-
        Retrieve the list of pending requirements that the sub-entity must resolve. Requirements may be
        raised as part of onboarding, periodic AML reviews, or ongoing compliance checks. Each item in
        the response includes a `priority` and `deadline` to help you surface the most urgent items first.
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '200':
          description: Requirements retrieved successfully
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityRequirementListResponse'
              example:
                data:
                  - id: req_5wmacwhrhbzhqkhx5hlqmzje44
                    resource: ent_wxglze3wwywujg4nna5fb7ldli
                    resource_type: company
                    reason: periodic_review
                    priority: critical
                    deadline: '2026-05-10T00:00:00Z'
                    urn: 'urn:object:company#ent_wxglze3wwywujg4nna5fb7ldli#field:legal-name'
                    field_path: company.legal_name
                    field_urn: 'urn:field:companies/legal-name'
                    metadata:
                      purpose: company_verification
                    _links:
                      self:
                        href: 'https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli/requirements/req_5wmacwhrhbzhqkhx5hlqmzje44'
        '401':
          description: Unauthorized
        '404':
          description: Sub-entity not found
  /accounts/entities/{id}/requirements/{requirementId}:
    parameters:
      - in: path
        name: id
        description: The sub-entity's ID.
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
      - in: path
        name: requirementId
        description: The requirement's ID, as returned by `GET /accounts/entities/{id}/requirements`.
        required: true
        allowEmptyValue: false
        example: req_5wmacwhrhbzhqkhx5hlqmzje44
        style: simple
        schema:
          type: string
    get:
      tags:
        - Onboarding
        - Platforms
      summary: Get requirement details
      operationId: getEntityRequirement
      description: >-
        Retrieve detailed information for a single requirement, including the JSON Schema that defines
        the shape of the value expected when resolving it.
    
    
        Once a response has been submitted for a requirement (see `PUT /accounts/entities/{id}/requirements/{requirementId}`),
        that requirement is no longer retrievable via this endpoint until it is re-issued or cleared.
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '200':
          description: Requirement details retrieved successfully
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityRequirementDetails'
              example:
                id: req_5wmacwhrhbzhqkhx5hlqmzje44
                resource: ent_wxglze3wwywujg4nna5fb7ldli
                resource_type: company
                reason: periodic_review
                priority: high
                deadline: '2026-06-01T00:00:00Z'
                urn: 'urn:object:company#ent_wxglze3wwywujg4nna5fb7ldli#field:legal-name'
                field_path: company.legal_name
                field_urn: 'urn:field:companies/legal-name'
                metadata:
                  purpose: company_verification
                message: Please confirm your legal company name.
                _schema:
                  type: string
                  minLength: 1
                  maxLength: 200
                _links:
                  self:
                    href: 'https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli/requirements/req_5wmacwhrhbzhqkhx5hlqmzje44'
                  collection:
                    href: 'https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli/requirements'
                  schema:
                    href: 'https://{prefix}.api.checkout.com/accounts/requirements/urn%3Aobject%3Acompany%23ent_wxglze3wwywujg4nna5fb7ldli%23field%3Alegal-name'
        '401':
          description: Unauthorized
        '404':
          description: Requirement not found, or a response has already been submitted for it.
    put:
      tags:
        - Onboarding
        - Platforms
      summary: Resolve a requirement
      operationId: resolveEntityRequirement
      description: >-
        Submit a response to resolve a requirement. The shape of `value` is defined by the requirement's
        `_schema`, returned from `GET /accounts/entities/{id}/requirements/{requirementId}`.
    
    
        The response is accepted for processing and applied asynchronously. While processing, the
        requirement is no longer retrievable via the GET endpoints; if validation fails downstream the
        requirement may reappear.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntityRequirementUpdateRequest'
            example:
              value: Acme Holdings Limited
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '202':
          description: Response accepted for processing
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityRequirementUpdateResponse'
              example:
                id: req_5wmacwhrhbzhqkhx5hlqmzje44
                status: processing
                submitted_at: '2026-05-05T10:15:30Z'
                _links:
                  self:
                    href: 'https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli/requirements/req_5wmacwhrhbzhqkhx5hlqmzje44'
                  collection:
                    href: 'https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli/requirements'
        '400':
          description: The request body could not be parsed.
        '401':
          description: Unauthorized
        '404':
          description: Requirement not found, or a response has already been submitted for it.
        '422':
          description: The supplied `value` did not validate against the requirement's `_schema`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
  /accounts/entities/{id}/reserve-rules:
    parameters:
      - in: path
        name: id
        description: The sub-entity's ID.
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
    post:
      description: Create a sub-entity reserve rule.
      summary: Add a reserve rule
      operationId: addReserveRule
      requestBody:
        required: true
        description: A JSON payload containing the reserve rule details.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReserveRuleCreateRequest'
            examples:
              RollingReserveRule:
                value:
                  type: rolling
                  valid_from: "2001-01-01T13:33:00.000Z"
                  rolling:
                    percentage: 10.00
                    holding_duration:
                      weeks: 2
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '201':
          description: Created
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            ETag:
              description: Identifies a specific version of a reserve rule.
              schema:
                type: string
              example: "Y3Y9MCZydj0w"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReserveRuleWriteResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
      tags:
        - platforms
        - Reserve rules
    
    get:
      description: Fetch all of the reserve rules for a sub-entity.
      summary: Query reserve rules
      operationId: queryReserveRules
    
      security:
        - OAuth:
            - accounts
        - ApiSecretKey: []
      responses:
        '200':
          description: OK
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReserveRuleQueryResponse'
              examples:
                ReserveRules:
                  value:
                    data: 
                      - id: rsv_qn4nis4k3ykpzzu7cvtuvhqqga
                        type: rolling
                        valid_from: "2001-01-01T13:33:00.000Z"
                        rolling:
                          percentage: 10.00
                          holding_duration:
                            weeks: 2
                          
                      - id: rsv_yk7nmh5jypmqzw5kb6kshj2iiy
                        type: rolling
                        valid_from: "2001-02-01T13:33:00.000Z"
                        rolling:
                          percentage: 15.00
                          holding_duration:
                            weeks: 4
                    
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      tags:
        - platforms
        - Reserve rules
    
  /address-document-verifications:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Address Document Verification
      summary: Create an address document verification
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create an address document verification for an applicant.
      operationId: create_address_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      requestBody:
        required: true
        content:
          application/json:
            examples:
              address_document_verification_creation_request_body:
                $ref: '#/components/examples/adv_address_document_verification_creation_request_body'
            schema:
              $ref: '#/components/schemas/AdvAddressDocumentVerification'
      responses:
        '201':
          description: Address document verification created successfully
          content:
            application/json:
              examples:
                address_document_verification_creation_response_body:
                  $ref: '#/components/examples/adv_address_document_verification_creation_response_body'
              schema:
                $ref: '#/components/schemas/AdvAddressDocumentVerificationOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdvIdentityVerificationError'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdvIdentityVerificationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /address-document-verifications/{address_document_verification_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Address Document Verification
      summary: Get an address document verification
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of an existing address document verification.
      operationId: retrieve_address_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: address_document_verification_id
          required: true
          in: path
          description: The address document verification's unique identifier.
          schema:
            $ref: '#/components/schemas/AdvAddressDocumentVerificationId'
      responses:
        '200':
          description: Address document verification retrieved successfully
          content:
            application/json:
              examples:
                address_document_verification_creation_response_body:
                  $ref: '#/components/examples/adv_address_document_verification_creation_response_body'
              schema:
                $ref: '#/components/schemas/AdvAddressDocumentVerificationOutput'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
  /address-document-verifications/{address_document_verification_id}/anonymize:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Address Document Verification
      summary: Anonymize an address document verification
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Remove the personal data from an address document verification.
      operationId: anonymize_address_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: address_document_verification_id
          in: path
          description: The address document verification's unique identifier.
          schema:
            $ref: '#/components/schemas/AdvAddressDocumentVerificationId'
          required: true
      responses:
        '200':
          description: Personal data removed successfully
          content:
            application/json:
              examples:
                address_document_verification_response_body_anonymized:
                  $ref: '#/components/examples/adv_address_document_verification_response_body_anonymized'
              schema:
                $ref: '#/components/schemas/AdvAddressDocumentVerificationOutput'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
  /address-document-verifications/{address_document_verification_id}/attempts:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Address Document Verification
      summary: Create an address document verification attempt
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create an address document verification attempt.
    
        If you've previously created an attempt for this verification, the [verification status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Check_statuses) must be one of the following:
    
        - `created`
        - `retry_required`
    
        If you create a new attempt while the status is any other value, you receive a `409 Conflict` response.
    
        Images must not exceed 10MB in size and must be in one of the following formats:
    
        - `JPEG`
        - `PDF`
        - `PNG`
      operationId: create_address_document_verification_attempt
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: address_document_verification_id
          in: path
          description: The address document verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/AdvAddressDocumentVerificationId'
      requestBody:
        content:
          multipart/form-data:
            examples:
              attempt_creation_request_body:
                $ref: '#/components/examples/adv_attempt_creation_request_body'
            schema:
              $ref: '#/components/schemas/AdvAttemptRequest'
      responses:
        '201':
          description: Address document verification attempt created successfully
          content:
            application/json:
              examples:
                attempt_creation_response_body:
                  $ref: '#/components/examples/adv_attempt_creation_response_body'
              schema:
                $ref: '#/components/schemas/AdvAttemptResponse'
        '404':
          description: Not Found
        '409':
          description: Conflict
        '500':
          description: Internal Server Error
    
    get:
      tags:
        - Address Document Verification
      summary: Get address document verification attempts
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of all attempts for a specific address document verification.
      operationId: list_attempts_address_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: address_document_verification_id
          in: path
          description: The address document verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/AdvAddressDocumentVerificationId'
      responses:
        '200':
          description: Address document verification attempts retrieved successfully
          content:
            application/json:
              examples:
                attempt_list_response_body:
                  $ref: '#/components/examples/adv_attempt_list_response_body'
              schema:
                $ref: '#/components/schemas/AdvAttemptResponseList'
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
  /address-document-verifications/{address_document_verification_id}/attempts/{attempt_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Address Document Verification
      summary: Get an address document verification attempt
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of a specific attempt for an address document verification.
      operationId: get_address_document_verification_attempt
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: address_document_verification_id
          in: path
          description: The address document verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/AdvAddressDocumentVerificationId'
        - name: attempt_id
          in: path
          description: The attempt's unique identifier.
          example: adva_tkoi5db4hryu5cei5vwoabr7we
          required: true
          schema:
            type: string
            pattern: ^adva_\w+$
      responses:
        '200':
          description: Address document verification attempt retrieved successfully
          content:
            application/json:
              examples:
                attempt_get_response_body:
                  $ref: '#/components/examples/adv_attempt_get_response_body'
              schema:
                $ref: '#/components/schemas/AdvAttemptResponse'
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
  /address-document-verifications/{address_document_verification_id}/pdf-report:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Address Document Verification
      summary: Get address document verification report
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the report for an address document verification in PDF format.
    
        The report is only available when the [verification status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Check_statuses) is `approved` or `declined`, and you've received an address document verification report created webhook.
      operationId: pdf_address_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: address_document_verification_id
          in: path
          description: The address document verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/AdvAddressDocumentVerificationId'
      responses:
        '200':
          description: Address document verification report retrieved successfully
          content:
            application/json:
              examples:
                identity_verification_pdf_response_body:
                  $ref: '#/components/examples/idv_identity_verification_pdf_response_body'
              schema:
                allOf:
                  - $ref: '#/components/schemas/IdvPdf'
                  - type: object
                    required:
                      - pdf_report
                    properties:
                      pdf_report:
                        type: string
                        format: uri
                        description: A pre-signed URL to the PDF report.
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /agentic_commerce/delegate_payment:
    post:
      tags:
        - Agentic Commerce Protocol
      security:
        - ApiSecretKey: [ ]
      summary: Create a delegated payment token
      operationId: delegatePayment
      description: |
        Creates a delegated payment token to securely enable Checkout.com merchants to process agentic payments.
    
        The token secures cardholder credentials for use in agentic commerce transactions. You must provide: 
          - The card details
          - The spending constraints (allowance)
          - The Billing address
          - The risk signals
    
        The request must include a valid HMAC-SHA256 signature in the `Signature` header and a timestamp in the `Timestamp` header to verify the request integrity.
      parameters:
        - in: header
          name: Signature
          required: true
          schema:
            type: string
          example: 'eyJtZX...'
          description: |
            A Base64-encoded HMAC-SHA256 signature used for request body integrity verification.
    
            Compute the signature as follows:
            1. Concatenate the `Timestamp` header value (as a UTF-8 string) with the raw JSON request body (as a UTF-8 string).
            2. Compute the HMAC-SHA256 hash of the concatenated string using your shared HMAC signing key.
            3. Base64-encode the resulting hash.
    
            Example: `Base64(HMAC-SHA256(key, Timestamp + RequestBody))`
        - in: header
          name: Timestamp
          required: true
          schema:
            type: string
            format: date-time
          example: '2025-09-25T10:30:00Z'
          description: |
            The timestamp of the request, in RFC 3339 format (for example, `2026-03-11T10:30:00Z`).
    
            The timestamp must be within 5 minutes of the server time. Requests with a timestamp outside this window are rejected with a `401` response.
        - $ref: '#/components/parameters/ckoIdempotencyKey'
        - in: header
          name: API-Version
          required: false
          schema:
            type: string
          example: '2025-09-29'
          description: |
            The API version to use for the request. If not specified, the default version (`2026-01-30`) is used.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DelegatedPaymentRequest'
      responses:
        '201':
          description: Delegated payment token created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegatedPaymentResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '400':
          description: Malformed JSON or unreadable request body
        '401':
          description: Missing or invalid API key, or signature validation failure
        '403':
          description: Merchant not enabled for the authenticated platform
        '409':
          description: Idempotency key reused with a different request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegatedPaymentErrorResponse'
        '422':
          description: Unprocessable entity. One or more fields failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegatedPaymentErrorResponse'
        '500':
          description: An unexpected error occurred while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegatedPaymentErrorResponse'
  /aml-verifications:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - AML Screening
      summary: Create an AML screening
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
         Create an [AML screening](https://www.checkout.com/docs/business-operations/manage-identities/screen-aml-databases).
    
        If the request is successful, you receive a `201 Created` response with the AML screening resource.
      operationId: create_aml_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmlVerification'
      responses:
        '201':
          description: AML screening created successfully
          content:
            application/json:
              examples:
                aml_verification_response_body:
                  $ref: '#/components/examples/aml_verification_response_body'
              schema:
                required: [applicant_id]
                allOf:
                  - $ref: '#/components/schemas/AmlVerificationOutput'
  /aml-verifications/{aml_verification_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - AML Screening
      summary: Get an AML screening
      description: Get the detailed result of an [AML screening](https://www.checkout.com/docs/business-operations/manage-identities/screen-aml-databases).
      operationId: retrieve_aml_screening
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: aml_verification_id
          required: true
          in: path
          description: The AML screening's unique identifier.
          schema:
            $ref: "#/components/schemas/AmlVerificationId"
      responses:
        "200":
          description: AML screening retrieved successfully
          content:
            application/json:
              examples:
                aml_verification_response_body:
                  $ref: "#/components/examples/aml_verification_response_body"
              schema:
                required: [applicant_id]
                allOf:
                  - $ref: "#/components/schemas/AmlVerificationOutput"
  /applepay/certificates:
    post:
      tags:
        - Apple Pay
      security:
        - ApiPublicKey: [ ]
      summary: Upload a payment processing certificate
      operationId: uploadApplePayCertificate
      description: |
        Upload a payment processing certificate. This will allow you to start processing payments via Apple Pay.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplePayCertificateRequest'
      responses:
        '201':
          description: Certificate uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplePayCertificateResponse'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      x-code-samples:
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('sk_sbox_XXXXX', {\n	pk: 'pk_sbox_XXXXX',\n});\n\ntry {\n	const apple = await cko.applePay.upload({\n		content: 'XXXXXXX', // make sure you escape the characters\n	});\n} catch (err) {\n	console.log(err.name);\n}"
  /applepay/enrollments:
    post:
      tags:
        - Apple Pay
      security:
        - OAuth:
            - vault:apme-enrollment
      summary: Enroll a domain to the Apple Pay Service
      description: |
        Enroll a domain to the Apple Pay Service
      operationId: ApplePayEnrollMerchant
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplePayEnrollmentRequest'
      responses:
        "204":
          description: Merchant successfully enrolled with no content to return
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "415":
          description: Unsupported Media Type
        "422":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplePayEnrollmentErrorResponse'
          description: Invalid data was sent
        "500":
          description: Internal Server Error
        "502":
          description: Bad Gateway
        "504":
          description: Gateway Timeout
  /applepay/signing-requests:
    post:
      tags:
        - Apple Pay
      security:
        - ApiPublicKey: [ ]
      summary: Generate a certificate signing request
      operationId: generateApplePaySigningRequest
      description: |
        Generate a certificate signing request. You'll need to upload this to your Apple Developer account to download a payment processing certificate.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplePaySigningRequest' 
      responses:
        '200':
          description: Generated signing request successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplePaySigningRequestResponse'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      x-code-samples:
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('sk_sbox_XXXXX', {\n	pk: 'pk_sbox_XXXXX',\n});\n\ntry {\n	const apple = await cko.applePay.generate();\n} catch (err) {\n	console.log(err.name);\n}"
  /balances/{id}:
    servers:
      - url: https://balances.checkout.com
        description: Production environment
      - url: https://balances.sandbox.checkout.com
        description: Sandbox environment
    parameters:
      - $ref: '#/components/parameters/EntityId'
      - $ref: '#/components/parameters/Query'
    get:
      summary: Retrieve entity balances
      operationId: getEntityBalances
      description: Use this endpoint to retrieve balances for each sub-account in an entity. <br/>*Note:* The sub-account is referred to as _currency account_ in the API.
      parameters:
        - in: query
          name: withCurrencyAccountId
          description: Specifies if the response should include the sub-account ID that corresponds to each set of balances.
          schema:
              type: boolean
              default: false
          required: false
        - in: query
          name: balancesAt
          description: A UTC datetime to retrieve historical balances at a specific point in time, in the format `yyyy-MM-ddTHH:mm:ssZ` (e.g. `2026-05-06T13:59:59.9999999+00:00`). Must be in the past. If omitted, the response returns live balances.
          schema:
            type: string
            format: date-time
            example: '2026-05-06T13:59:59.9999999+00:00'
          required: false
      security:
        - OAuth:
            - balances
        - ApiSecretKey: []
      responses:
        '200':
          description: Balances retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancesResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '400':
          description: Invalid query parameter — for example, an unsupported `query` filter value, a non-boolean `withCurrencyAccountId`, or a malformed `balancesAt` value.
        '401':
          description: Unauthorized
        '404':
          description: Entity not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
      tags:
        - Balances
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Balances;\nusing Checkout.Common;\n\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Balances)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n\nBalancesQuery query = new BalancesQuery {Query = \"currency:\" + Currency.GBP};\n\ntry\n{\n    BalancesResponse balances = await api.BalancesClient()\n        .RetrieveEntityBalances(\"entitiy_id\", query);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"fmt\"\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/balances\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Balances}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nquery := balances.QueryFilter{Query: fmt.Sprintf(\"currency:%s\", common.GBP)}\n\nresponse, err := api.Balances.RetrieveEntityBalances(\"entity_id\", query)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.balances.BalancesQuery;\nimport com.checkout.balances.BalancesResponse;\nimport com.checkout.common.Currency;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.BALANCES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nBalancesQuery query = BalancesQuery.builder()\n    .query(\"currency:\" + Currency.EUR)\n    .build();\n\ntry {\n    BalancesResponse response = api.balancesClient().retrieveEntityBalances(\"balance_id\", query).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\Balances\\BalancesQuery;\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Currency;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Balances])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$query = new BalancesQuery();\n$query->query = \"currency:\" . Currency::$GBP;\n\ntry {\n    $response = $api->getBalancesClient()->retrieveEntityBalances(\"entity_id\", $query);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "import checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.balances.balances import BalancesQuery\n\n# OAuth\noauth = (\n    CheckoutSdk.builder()\n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.BALANCES]) \n    .build()\n)\n\nquery = BalancesQuery()\nquery.query = \"string\"\n\ntry:\n    response = api.balances.retrieve_entity_balances(\"entity_id\", query)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /compliance-requests/{payment_id}:
    get:
      tags:
        - Compliance requests
      summary: Get a compliance request
      description: >-
        Retrieve an existing <a
        href="https://www.checkout.com/docs/business-operations/respond-to-compliance-requests">compliance
        request</a> by payment ID.
      operationId: ComplianceRequests_GetComplianceRequest
      parameters:
        - name: payment_id
          in: path
          description: The compliance request's payment ID.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Compliance request retrieved successfully.
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComplianceRequestDetails'
        '400':
          description: >-
            Compliance request could not be retrieved. See the response body for
            more information.
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
        '401':
          description: Unauthorized request
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
        '403':
          description: Forbidden
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
        '404':
          description: Compliance request not found
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
      security:
        - OAuth:
            - compliance-requests
            - compliance-requests:read
        - ApiSecretKey: []
    post:
      tags:
        - Compliance requests
      summary: Respond to a compliance request
      description: >-
        Submit a response to a <a
        href="https://www.checkout.com/docs/business-operations/respond-to-compliance-requests">compliance
        request</a>.
      operationId: ComplianceRequests_SubmitComplianceRequestResponse
      parameters:
        - name: payment_id
          in: path
          description: The compliance request's payment ID.
          required: true
          schema:
            type: string
      requestBody:
        description: The response details.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComplianceRequestResponse'
      responses:
        '202':
          description: Response to compliance request accepted
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
        '400':
          description: >-
            Response to compliance request could not be submitted. See the response
            body for more information.
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
        '401':
          description: Unauthorized request
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
        '403':
          description: Forbidden
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
        '404':
          description: Compliance request not found
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
        '409':
          description: The compliance request has already been responded to.
          headers:
            Cko-Version:
              description: Version of the API that handled the request.
              schema:
                type: string
              example: 0.0.1
            Cko-Request-Id:
              description: >-
                Correlation identifier for this request. Returned when provided via
                the Cko-Request-Id request header.
              schema:
                type: string
              example: e2ad4d96-5c63-4ae0-9456-5ac3b5f1559e
      security:
        - OAuth:
            - compliance-requests
            - compliance-requests:respond
        - ApiSecretKey: []
  /connect/token:
    servers:
      - url: https://{prefix}.access.checkout.com
        description: Production environment
        variables:
          prefix:
            description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
            default: "{prefix}"
      - url: https://{prefix}.access.sandbox.checkout.com
        description: Sandbox environment
        variables:
          prefix:
            description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
            default: "{prefix}"
    post:
      summary: Request an access token
      operationId: requestAnAccessToken
      tags:
        - Access
      security:
        []
      responses:
        '200':
          description: OK - A successful access token response as per [RFC6749](https://tools.ietf.org/html/rfc6749#section-4.4.3)
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    example: 2YotnFZFEjr1zCsicMWpAA
                  token_type:
                    type: string
                    example: example
                  expires_in:
                    type: number
                    example: 3600
    
        '400':
          description: Bad request - An unsuccessful access token response as per [RFC6749](https://tools.ietf.org/html/rfc6749#section-4.4.3)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - invalid_request
                      - invalid_client
                      - invalid_grant
                      - unauthorized_client
                      - unsupported_grant_type
                      - invalid_scope
      description: OAuth endpoint to exchange your access key ID and access key secret for an access token.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                  example: client_credentials
                client_id:
                  type: string
                  description: 'Access key ID'
                client_secret:
                  type: string
                  description: 'Access key secret'
                scope:
                  type: string
                  description: The access key scope
                  example: gateway
            examples:
              example-1:
                value:
                  grant_type: client_credentials
                  client_id: ack_clckqmmnyfiupexjew7shh5ahe
                  client_secret: Pmg36sDWQ9WxtPR3
      x-code-samples:
        - lang: C#
          source: "// Please refer to https://github.com/checkout/checkout-sdk-net on how to setup the SDK with OAuth\ntry\n{\n    ICheckoutApi api = CheckoutSdk.Builder().OAuth()\n        .ClientCredentials(\"client_id\", \"client_secret\")\n        .Scopes(OAuthScope.Vault) // more scopes available\n        .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n        .HttpClientFactory(new DefaultHttpClientFactory())\n        .Build();\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: cURL
          source: "curl --location 'https://{prefix}.access.checkout.com/connect/token'\n  --header 'Content-Type: application/x-www-form-urlencoded'\n  --data-urlencode 'grant_type=client_credentials'\n  --data-urlencode 'client_id=ack_...' \n  --data-urlencode 'client_secret=...'"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// SDK instantiation for OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Files, configuration.Flow, configuration.Fx, configuration.Gateway,\n				configuration.Marketplace, configuration.SessionsApp, configuration.SessionsBrowser,\n				configuration.Vault, configuration.PayoutsBankDetails, configuration.Disputes}). // more scopes available\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}"
        - lang: Java
          source: "// Please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\n\n// SDK instantiation for OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FILES, OAuthScope.FLOW, OAuthScope.FX, OAuthScope.GATEWAY,\n            OAuthScope.MARKETPLACE, OAuthScope.SESSIONS_APP, OAuthScope.SESSIONS_BROWSER,\n            OAuthScope.VAULT, OAuthScope.PAYOUTS_BANK_DETAILS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nconst cko = new Checkout();\n\ntry {\n	const access_token = await cko.access.request({\n		grant_type: 'client_credentials',\n		client_id: 'ack_XXXX',\n		client_secret: 'XXXXX',\n		scope: 'gateway',\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Balances])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();"
        - lang: Python
          source: "# please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# SDK instantiation for OAuth\napi = CheckoutSdk.builder() \\\n    .oauth() \\\n    .client_credentials('client_id', 'client_secret') \\\n    .scopes([OAuthScopes.GATEWAY, OAuthScopes.VAULT, OAuthScopes.PAYOUTS_BANK_DETAILS,\n             OAuthScopes.SESSIONS_APP, OAuthScopes.SESSIONS_BROWSER, OAuthScopes.FX, OAuthScopes.MARKETPLACE,\n             OAuthScopes.FILES, OAuthScopes.TRANSFERS, OAuthScopes.BALANCES_VIEW]) \\\n    .build()"
  /customers:
    post:
      tags:
        - Customers
      security:
        - OAuth:
            - vault
            - vault:customers
        - ApiSecretKey: []
      summary: Create a customer
      operationId: createCustomer
      description: >
        <a href="https://www.checkout.com/docs/payments/store-and-manage-credentials" target="_blank">Store a customer's details in a customer object to reuse in future payments</a>. When creating a customer, you can link payment instruments – the customer `id` returned can be passed as a source when making a payment.
        <br/><br>
        **NOTE:** Specify a `default` instrument, otherwise the `instruments` array will not be saved on creation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreCustomerRequest'
      responses:
        '201':
          description: Customer created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreCustomerResponse'
        '401':
          description: Unauthorized
        '409':
          description: A concurrent update conflict occurred. Retry the request.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\nusing CustomerRequest = Checkout.Customers.CustomerRequest;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Vault)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nCustomerRequest request = new CustomerRequest\n{\n    Email = \"email@docs.checkout.com\",\n    Name = \"FirstName LastName\",\n    Phone = new Phone {CountryCode = \"1\", Number = \"4155552671\"},\n    Metadata = new Dictionary<string, object>() {{\"coupon_code\", \"NY2018\"}, {\"partner_id\", \"123989\"}}\n};\n\ntry\n{\n    IdResponse response = await api.CustomersClient().Create(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/customers\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Vault}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := customers.CustomerRequest{\n	Email: \"email@docs.checkout.com\",\n	Name:  \"Name\",\n	Phone: &common.Phone{\n		CountryCode: \"44\",\n		Number:      \"4155552671\",\n	},\n}\n\nresponse, err := api.Customers.Create(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.IdResponse;\nimport com.checkout.common.Phone;\nimport com.checkout.customers.CustomerRequest;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nCustomerRequest request = CustomerRequest.builder()\n    .email(\"email@docs.checkout.com\")\n    .name(\"name\")\n    .phone(Phone.builder().countryCode(\"1\").number(\"415 555 2671\").build())\n    .instruments(Arrays.asList(\"instrument_id_1\", \"instrument_id_2\"))\n    .metadata(new HashMap<>())\n    .build();\n\ntry {\n    IdResponse response = api.customersClient().create(request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const customerResponse = await cko.customers.create({\n		email: 'JohnTest@test.com',\n		name: 'John Test',\n		phone: {\n			country_code: '+1',\n			number: '4155552671',\n		},\n		metadata: {\n			coupon_code: 'NY2018',\n			partner_id: 123989,\n		},\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Phone;\nuse Checkout\\Customers\\CustomerRequest;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$phone = new Phone();\n$phone->country_code = \"+1\";\n$phone->number = \"415 555 2671\";\n\n$request = new CustomerRequest();\n$request->email = \"email@docs.checkout.com\";\n$request->name = \"name\";\n$request->phone = $phone;\n$request->instruments = [\"instrument_id_1\", \"instrument_id_2\"];\n\ntry {\n    $response = $api->getCustomersClient()->create($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.common.common import Phone\nfrom checkout_sdk.customers.customers import CustomerRequest\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder()\n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder()\n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\nrequest = CustomerRequest()\nrequest.email = 'email@docs.checkout.com'\nrequest.name = 'Name'\nrequest.phone = phone\nrequest.instruments = ['instrument_id_1', 'instrument_id_2']\n\ntry:\n    response = api.customers.create(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /customers/{identifier}:
    get:
      security:
        - OAuth:
            - vault
            - vault:customers
        - ApiSecretKey: [ ]
      tags:
        - Customers
      summary: Get customer details
      operationId: getCustomerDetails
      description: Returns the details of a customer and their payment instruments.
      parameters:
        - in: path
          name: identifier
          required: true
          description: The customer's ID or email
          schema:
            type: string
            properties:
              id:
                type: string
                pattern: "^(cus)_(\\w{26})$"
              email:
                type: string
                format: email
                maxLength: 255
            additionalProperties: false
            oneOf:
              - required: [ id ]
              - required: [ email ]
      responses:
        '200':
          description: Customer retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveCustomerResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Customer not found
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Customers;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Vault)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    CustomerDetailsResponse response = await api.CustomersClient().Get(\"customer_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Vault}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Customers.Get(\"customer_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.customers.CustomerResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    CustomerResponse response = api.customersClient().get(\"customer_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const customerResponse = await cko.customers.get('cus_2tvaccfvs3lulevzg42vgyvtdq');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getCustomersClient()->get(\"customer_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder()\n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\ntry:\n    response = api.customers.get(\"customer_id\")\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    patch:
      tags:
        - Customers
      security:
        - OAuth:
            - vault
            - vault:customers
        - ApiSecretKey: [ ]
      summary: Update customer details
      operationId: updateCustomerDetails
      description: Update the details of a customer and link payment instruments to them.
      parameters:
        - in: path
          name: identifier
          schema:
            type: string
            pattern: "^(cus)_(\\w{26})$"
          required: true
          description: The customer's ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerDetailsRequest'
      responses:
        '204':
          description: Customer updated successfully
        '401':
          description: Unauthorized
        '409':
          description: A concurrent update conflict occurred. Call the [Get customer details](/tag/Customers#operation/getCustomerDetails) to retrieve the latest state before retrying.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '404':
          description: Customer not found
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\nusing CustomerRequest = Checkout.Customers.CustomerRequest;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Vault)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nCustomerRequest request = new CustomerRequest\n{\n    Email = \"email@docs.checkout.com\",\n    Name = \"FirstName LastName\",\n    Phone = new Phone\n    {\n        CountryCode = \"1\",\n        Number = \"4155552671\"\n    },\n    Metadata = new Dictionary<string, object>()\n    {\n        {\"coupon_code\", \"NY2018\"},\n        {\"partner_id\", \"123989\"}\n    }\n};\n\nCustomerRequest request = new CustomerRequest\n{\n    Email = \"email@docs.checkout.com\",\n    Name = \"FirstName LastName\",\n    Phone = new Phone {CountryCode = \"1\", Number = \"4155552671\"},\n    Metadata = new Dictionary<string, object>() {{\"coupon_code\", \"NY2018\"}, {\"partner_id\", \"123989\"}}\n};\n\ntry\n{\n    await api.CustomersClient().Update(\"customer_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/customers\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Vault}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := customers.CustomerRequest{\n	Email: \"email@docs.checkout.com\",\n	Name:  \"Name\",\n	Phone: &common.Phone{\n		CountryCode: \"44\",\n		Number:      \"4155552671\",\n	},\n}\n\nresponse, err := api.Customers.Update(\"customer_id\", request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.Phone;\nimport com.checkout.customers.CustomerRequest;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nCustomerRequest customerRequest = CustomerRequest.builder()\n    .email(\"email@docs.checkout.com\")\n    .name(\"name\")\n    .phone(Phone.builder().countryCode(\"1\").number(\"4155552671\").build())\n    .instruments(Arrays.asList(\"instrument_id_1\", \"instrument_id_2\"))\n    .metadata(new HashMap<>())\n    .build();\n\ntry {\n    EmptyResponse response = api.customersClient().update(\"customer_id\", customerRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const customerResponse = await cko.customers.update('cus_2tvaccfvs3lulevzg42vgyvtdq', {\n		name: 'James Bond',\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Phone;\nuse Checkout\\Customers\\CustomerRequest;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$phone = new Phone();\n$phone->country_code = \"+1\";\n$phone->number = \"415 555 2671\";\n\n$request = new CustomerRequest();\n$request->email = \"email@docs.checkout.com\";\n$request->name = \"name\";\n$request->phone = $phone;\n$request->instruments = [\"instrument_id_1\", \"instrument_id_2\"];\n\ntry {\n    $response = $api->getCustomersClient()->update(\"customer_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.common.common import Phone\nfrom checkout_sdk.customers.customers import CustomerRequest\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\nrequest = CustomerRequest()\nrequest.email = 'email@docs.checkout.com'\nrequest.name = 'Name'\nrequest.phone = phone\nrequest.instruments = ['instrument_id_1', 'instrument_id_2']\n\ntry:\n    response = api.customers.update(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    delete:
      tags:
        - Customers
      security:
        - OAuth:
            - vault
            - vault:customers
        - ApiSecretKey: [ ]
      summary: Delete a customer
      operationId: deleteCustomer
      description: Delete a customer and all of their linked payment instruments.
      parameters:
        - in: path
          name: identifier
          required: true
          schema:
            type: string
            pattern: "^(cus)_(\\w{26})$"
          description: The customer's ID
      responses:
        '204':
          description: Customer deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: Customer not found or not associated with client
        '409':
          description: A concurrent update conflict occurred. Retry the request.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Vault)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    EmptyResponse response = await api.CustomersClient().Delete(\"customer_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Vault}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Customers.Delete(\"customer_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    EmptyResponse response = api.customersClient().delete(\"customer_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const customerResponse = await cko.customers.delete('cus_2tvaccfvs3lulevzg42vgyvtdq');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Vault])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getCustomersClient()->delete(\"customer_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder()\n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder()\n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\ntry:\n    response = api.customers.delete(\"customer_id\")\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /disputes:
    get:
      tags:
        - Disputes
      security:
        - OAuth:
            - disputes
            - disputes:view
        - ApiSecretKey: [ ]
      summary: Get disputes
      operationId: getDisputes
      description: >-
        Returns a list of all disputes against your business. The results will be
        returned in reverse chronological order, showing the last modified dispute
        (for example, where you've recently added a piece of evidence) first. You
        can use the optional parameters below to skip or limit results.
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 250
            default: 50
          required: false
          description: The numbers of results to return
        - in: query
          name: skip
          schema:
            type: integer
            minimum: 0
            default: 0
          required: false
          description: The number of results to skip
        - in: query
          name: from
          schema:
            type: string
            format: date-time
          required: false
          description: The date and time from which to filter disputes, based on the dispute's
            `last_update` field
        - in: query
          name: to
          schema:
            type: string
            format: date-time
          required: false
          description: The date and time until which to filter disputes, based on the dispute's
            `last_update` field
        - in: query
          name: id
          schema:
            type: string
          required: false
          description: The unique identifier of the dispute
        - in: query
          name: entity_ids
          schema:
            type: string
            example: 'ent_wxglze3wwywujg4nna5fb7ldli,ent_vkb5zcy64zoe3cwfmaqvqyqyku'
          required: false
          description: One or more comma-separated client entities. This works like a logical *OR*
            operator
        - in: query
          name: sub_entity_ids
          schema:
            type: string
            example: 'ent_uzm3uxtssvmuxnyrfdffcyjxeu,ent_hy5wtzwzeuwefmsnjtdhw4scfi'
          required: false
          description: One or more comma-separated sub-entities. This works like a logical *OR*
            operator
        - in: query
          name: processing_channel_ids
          schema:
            type: string
            example: 'pc_uzm3uxtssvmuxnyrfdffcyjxeu,pc_hy5wtzwzeuwefmsnjtdhw4scfi'
          required: false
          description: One or more comma-separated processing channels. This works like a logical *OR*
            operator.
        - in: query
          name: segment_ids
          schema:
            type: string
          required: false
          description: One or more comma-separated segments. This works like a logical *OR*
            operator.
        - in: query
          name: statuses
          schema:
            type: string
            example: 'evidence_required,evidence_under_review'
          required: false
          description: One or more comma-separated statuses. This works like a logical *OR*
            operator
        - in: query
          name: payment_id
          schema:
            type: string
          required: false
          description: The unique identifier of the payment
        - in: query
          name: payment_reference
          schema:
            type: string
          required: false
          description: An optional reference (such as an order ID) that you can use later to identify the payment. Previously known as `TrackId`
        - in: query
          name: payment_arn
          schema:
            type: string
          required: false
          description: The acquirer reference number (ARN) that you can use to query the
            issuing bank
        - in: query
          name: payment_mcc
          schema:
            type: string
          required: false
          description: The merchant category code (MCC) of the payment (ISO 18245)
        - in: query
          name: this_channel_only
          schema:
            type: boolean
          required: false
          description:
            If `true`, only returns disputes of the specific channel that the secret key is associated with. Otherwise, returns all disputes for that
            business
      responses:
        '200':
          description: Disputes retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisputePaged'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable paging
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagingError'
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Disputes;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Disputes)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nDisputesQueryFilter request = new DisputesQueryFilter\n{\n    Limit = 250,\n    To = DateTime.Now,\n};\n\ntry\n{\n    DisputesQueryResponse response = await api.DisputesClient().Query(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/disputes\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Disputes}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nquery := disputes.QueryFilter{\n	Limit:            10,\n	Skip:             5,\n	From:             time.Parse(\"2006-01-02T15:04:05Z\", time.Now().AddDate(0, -1, 0).Format(\"2006-01-02T15:04:05Z\")),\n	To:               time.Parse(\"2006-01-02T15:04:05Z\", time.Now().Format(\"2006-01-02T15:04:05Z\")),\n	Statuses:         strings.Join([]string{disputes.EvidenceRequired, disputes.Accepted}[:], \",\"),\n	PaymentId:        \"payment_id\",\n	PaymentReference: \"payment_reference\",\n	PaymentArn:       \"payment_arn\",\n}\n\nresponse, err := api.Disputes.Query(query)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.disputes.DisputeStatus;\nimport com.checkout.disputes.DisputesQueryFilter;\nimport com.checkout.disputes.DisputesQueryResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.DISPUTES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nDisputesQueryFilter query = DisputesQueryFilter.builder()\n    .paymentId(\"payment_id\")\n    .from(LocalDateTime.now().minusMonths(2).toInstant(ZoneOffset.UTC))\n    .to(Instant.now())\n    .paymentArn(\"payment_arn\")\n    .paymentReference(\"payment_reference\")\n    .statuses(String.join(\",\", DisputeStatus.EVIDENCE_UNDER_REVIEW.getStatus(), DisputeStatus.ARBITRATION_WON.getStatus()))\n    .limit(10)\n    .skip(5)\n    .build();\n\ntry {\n    DisputesQueryResponse response = api.disputesClient().query(query).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const disputes = await cko.disputes.get({\n		limit: 5,\n		id: 'dsp_bc94ebda8d275i461229',\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Disputes\\DisputesQueryFilter;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$query = new DisputesQueryFilter();\n$query->payment_id = \"payment_id\";\n$query->payment_arn = \"payment_arn\";\n$query->payment_reference = \"payment_reference\";\n$query->statuses = \"comma,separated,list,statuses\";\n$query->limit = 10;\n$query->skip = 5;\n$query->to = new DateTime(); // UTC, now\n\n$from = new DateTime();\n$from->setTimezone(new DateTimeZone(\"America/Mexico_City\"));\n$from->sub(new DateInterval(\"P1M\"));\n$query->from = $from;\n\ntry {\n    $response = $api->getDisputesClient()->query($query);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.disputes.disputes import DisputesQueryFilter\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_VIEW]) \n    .build()\n)\n\nquery = DisputesQueryFilter()\nnow = datetime.now(timezone.utc)\nquery.from_ = now - relativedelta(months=6)\nquery.to = now\nquery.payment_arn = 'payment_arn'\nquery.payment_reference = 'payment_reference'\nquery.limit = 10\nquery.skip = 5\n\ntry:\n    response = api.disputes.query(query)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /disputes/{dispute_id}:
    get:
      tags:
        - Disputes
      security:
        - OAuth:
            - disputes
            - disputes:view
        - ApiSecretKey: [ ]
      summary: Get dispute details
      operationId: getDisputeDetails
      description: Returns all the details of a dispute using the dispute identifier.
      parameters:
        - in: path
          name: dispute_id
          schema:
            type: string
            pattern: '^(dsp)_(\\w{22,26})$'
          required: true
          description: The dispute identifier
      responses:
        '200':
          description: Dispute retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dispute'
        '401':
          description: Unauthorized
        '404':
          description: Dispute not found
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Disputes;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Disputes)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    DisputeDetailsResponse response = await api.DisputesClient().GetDisputeDetails(\"disputes_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Disputes}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Disputes.GetDisputeDetails(\"dispute_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.disputes.DisputeDetailsResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.DISPUTES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    DisputeDetailsResponse response = api.disputesClient().getDisputeDetails(\"dispute_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const disputeDetails = await cko.disputes.getDetails('dsp_bc94ebda8d275i461229');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Disputes])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getDisputesClient()->getDisputeDetails(\"dispute_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_VIEW]) \n    .build()\n)\n\ntry:\n    response = api.disputes.get_dispute_details('dispute_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /disputes/{dispute_id}/accept:
    post:
      tags:
        - Disputes
      security:
        - OAuth:
            - disputes
            - disputes:accept
        - ApiSecretKey: [ ]
      summary: Accept dispute
      operationId: acceptDispute
      description: >-
        If a dispute is legitimate, you can choose to accept it. This will close it
        for you and remove it from your list of open disputes. There are no further
        financial implications.
      parameters:
        - in: path
          name: dispute_id
          schema:
            type: string
            pattern: '^(dsp)_(\w{26})$'
          required: true
          description: The dispute identifier
      responses:
        '204':
          description: Dispute accepted successfully
        '401':
          description: Unauthorized
        '404':
          description: Dispute not found
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Disputes)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    EmptyResponse response = await api.DisputesClient().Accept(\"disputes_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n\"github.com/checkout/checkout-sdk-go\"\n\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Disputes}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Disputes.Accept(\"dispute_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.DISPUTES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    EmptyResponse response = api.disputesClient().accept(\"dispute_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}\n"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const accept = await cko.disputes.accept('dsp_bc94ebda8d275i461229');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Disputes])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getDisputesClient()->accept(\"dispute_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_ACCEPT]) \n    .build()\n)\n\ntry:\n    response = api.disputes.accept('dispute_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization\n"
  /disputes/{dispute_id}/evidence:
    put:
      tags:
        - Disputes
      security:
        - OAuth:
            - disputes
            - disputes:provide-evidence
        - ApiSecretKey: [ ]
      summary: Provide dispute evidence
      operationId: provideDisputeEvidence
      description: >
        Adds supporting evidence to a dispute. Before using this endpoint, you first
        need to [upload your files](#tag/Disputes/paths/~1files/post) using the file
        uploader. You will receive a file id (prefixed by `file_`) which you can
        then use in your request.
        Note that this only attaches the evidence to the dispute, it does not send
        it to us. Once ready, you will need to submit it.
        **You must provide at least one evidence type in the body of your request.**
      parameters:
        - in: path
          name: dispute_id
          schema:
            type: string
            pattern: '^(dsp)_(\w{26})$'
          required: true
          description: The dispute identifier.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProvideEvidenceRequest'
      responses:
        '204':
          description: Dispute evidence provided successfully
        '400':
          description: Unprocessable
        '401':
          description: Unauthorized
        '404':
          description: Dispute not found
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                properties:
                  request_id:
                    type: string
                    description: The request identifier.
                  error_type:
                    type: string
                    description: The error type.
                  error_codes:
                    type: array
                    items:
                      type: string
                    description: >
                      The error codes returned from the validation.
                        * `invoice_or_receipt_file_id_invalid`
                        * `invoice_or_receipt_text_invalid`
                        * `invoice_showing_distinct_transactions_file_id_invalid`
                        * `invoice_showing_distinct_transactions_text_invalid`
                        * `customer_communication_file_id_invalid`
                        * `customer_communication_text_invalid`
                        * `refund_or_cancellation_policy_file_id_invalid`
                        * `refund_or_cancellation_policy_text_invalid`
                        * `recurring_transaction_agreement_file_id_invalid`
                        * `proof_of_delivery_or_service_date_file_id_invalid`
                        * `proof_of_delivery_or_service_date_text_invalid`
                        * `additional_evidence_file_id_invalid`
                        * `additional_evidence_text_invalid`
                        * `proof_of_delivery_or_service_text_invalid`
                        * `proof_of_delivery_or_service_text_invalid`
                        * `dispute_not_found`
                        * `should_be_merchandise_or_service`
                        * `should_be_merchandise_or_service_required`
                        * `merchandise_or_service_desc_required`
                        * `merchandise_or_service_desc_invalid`
                        * `delivery_status_invalid`
                        * `tracking_information_required`
                        * `tracking_information_invalid`
                        * `historical_arn_required`
                        * `historical_arn_invalid`
                        * `historical_transaction_date_invalid`
                        * `historical_transaction_address_required`
                        * `historical_transaction_address_invalid`
                        * `historical_transaction_city_required`
                        * `historical_transaction_city_invalid`
                        * `historical_transaction_state_region_required`
                        * `historical_transaction_state_region_invalid_length_2`
                        * `historical_transaction_postalcode_required`
                        * `historical_transaction_postalcode_invalid`
                        * `historical_transaction_country_required`
                        * `historical_transaction_country_invalid`
                        * `historical_transaction_country_should_be_only_numbers`
                        * `not_valid_compelling_evidence_candidate`
                        * `ip_address_and_device_id_is_required`
                        * `ip_address_is_invalid`
                        * `device_id_minimum_15_length`
                        * `two_historical_transactions_required`
                        * `two_core_properties_in_historical_transactions_required`
                        * `historical_transactions_should_be_different`
                        * `merchandise_or_service_provided_date_required`
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Disputes;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Disputes)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nDisputeEvidenceRequest request = new DisputeEvidenceRequest\n{\n    ProofOfDeliveryOrServiceFile = \"file_xxxxxx\",\n    ProofOfDeliveryOrServiceText = \"proof of delivery or service text\",\n    InvoiceOrReceiptFile = \"file_xxxxxx\",\n    InvoiceOrReceiptText = \"Copy of the invoice\",\n    CustomerCommunicationFile = \"file_xxxxxx\",\n    CustomerCommunicationText = \"Copy of an email exchange with the cardholder\",\n    AdditionalEvidenceFile = \"file_xxxxxx\",\n    AdditionalEvidenceText = \"Scanned document\",\n    InvoiceShowingDistinctTransactionsFile = \"file_xxxxxx\",\n    InvoiceShowingDistinctTransactionsText = \"Copy of invoice #1244 showing two transactions\",\n    RefundOrCancellationPolicyFile = \"file_xxxxxx\",\n    RefundOrCancellationPolicyText = \"Copy of the refund policy\",\n    RecurringTransactionAgreementFile = \"file_xxxxxx\",\n    RecurringTransactionAgreementText = \"Copy of the recurring transaction agreement\",\n    ProofOfDeliveryOrServiceDateFile = \"file_xxxxxx\",\n    ProofOfDeliveryOrServiceDateText = \"Copy of the customer receipt showing the merchandise was delivered\"\n};\n\ntry\n{\n    EmptyResponse response = await api.DisputesClient().PutEvidence(\"disputes_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/disputes\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Disputes}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := disputes.Evidence{\n	ProofOfDeliveryOrServiceFile:           \"file_id\",\n	ProofOfDeliveryOrServiceText:           \"proof of delivery or service text\",\n	InvoiceOrReceiptFile:                   \"file_id\",\n	InvoiceOrReceiptText:                   \"proof of receipt text\",\n	InvoiceShowingDistinctTransactionsFile: \"file_id\",\n	InvoiceShowingDistinctTransactionsText: \"invoice showing distinct transactions text\",\n	CustomerCommunicationFile:              \"file_id\",\n	CustomerCommunicationText:              \"customer communication text\",\n	RefundOrCancellationPolicyFile:         \"file_id\",\n	RefundOrCancellationPolicyText:         \"refund or cancellation policy text\",\n	RecurringTransactionAgreementFile:      \"file_id\",\n	RecurringTransactionAgreementText:      \"recurring transaction agreement text\",\n	AdditionalEvidenceFile:                 \"file_id\",\n	AdditionalEvidenceText:                 \"additional evidence text\",\n	ProofOfDeliveryOrServiceDateFile:       \"file_id\",\n	ProofOfDeliveryOrServiceDateText:       \"proof of delivery or service date text\",\n}\n\nresponse, err := api.Disputes.PutEvidence(\"dispute_id\", request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.disputes.DisputeEvidenceRequest;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.DISPUTES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nDisputeEvidenceRequest evidenceRequest = DisputeEvidenceRequest.builder()\n    .proofOfDeliveryOrServiceFile(\"file_id\")\n    .proofOfDeliveryOrServiceText(\"proof of delivery or service text\")\n    .invoiceOrReceiptFile(\"file_id\")\n    .invoiceOrReceiptText(\"Copy of the invoice\")\n    .invoiceShowingDistinctTransactionsFile(\"file_id\")\n    .invoiceShowingDistinctTransactionsText(\"Copy of invoice #1244 showing two transactions\")\n    .customerCommunicationFile(\"file_id\")\n    .customerCommunicationText(\"Copy of an email exchange with the cardholder\")\n    .refundOrCancellationPolicyFile(\"file_id\")\n    .refundOrCancellationPolicyText(\"Copy of the refund policy\")\n    .recurringTransactionAgreementFile(\"file_id\")\n    .recurringTransactionAgreementText(\"Copy of the recurring transaction agreement\")\n    .additionalEvidenceFile(\"file_id\")\n    .additionalEvidenceText(\"Scanned document\")\n    .proofOfDeliveryOrServiceDateFile(\"file_id\")\n    .proofOfDeliveryOrServiceDateText(\"Copy of the customer receipt showing the merchandise was delivered on 2018-12-20\")\n    .build();\n\ntry {\n    EmptyResponse response = api.disputesClient().putEvidence(\"dispute_id\", evidenceRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const evidence = await cko.disputes.provideEvidence('dsp_bc94ebda8d275i461229', {\n		proof_of_delivery_or_service_text: 'http://checkout.com/document.pdf',\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Disputes\\DisputeEvidenceRequest;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Disputes])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new DisputeEvidenceRequest();\n$request->proof_of_delivery_or_service_file = \"file_id\";\n$request->proof_of_delivery_or_service_text = \"proof of delivery or service text\";\n$request->invoice_or_receipt_file = \"file_id\";\n$request->invoice_or_receipt_text = \"Copy of the invoice\";\n$request->customer_communication_file = \"file_id\";\n$request->customer_communication_text = \"Copy of an email exchange with the cardholder\";\n$request->additional_evidence_file = \"file_id\";\n$request->additional_evidence_text = \"Scanned document\";\n\ntry {\n    $api->getDisputesClient()->putEvidence(\"dispute_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.disputes.disputes import DisputeEvidenceRequest\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_PROVIDE_EVIDENCE]) \n    .build()\n)\n\nevidence_request = DisputeEvidenceRequest()\nevidence_request.proof_of_delivery_or_service_file = 'proof_of_delivery_or_service_file'\nevidence_request.proof_of_delivery_or_service_text = 'proof of delivery or service text'\nevidence_request.invoice_or_receipt_file = 'invoice_or_receipt_file'\nevidence_request.invoice_or_receipt_text = 'invoice_or_receipt_text'\nevidence_request.customer_communication_file = 'customer_communication_file'\nevidence_request.customer_communication_text = 'customer_communication_text'\nevidence_request.additional_evidence_file = 'additional_evidence_file'\nevidence_request.additional_evidence_text = 'additional_evidence_text'\n\ntry:\n    response = api.disputes.put_evidence('dispute_id', evidence_request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    get:
      tags:
        - Disputes
      security:
        - OAuth:
            - disputes
            - disputes:view
        # - ApiKey: []
      summary: Get dispute evidence
      operationId: getDisputeEvidence
      description: >
        Retrieves a list of the evidence submitted in response to a specific
        dispute.
      parameters:
        - in: path
          name: dispute_id
          schema:
            type: string
            pattern: '^(dsp)_(\w{26})$'
          required: true
          description: The dispute identifier.
      responses:
        '200':
          description: Dispute evidence retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Evidence'
        '401':
          description: Unauthorized
        '404':
          description: Dispute not found
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Disputes;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Disputes)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    DisputeEvidenceResponse response = await api.DisputesClient().GetEvidence(\"disputes_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Disputes}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Disputes.GetEvidence(\"dispute_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.disputes.DisputeEvidenceResponse;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.DISPUTES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    DisputeEvidenceResponse response = api.disputesClient().getEvidence(\"dispute_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const getEvidence = await cko.disputes.getEvidence('dsp_bc94ebda8d275i461229');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Disputes])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getDisputesClient()->getEvidence(\"dispute_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_VIEW]) \n    .build()\n)\n\ntry:\n    response = api.disputes.get_evidence('dispute_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    post:
      tags:
        - Disputes
      security:
        - OAuth:
            - disputes
            - disputes:provide-evidence
        # - ApiKey: []
      summary: Submit dispute evidence
      operationId: submitDisputeEvidence
      description: >-
        With this final request, you can submit the evidence that you have
        previously provided. Make sure you have provided all the relevant
        information before using this request. You will not be able to amend your
        evidence once you have submitted it.
      parameters:
        - in: path
          name: dispute_id
          schema:
            type: string
            pattern: '^(dsp)_(\w{26})$'
          required: true
          description: The dispute identifier.
      responses:
        '204':
          description: Dispute evidence submitted successfully
        '401':
          description: Unauthorized
        '404':
          description: Dispute not found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                properties:
                  request_id:
                    type: string
                    description: The request identifier.
                  error_type:
                    type: string
                    description: The error type.
                  error_codes:
                    type: array
                    items:
                      type: string
                    description: >
                      The error codes returned from the validation. Each error code indicates the transaction with the problem.
                        * `two_core_properties_in_historical_transactions_required` - When using compelling evidence you need to provide at least two of the following properties: `ip_address`, `device_id`, `shipping_address` or `user_id`.
                        * `two_historical_transactions_required` - When using compelling evidence you need to provide at least two historical transactions.
                        * `ip_address_and_device_id_is_required` - When using compelling evidence you need to provide `ip_address` or `device_id`.
                        * `historical_transactions_should_be_different` - When using compelling evidence you need to provide different historical transactions.
                        * `historical_transaction_{transaction_index}_fraud_report` - The ARN provided has a fraud report related.
                        * `historical_transaction_{transaction_index}_active_dispute` - The ARN provided has an active dispute related.
                        * `historical_transaction_{transaction_index}_fraud_dispute` - The ARN provided has a fraud dispute related.
                        * `historical_transaction_{transaction_index}_not_found` - The ARN provided was not found.
                        * `historical_transaction_{transaction_index}_age_invalid` - The historical transaction must be between 120 and 365 days.
                        * `historical_transaction_{transaction_index}_bin_and_caid_not_exact_match` - The BIN and CAID from the transaction provided does not match with the disputed transaction.
                        * `historical_transaction_{transaction_index}_billing_descriptor_does_not_match` - The billing descriptor from the transaction provided does not match with the disputed transaction.
                        * `historical_transaction_{transaction_index}_card_does_not_match` - The card from the transaction provided does not match with the disputed transaction.
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Disputes)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    EmptyResponse response = await api.DisputesClient().SubmitEvidence(\"disputes_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Disputes}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Disputes.SubmitEvidence(\"dispute_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.DISPUTES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    EmptyResponse response = api.disputesClient().submitEvidence(\"dispute_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const submitEvidence = await cko.disputes.submit('dsp_bc94ebda8d275i461229');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Disputes])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getDisputesClient()->submitEvidence(\"dispute_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_VIEW]) \n    .build()\n)\n\ntry:\n    response = api.disputes.submit_evidence('dispute_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /disputes/{dispute_id}/evidence/arbitration:
    post:
      tags:
        - Disputes
      security:
        - OAuth:
            - disputes
            - disputes:provide-evidence
        # - ApiKey: []
      summary: Submit dispute arbitration evidence
      operationId: submitDisputeArbitrationEvidence
      description: |
        Submits the previously provided arbitration evidence to the scheme.
        
        You cannot amend evidence after you submit with this endpoint. Ensure you have provided all of the required information.
      parameters:
        - in: path
          name: dispute_id
          schema:
            type: string
            pattern: '^(dsp)_(\w{26})$'
          required: true
          description: The dispute identifier.
      responses:
        '204':
          description: Dispute arbitration evidence submitted successfully
        '401':
          description: Unauthorized
        '404':
          description: Dispute not found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                properties:
                  request_id:
                    type: string
                    description: The request identifier.
                  error_type:
                    type: string
                    description: The error type.
                  error_codes:
                    type: array
                    items:
                      type: string
                    description: >
                      The error codes returned from the validation.
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Disputes)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    EmptyResponse response = await api.DisputesClient().SubmitArbitrationEvidence(\"disputes_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Disputes}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Disputes.SubmitArbitrationEvidence(\"dispute_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.DISPUTES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    EmptyResponse response = api.disputesClient().submitArbitrationEvidence(\"dispute_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const submitEvidence = await cko.disputes.submitArbitration('dsp_bc94ebda8d275i461229');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Disputes])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getDisputesClient()->submitArbitrationEvidence(\"dispute_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder()\n    .oauth()\n    .client_credentials('client_id', 'client_secret')\n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.DISPUTES, OAuthScopes.DISPUTES_VIEW])\n    .build()\n)\n\ntry:\n    response = api.disputes.submit_arbitration_evidence('dispute_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /disputes/{dispute_id}/evidence/arbitration/submitted:
    get:
      security:
        - OAuth:
            - disputes
            - disputes:view
        - ApiSecretKey: [ ]
      tags:
        - Disputes
      summary: Get dispute submitted arbitration evidence
      operationId: getDisputeSubmittedArbitrationEvidence
      description: |
        Retrieves the unique identifier of the PDF file containing all of the evidence submitted to escalate the dispute to arbitration.
        
        To retrieve the file's download link, call the `GET /files/{file_id}` [endpoint](https://api-reference.checkout.com/#operation/getFileInformation) with the returned file ID.
    
      parameters:
        - in: path
          name: dispute_id
          schema:
            type: string
            pattern: "^(dsp)_(\\w{22,26})$"
          required: true
          description: The dispute identifier.
      responses:
        '200':
          description: Dispute retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmittedEvidenceResponse'
        '403':
          description: Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal error
  /disputes/{dispute_id}/evidence/submitted:
    get:
      security:
        - OAuth:
            - disputes
            - disputes:view
        - ApiSecretKey: [ ]
      tags:
        - Disputes
      summary: Get dispute submitted evidence
      operationId: getDisputeSubmittedEvidence
      description: |
        Retrieves the unique identifier of the PDF file containing all the evidence submitted to represent the dispute case.
        
        To retrieve the file's download link, call the `GET /files/{file_id}` [endpoint](https://api-reference.checkout.com/#operation/getFileInformation) with the returned file ID.
        
        Evidence submitted before February 2024 cannot be retrieved using this endpoint.
      parameters:
        - in: path
          name: dispute_id
          schema:
            type: string
            pattern: "^(dsp)_(\\w{22,26})$"
          required: true
          description: The dispute identifier.
      responses:
        '200':
          description: Dispute retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmittedEvidenceResponse'
        '403':
          description: Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal error
  /disputes/{dispute_id}/schemefiles:
    get:
      security:
        - OAuth:
            - disputes
            - disputes:scheme-files
        - ApiSecretKey: [ ]
      tags:
        - Disputes
      summary: Get dispute scheme files
      operationId: getDisputeSchemeFiles
      description: |
        Returns all of the scheme files of a dispute using the dispute identifier. Currently available only for VISA disputes.
      parameters:
        - in: path
          name: dispute_id
          schema:
            type: string
            pattern: "^(dsp)_(\\w{22,26})$"
          required: true
          description: The dispute identifier
      responses:
        '200':
          description: Dispute retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemeFileResponse'
        '401':
          description: Unauthorized
        '404':
          description: Dispute not found
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Disputes}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Disputes.GetDisputeSchemeFiles(\"dispute_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /entities/{entityId}/files:
    parameters:
      - in: path
        name: entityId
        description: The ID of the sub-entity
    
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
    
    post:
      servers:
        - url: https://files.checkout.com
          description: Production environment
        - url: https://files.sandbox.checkout.com
          description: Sandbox environment
      tags:
        - Platforms
      security:
        - OAuth:
            - files
        - ApiSecretKey: []
      summary: Upload a file
      operationId: uploadAFile
      description: |
        Our Platforms solution provides an easy way to upload documentation required for full due diligence.
    
        Use this endpoint to generate a file upload link, which you can then upload a file to using a data-binary type request.
    
        See the <a href="https://checkout.com/docs/platforms/onboarding/api/full/upload-a-file" target="_blank">documentation</a> for more information.
    
        Please note that the sub-domain – https://files.checkout.com – is slightly different to Checkout.com's other endpoints. See the <a href="https://checkout.com/docs/platforms/onboarding/api/full/upload-a-file" target="_blank">documentation</a> for more information.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformsFileUpload'
      responses:
        '200':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformsFileUploadResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable
        '429':
          description: Too many requests
  /entities/{entityId}/files/{fileId}:
    parameters:
      - in: path
        name: entityId
        description: The ID of the sub-entity
    
        required: true
        allowEmptyValue: false
        example: ent_w4jelhppmfiufdnatam37wrfc4
        style: simple
        schema:
          type: string
    
      - in: path
        name: fileId
        description: The ID of the file. The value is always prefixed with `file_`.
    
        required: true
        allowEmptyValue: false
        example: file_w4jelhppkaskd0dnatam37wrfc4
        style: simple
        schema:
          type: string
    
    get:
      servers:
        - url: https://files.checkout.com
          description: Production environment
        - url: https://files.sandbox.checkout.com
          description: Sandbox environment
      tags:
        - Platforms
      security:
        - OAuth:
            - files
            - files:retrieve
        - ApiSecretKey: []
      summary: Retrieve a file
      operationId: retrieveAFile
      description: |
        Retrieve information about a previously uploaded file.
    
        Please note that the sub-domain – https://files.checkout.com – is slightly different to Checkout.com's other endpoints. See the <a href="https://checkout.com/docs/platforms/onboarding/api/full/upload-a-file" target="_blank">documentation</a> for more information.
      responses:
        '200':
          description: OK
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformsFileRetrieveResponse'
        '404':
          description: File not found
        '401':
          description: Unauthorized
  /face-authentications:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Face Authentication
      summary: Create a face authentication
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create a [face authentication](https://www.checkout.com/docs/business-operations/manage-identities/authenticate-with-biometrics) for an applicant you've previously verified using the [Identity Verification](https://www.checkout.com/docs/business-operations/verify-an-identity/identity-verification) solution.
    
        Ensure you use your Face Authentication [configuration ID](https://www.checkout.com/docs/business-operations/manage-identities/authenticate-with-biometrics#Configuration). 
      operationId: create_face_authentication
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      requestBody:
        required: true
        content:
          application/json:
            examples:
              face_authentication_creation_request_body:
                $ref: '#/components/examples/fav_face_authentication_creation_request_body'
            schema:
              $ref: '#/components/schemas/FavFaceAuthentication'
      responses:
        '201':
          description: Face authentication created successfully 
          content:
            application/json:
              examples:
                face_authentication_creation_response_body:
                  $ref: '#/components/examples/fav_face_authentication_creation_response_body'
              schema:
                required:
                  - user_journey_id
                allOf:
                  - $ref: '#/components/schemas/FavFaceAuthenticationOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                face_authentication_creation_request_invalid_body:
                  $ref: '#/components/examples/fav_face_authentication_creation_request_invalid_body'
              schema:
                $ref: '#/components/schemas/FavFaceAuthenticationError'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                face_authentication_unprocessable_entity_body:
                  $ref: '#/components/examples/fav_face_authentication_unprocessable_entity_body'
              schema:
                $ref: '#/components/schemas/FavFaceAuthenticationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /face-authentications/{face_authentication_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Face Authentication
      summary: Get a face authentication
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of a [face authentication](https://www.checkout.com/docs/business-operations/manage-identities/authenticate-with-biometrics).
      operationId: retrieve_face_authentication
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: face_authentication_id
          required: true
          in: path
          description: The face authentication's unique identifier.
          schema:
            $ref: '#/components/schemas/FavFaceAuthenticationId'
      responses:
        '200':
          description: Face authentication retrieved successfully
          content:
            application/json:
              examples:
                Approved Identity Verification Response Body:
                  $ref: '#/components/examples/fav_face_authentication_response_body_approved'
                Declined Identity Verification Response Body:
                  $ref: '#/components/examples/fav_face_authentication_response_body_declined'
              schema:
                required:
                  - user_journey_id
                allOf:
                  - $ref: '#/components/schemas/FavFaceAuthenticationOutput'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /face-authentications/{face_authentication_id}/anonymize:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Face Authentication
      summary: Anonymize a face authentication
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Remove the personal data in a [face authentication](https://www.checkout.com/docs/business-operations/manage-identities/authenticate-with-biometrics).
      operationId: anonymize_face_authentication
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: face_authentication_id
          in: path
          description: The face authentication's unique identifier.
          required: true      
          example: fav_mtta050yudd54y5iqb5ijh8jtvz
          schema:
            pattern: ^fav_\w+$
            type: string
      responses:
        '200':
          description: Personal data removed successfully
          content:
            application/json:
              examples:
                face_authentication_response_body_anonymized:
                  $ref: '#/components/examples/fav_face_authentication_response_body_anonymized'
              schema:
                required:
                  - user_journey_id
                allOf:
                  - $ref: '#/components/schemas/FavFaceAuthenticationOutput'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                fav_face_authentication_unprocessable_entity_body:
                  $ref: '#/components/examples/fav_face_authentication_unprocessable_entity_body'
              schema:
                $ref: '#/components/schemas/FavFaceAuthenticationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /face-authentications/{face_authentication_id}/attempts:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Face Authentication
      summary: Create a face authentication attempt
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create an attempt for a [face authentication](https://www.checkout.com/docs/business-operations/manage-identities/authenticate-with-biometrics).
        
        If you've already created an attempt for this authentication, the [authentication status](https://www.checkout.com/docs/developer-resources/codes/identity-verification-codes#Face_Authentication_statuses) must be one of the following:
        
        - `created`
        - `pending`
        - `capture_in_progress`
        - `retry_required`
    
        If you create a new attempt while the status is any other value, you receive a `409 Conflict` response.
      operationId: create_fav_attempt
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: face_authentication_id
          in: path
          description: The face authentication's unique identifier.
          required: true
          example: fav_mtta050yudd54y5iqb5ijh8jtvz
          schema:
            type: string
            pattern: ^fav_\w+$
      requestBody:
        content:
          application/json:
            examples:
              Minimal body:
                $ref: "#/components/examples/fav_attempt_creation_request_body_min"
              All possible data:
                $ref: "#/components/examples/fav_attempt_creation_request_body_max"
            schema:
              $ref: "#/components/schemas/FavAttemptRequest"
      responses:
        "201":
          description: Face authentication attempt created successfully
          content:
            application/json:
              examples:
                identity_verification_creation_response_body:
                  $ref: "#/components/examples/fav_attempt_creation_response_body"
              schema:
                allOf:
                  - $ref: "#/components/schemas/FavAttemptResponse"
        "404":
          description: Not Found
        "409":
          description: Conflict
        "500":
          description: Internal Server Error
    
    get:
      tags:
        - Face Authentication
      summary: Get face authentication attempts
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of all attempts for a specific [face authentication](https://www.checkout.com/docs/business-operations/manage-identities/authenticate-with-biometrics).
      operationId: list_fav_attempts
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: face_authentication_id
          in: path
          description: The face authentication's unique identifier.
          required: true
          example: fav_mtta050yudd54y5iqb5ijh8jtvz
          schema:
            type: string
            pattern: ^fav_\w+$
      responses:
        "200":
          description: Face authentication attempts retrieved successfully
          content:
            application/json:
              examples:
                face_authentication_list_response_body:
                  $ref: "#/components/examples/fav_attempt_list_response_body"
              schema:
                allOf:
                  - $ref: "#/components/schemas/FavAttemptResponseList"
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
    
  /face-authentications/{face_authentication_id}/attempts/{attempt_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Face Authentication
      summary: Get a face authentication attempt
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of a specific attempt for a [face authentication](https://www.checkout.com/docs/business-operations/manage-identities/authenticate-with-biometrics).
      operationId: get_fav_attempt
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: face_authentication_id
          in: path
          description: The face authentication's unique identifier.
          required: true      
          example: fav_mtta050yudd54y5iqb5ijh8jtvz
          schema:
            type: string
            pattern: ^fav_\w+$
        - name: attempt_id
          in: path
          description: The attempt's unique identifier.
          required: true
          example: fatp_nk1wbmmczqumwt95k3v39mhbh2w
          schema:
            type: string
            pattern: ^fatp_\w+$
      responses:
        "200":
          description: Face authentication attempt retrieved successfully
          content:
            application/json:
              examples:
                face_authentication_list_response_body:
                  $ref: "#/components/examples/fav_attempt_get_response_body"
              schema:
                allOf:
                  - $ref: "#/components/schemas/FavAttemptResponse"
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
  /face-authentications/{face_authentication_id}/attempts/{attempt_id}/assets:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Face Authentication
      summary: Get face authentication attempt assets
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the assets (face images and videos) captured during a [face authentication](https://www.checkout.com/docs/business-operations/manage-identities/authenticate-with-biometrics) attempt.
    
        Videos are not exposed by default. Contact your account manager to enable this feature.
    
        Results are paginated. Use the `skip` and `limit` query parameters to navigate through pages.
      operationId: get_face_authentication_attempt_assets
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: face_authentication_id
          in: path
          description: The face authentication's unique identifier.
          required: true
          example: fav_mtta050yudd54y5iqb5ijh8jtvz
          schema:
            type: string
            pattern: ^fav_\w+$
        - name: attempt_id
          in: path
          description: The attempt's unique identifier.
          required: true
          example: fatp_nk1wbmmczqumwt95k3v39mhbh2w
          schema:
            type: string
            pattern: ^fatp_\w+$
        - name: skip
          in: query
          description: The number of assets to skip.
          required: false
          schema:
            type: integer
            default: 0
        - name: limit
          in: query
          description: The maximum number of assets to return.
          required: false
          schema:
            type: integer
            default: 10
      responses:
        "200":
          description: Face authentication attempt assets retrieved successfully
          content:
            application/json:
              examples:
                fav_attempt_assets_response_body:
                  $ref: "#/components/examples/fav_attempt_assets_response_body"
              schema:
                $ref: "#/components/schemas/FavAttemptAssets"
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
  /files:
    post:
      tags:
        - Disputes
      security:
        - OAuth:
            - disputes
            - disputes:provide-evidence
        - ApiSecretKey: [ ]
      summary: Upload file
      operationId: uploadFile
      description: >-
        Upload a file to use as evidence in a dispute. Your file must be in either
        JPEG/JPG, PNG or PDF format, and be no larger than 4MB.
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/File'
      responses:
        '201':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUploadResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable
        '429':
          description: Too many requests
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Disputes)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    IdResponse response = await api.DisputesClient().SubmitFile(\"file_path\", \"dispute_evidence\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Files}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := common.File{\n	File:    \"evidence.pdf\",\n	Purpose: common.DisputesEvidence,\n}\n\nresponse, err := api.Disputes.UploadFile(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.FilePurpose;\nimport com.checkout.common.FileRequest;\nimport com.checkout.common.IdResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FILES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nFile file = new File(\"evidence.pdf\");\nFileRequest fileRequest = FileRequest.builder()\n    .file(file)\n    .contentType(ContentType.create(\"application/pdf\"))\n    .purpose(FilePurpose.DISPUTE_EVIDENCE)\n    .build();\n\ntry {\n    IdResponse response = api.disputesClient().uploadFile(fileRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const file = await cko.files.upload({\n		path: fs.createReadStream('./test/files/evidence.jpg'),\n		purpose: 'dispute_evidence',\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\Files\\FileRequest;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Disputes])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$fileRequest = new FileRequest();\n$fileRequest->file = \"path/to/file\";\n$fileRequest->purpose = \"dispute_evidence\";\n\ntry {\n    $response = $api->getDisputesClient()->uploadFile($fileRequest);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.files.files import FileRequest\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FILES, OAuthScopes.FILES_UPLOAD]) \n    .build()\n)\n\nrequest = FileRequest()\nrequest.file = 'path/to/file'\nrequest.purpose = 'dispute_evidence'\n\ntry:\n    response = api.disputes.upload_file(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /files/{file_id}:
    get:
      tags:
        - Disputes
      security:
        - OAuth:
            - disputes
            - disputes:view
        - ApiSecretKey: [ ]
      summary: Get file information
      operationId: getFileInformation
      description: Retrieve information about a file that was previously uploaded.
      parameters:
        - in: path
          name: file_id
          schema:
            type: string
          required: true
          description: The file identifier. It is always prefixed by `file_`.
      responses:
        '200':
          description: File information retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileResult'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: File not found
        '429':
          description: Too many requests or duplicate request detected
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Files;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Disputes)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    FileDetailsResponse response = await api.DisputesClient().GetFileDetails(\"file_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Files}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Disputes.GetFileDetails(\"file_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.FileDetailsResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FILES) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    FileDetailsResponse response = api.disputesClient().getFileDetails(\"file_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const getFile = await cko.files.getFile('file_zna32sccqbwevd3ldmejtplbhu');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Disputes])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getDisputesClient()->getFileDetails(\"file_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FILES]) \n    .build()\n)\n\ntry:\n    response = api.disputes.get_file_details(\"file_id\")\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /financial-actions:
    get:
      tags:
        - Financial actions
      security:
        - OAuth:
            - financial-actions
            - financial-actions:view
        - ApiSecretKey: [ ]
      summary: Get financial actions
      operationId: getFinancialActions
      description: |
        Returns the list of financial actions and their details.
      x-codeSamples:
        - lang: 'cURL'
          label: 'curl'
          source: |
            curl -i -X GET \
            'https://{prefix}.api.sandbox.checkout.com/financial-actions?payment_id=pay_qqufsd3rfnqufngwklghlxrzpm&limit=5' \
            -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
        - lang: 'Java'
          label: 'Java'
          source: |
            import java.net.*;
            import java.net.http.*;
            import java.util.*;
            import java.nio.charset.StandardCharsets;
            import java.util.stream.Collectors;
    
            public class App {
              public static void main(String[] args) throws Exception {
                var httpClient = HttpClient.newBuilder().build();
    
                HashMap<String, String> params = new HashMap<>();
                params.put("payment_id", "pay_qqufsd3rfnqufngwklghlxrzpm");
                params.put("limit", "5");
    
                var query = params.keySet().stream()
                  .map(key -> key + "=" + URLEncoder.encode(params.get(key), StandardCharsets.UTF_8))
                  .collect(Collectors.joining("&"));
    
                var host = "https://{prefix}.api.sandbox.checkout.com";
                var pathname = "/financial-actions";
                var request = HttpRequest.newBuilder()
                  .GET()
                  .uri(URI.create(host + pathname + '?' + query))
                  .header("Authorization", "Bearer <YOUR_TOKEN_HERE>")
                  .build();
    
                var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
    
                System.out.println(response.body());
              }
            }
        - lang: 'C#'
          label: 'C#'
          source: |
            using System;
            using System.Net.Http;
            using System.Threading.Tasks;
    
            public class Program
            {
              private readonly IHttpClientFactory _httpClientFactory;
              public static async Task Main(string[] args)
              {
                var client = _httpClientFactory.CreateClient();
                client.DefaultRequestHeaders.Add("Authorization", "Bearer <YOUR_TOKEN_HERE>");
                var request = await client.GetAsync("https://{prefix}.api.sandbox.checkout.com/financial-actions?payment_id=pay_qqufsd3rfnqufngwklghlxrzpm&limit=5");
                var response = await request.Content.ReadAsStringAsync();
    
                Console.WriteLine(response);
              }
            }
        - lang: 'Python'
          label: 'Python'
          source: |
            import requests
    
            url = "https://{prefix}.api.sandbox.checkout.com/financial-actions"
    
            query = {
              "payment_id": "pay_qqufsd3rfnqufngwklghlxrzpm",
              "limit": "5"
            }
    
            headers = {"Authorization": "Bearer <YOUR_TOKEN_HERE>"}
    
            response = requests.get(url, headers=headers, params=query)
    
            data = response.json()
            print(data)
      parameters:
        - name: payment_id
          in: query
          description: The ID of the payment you want to retrieve financial actions for. Required if `action_id` is not used.
          schema:
            type: string
            example: pay_qqufsd3rfnqufngwklghlxrzpm
        - name: action_id
          in: query
          description: The ID of the action you want to retrieve financial actions for. Required if `payment_id` is not used.
          schema:
            type: string
            example: act_wsnyzbzmr2huxcekoj7qqhxwuy
        - name: limit
          in: query
          description: The number of results to retrieve per page. </br> For example, if the total result count is 50, and you use `limit=10`, you will need to iterate over 5 pages containing 10 results each to retrieve all of the reports that match your query.
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100
            default: 100
            example: 5
        - name: pagination_token
          in: query
          description: A token used for pagination when a response contains results across multiple pages.
          schema:
            type: string
      responses:
        '200':
          description: Financial actions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinancialActionListResponse'
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
        '401':
          description: Unauthorized. Likely cause is that access token is not valid or was not specified.
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinancialActionErrorResponse'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/FinancialActionErrorResponse'
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/financial\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.FinancialActions}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nquery := financial.QueryFilter{\n	PaymentId: \"payment_id\",\n	ActionId:  \"action_id\",\n	Limit:     20,\n}\n\nresponse, err := api.Financial.GetFinancialActions(query)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /workflows:
    get:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Get all workflows
      operationId: getAllWorkflows
      description: |
        Get all workflows
      responses:
        '200':
          description: Workflows retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-all-workflows-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '500':
          description: Internal Error
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    GetWorkflowsResponse response = await api.WorkflowsClient().GetWorkflows();\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.GetWorkflows()\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.GetWorkflowsResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    GetWorkflowsResponse response = api.workflowsClient().getWorkflows().get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.getAll();\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->getWorkflows();\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.get_workflows()\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    post:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Add a workflow
      operationId: addWorkflow
      description: |
        Add a new workflow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-workflow-request'
      responses:
        '201':
          description: Workflow added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-workflow-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows;\nusing Checkout.Workflows.Actions;\nusing Checkout.Workflows.Actions.Request;\nusing Checkout.Workflows.Conditions.Request;\n\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nCreateWorkflowRequest request = new CreateWorkflowRequest\n{\n    Name = \"Webhooks workflow\",\n    Conditions = new List<WorkflowConditionRequest>\n    {\n        new EventWorkflowConditionRequest\n        {\n            Events = new Dictionary<string, ISet<string>>\n            {\n                {\n                    \"gateway\",\n                    new HashSet<string>\n                    {\n                        \"payment_approved\",\n                        \"payment_declined\",\n                        \"card_verification_declined\",\n                        \"card_verified\",\n                        \"payment_authorization_incremented\",\n                        \"payment_authorization_increment_declined\",\n                        \"payment_capture_declined\",\n                        \"payment_captured\",\n                        \"payment_refund_declined\",\n                        \"payment_refunded\",\n                        \"payment_void_declined\",\n                        \"payment_voided\"\n                    }\n                },\n                {\n                    \"dispute\",\n                    new HashSet<string>\n                    {\n                        \"dispute_canceled\",\n                        \"dispute_evidence_required\",\n                        \"dispute_expired\",\n                        \"dispute_lost\",\n                        \"dispute_resolved\",\n                        \"dispute_won\"\n                    }\n                }\n            }\n        },\n        new EntityWorkflowConditionRequest\n        {\n            Entities = new List<string>\n            {\n                \"ent_xyfdshfudosfdshfdiosfds\", \"ent_fidjosfjdisofdjsifdosfu\"\n            }\n        },\n        new ProcessingChannelWorkflowConditionRequest\n        {\n            ProcessingChannels = new List<string> {\"pc_axclravnqf5u5ejkweijnp5zc4\"}\n        }\n    },\n    Actions = new List<WorkflowActionRequest>\n    {\n        new WebhookWorkflowActionRequest\n        {\n            Url = \"https://example.com/webhooks\",\n            Headers = new Dictionary<string, string>\n            {\n                {\"Authorization\", \"70ed20ff-ba31-4ea3-b3ef-772f2be1cbdf\"}\n            },\n            Signature = new WebhookSignature\n            {\n                Method = \"HMACSHA256\", Key = \"8V8x0dLK%AyD*DNS8JJr\"\n            }\n        }\n    }\n};\n\ntry\n{\n    CreateWorkflowResponse response = await api.WorkflowsClient().CreateWorkflow(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/workflows\"\n	\"github.com/checkout/checkout-sdk-go/workflows/actions\"\n	\"github.com/checkout/checkout-sdk-go/workflows/conditions\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nentityCondition := conditions.NewEntityConditionRequest()\nentityCondition.Entities = []string{\"workflow_entity_id\"}\n\nprocessingChannelCondition := conditions.NewProcessingChannelConditionRequest()\nprocessingChannelCondition.ProcessingChannels = []string{\"processing_channel_id\"}\n\nwebhookAction := actions.NewWebhookActionRequest()\nwebhookAction.Url = \"https://docs.checkout.com/webhook\"\nwebhookAction.Headers = map[string]string{}\nwebhookAction.Signature = &actions.WebhookSignature{\n	Key:    \"8V8x0dLK%*DNS8JJr\",\n	Method: \"HMACSHA256\",\n}\n\nrequest := workflows.CreateWorkflowRequest{\n	Name:       \"name\",\n	Conditions: []conditions.ConditionsRequest{entityCondition, processingChannelCondition},\n	Actions:    []actions.ActionsRequest{webhookAction},\n}\n\nresponse, err := api.WorkFlows.CreateWorkflow(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.CreateWorkflowRequest;\nimport com.checkout.workflows.CreateWorkflowResponse;\nimport com.checkout.workflows.actions.WebhookSignature;\nimport com.checkout.workflows.actions.request.WebhookWorkflowActionRequest;\nimport com.checkout.workflows.conditions.request.EntityWorkflowConditionRequest;\nimport com.checkout.workflows.conditions.request.ProcessingChannelWorkflowConditionRequest;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nWebhookWorkflowActionRequest workflowActionRequest = WebhookWorkflowActionRequest.builder()\n    .url(\"https://docs.checkout.com/webhook\")\n    .headers(new HashMap<>())\n    .signature(WebhookSignature.builder().key(\"8V8x0dLK%AyD*DNS8JJr\").method(\"HMACSHA256\").build())\n    .build();\n\nEntityWorkflowConditionRequest condition1 = EntityWorkflowConditionRequest.builder()\n    .entities(Collections.singletonList(\"workflow_entity_id\"))\n    .build();\n\nProcessingChannelWorkflowConditionRequest condition2 = ProcessingChannelWorkflowConditionRequest.builder()\n    .processingChannels(Collections.singletonList(\"processing_channel_id\"))\n    .build();\n\nCreateWorkflowRequest request = CreateWorkflowRequest.builder()\n    .name(\"name\")\n    .actions(Collections.singletonList(workflowActionRequest))\n    .conditions(Arrays.asList(condition1, condition2))\n    .build();\n\ntry {\n    CreateWorkflowResponse response = api.workflowsClient().createWorkflow(request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.add({\n		name: 'Webhooks workflow',\n		conditions: [\n			{\n				type: 'event',\n				events: {\n					gateway: ['payment_approved', 'payment_declined'],\n				},\n			},\n			{\n				type: 'entity',\n				entities: ['ent_djigcqx4clmufo2sasgomgpqsq'],\n			},\n			{\n				type: 'processing_channel',\n				processing_channels: ['pc_zs5fqhybzc2e3jmq3efvybybpq'],\n			},\n		],\n		actions: [\n			{\n				type: 'webhook',\n				url: 'https://example.com/webhooks',\n				headers: {\n					Authorization: '70ed20ff-ba31-4ea3-b3ef-772f2be1cbdf',\n				},\n				signature: {\n					method: 'HMACSHA256',\n					key: '8V8x0dLK%AyD*DNS8JJr',\n				},\n			},\n		],\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Workflows\\Actions\\WebhookSignature;\nuse Checkout\\Workflows\\Actions\\WebhookWorkflowActionRequest;\nuse Checkout\\Workflows\\Conditions\\EntityWorkflowConditionRequest;\nuse Checkout\\Workflows\\Conditions\\EventWorkflowConditionRequest;\nuse Checkout\\Workflows\\Conditions\\ProcessingChannelWorkflowConditionRequest;\nuse Checkout\\Workflows\\CreateWorkflowRequest;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$signature = new WebhookSignature();\n$signature->key = \"8V8x0dLK%AyD*DNS8JJr\";\n$signature->method = \"HMACSHA256\";\n\n$actionRequest = new WebhookWorkflowActionRequest();\n$actionRequest->url = \"https://google.com/fail\";\n$actionRequest->signature = $signature;\n\n$entityWorkflowConditionRequest = new EntityWorkflowConditionRequest();\n$entityWorkflowConditionRequest->entities = [\"entity_id\"];\n\n$eventWorkflowConditionRequest = new EventWorkflowConditionRequest();\n$eventWorkflowConditionRequest->events = [\n    \"gateway\" => [\"payment_approved\",\n        \"payment_declined\",\n        \"card_verification_declined\",\n        \"card_verified\",\n        \"payment_authorization_incremented\",\n        \"payment_authorization_increment_declined\",\n        \"payment_capture_declined\",\n        \"payment_captured\",\n        \"payment_refund_declined\",\n        \"payment_refunded\",\n        \"payment_void_declined\",\n        \"payment_voided\"],\n    \"dispute\" => [\"dispute_canceled\",\n        \"dispute_evidence_required\",\n        \"dispute_expired\",\n        \"dispute_lost\",\n        \"dispute_resolved\",\n        \"dispute_won\"]\n];\n\n$processingChannelWorkflowConditionRequest = new ProcessingChannelWorkflowConditionRequest();\n$processingChannelWorkflowConditionRequest->processing_channels = [\"pc_sdsdsdwdewdsdds\"];\n\n$request = new CreateWorkflowRequest();\n$request->actions = [$actionRequest];\n$request->conditions = [$entityWorkflowConditionRequest, $eventWorkflowConditionRequest,\n    $processingChannelWorkflowConditionRequest];\n$request->name = \"Workflow\";\n$request->active = true;\n\ntry {\n    $response = $api->getWorkflowsClient()->createWorkflow($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.workflows.workflows import WebhookSignature, WebhookWorkflowActionRequest, EntityWorkflowConditionRequest, \n                                        EventWorkflowConditionRequest, ProcessingChannelWorkflowConditionRequest, CreateWorkflowRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\nsignature = WebhookSignature()\nsignature.key = 'signature'\nsignature.method = 'HMACSHA256'\n\naction_request = WebhookWorkflowActionRequest()\naction_request.url = 'https://docs.checkout.com/fail'\naction_request.headers = {}\naction_request.signature = signature\n\nentity_condition_request = EntityWorkflowConditionRequest()\nentity_condition_request.entities = ['entity_id']\n\nevent_condition_request = EventWorkflowConditionRequest()\nevent_condition_request.events = {'gateway': ['payment_approved',\n                                              'payment_declined',\n                                              'card_verification_declined',\n                                              'card_verified',\n                                              'payment_authorization_incremented',\n                                              'payment_authorization_increment_declined',\n                                              'payment_capture_declined',\n                                              'payment_captured',\n                                              'payment_refund_declined',\n                                              'payment_refunded',\n                                              'payment_void_declined',\n                                              'payment_voided'],\n                                  'dispute': ['dispute_canceled',\n                                              'dispute_evidence_required',\n                                              'dispute_expired',\n                                              'dispute_lost',\n                                              'dispute_resolved',\n                                              'dispute_won']}\n\nprocessing_channel_condition_request = ProcessingChannelWorkflowConditionRequest()\nprocessing_channel_condition_request.processing_channels = ['processing_channel_id']\n\nrequest = CreateWorkflowRequest()\nrequest.actions = [action_request]\nrequest.conditions = [entity_condition_request, event_condition_request,\n                      processing_channel_condition_request]\nrequest.name = 'Name'\nrequest.active = True\n\ntry:\n    response = api.workflows.create_workflow(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/{workflowId}:
    get:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Get a workflow
      operationId: getWorkflow
      description: |
        Get the details of a workflow
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z0-9]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
      responses:
        '200':
          description: Workflow retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-workflow-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Workflow not found
        '500':
          description: Internal Error
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    GetWorkflowResponse response = await api.WorkflowsClient().GetWorkflow(\"workflow_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.GetWorkflow(\"workflow_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.GetWorkflowResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    GetWorkflowResponse response = api.workflowsClient().getWorkflow(\"workflow_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.get('wf_5zm7uccsc6bencaujumvutvfem');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->getWorkflow(\"workflow_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.get_workflow('workflow_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    delete:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Remove a workflow
      operationId: removeWorkflow
      description: |
        Removes a workflow so it is no longer being executed.
        Actions of already executed workflows will be still processed.
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z0-9]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
      responses:
        '204':
          description: Workflow removed successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Workflow not found
        '500':
          description: Internal Error
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    EmptyResponse response = await api.WorkflowsClient().RemoveWorkflow(\"workflow_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.RemoveWorkflow(\"workflow_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\n    CheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    EmptyResponse response = api.workflowsClient().removeWorkflow(\"workflow_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.remove('wf_rou7m32mhmyeblg4xebx5pueoi');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->removeWorkflow(\"workflow_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.remove_workflow('workflow_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    patch:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Patch a workflow
      operationId: patchWorkflow
      description: |
        Update a workflow.
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z0-9]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/patch-workflow-request'
      responses:
        '200':
          description: Workflow updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/patch-workflow-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Workflow not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nUpdateWorkflowRequest request = new UpdateWorkflowRequest {Name = \"workflow_name\"};\n\ntry\n{\n    UpdateWorkflowResponse response = await api.WorkflowsClient().UpdateWorkflow(\"workflow_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/workflows\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := workflows.UpdateWorkflowRequest{\n	Name:   \"New Name\",\n	Active: true,\n}\n\nresponse, err := api.WorkFlows.UpdateWorkflow(\"workflow_id\", request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.UpdateWorkflowRequest;\nimport com.checkout.workflows.UpdateWorkflowResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nUpdateWorkflowRequest request = UpdateWorkflowRequest.builder()\n    .name(\"new name\")\n    .build();\n\ntry {\n    UpdateWorkflowResponse response = api.workflowsClient().updateWorkflow(\"workflow_id\", request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.patch('wf_2i7z3lwdoe5uzmomm7yzrytqdy', {\n		name: 'Webhooks workflow updated',\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Workflows\\UpdateWorkflowRequest;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new UpdateWorkflowRequest();\n$request->name = \"workflow_name\";\n\ntry {\n    $response = $api->getWorkflowsClient()->updateWorkflow(\"workflow_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.workflows.workflows import UpdateWorkflowRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\nrequest = UpdateWorkflowRequest()\nrequest.name = 'New name'\nrequest.active = False\n\ntry:\n    response = api.workflows.update_workflow('workflow_id', request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/{workflowId}/actions:
    post:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Add a workflow action
      operationId: addWorkflowAction
      description: |
        Adds a workflow action. Actions determine what the workflow will do when it is triggered.
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z2-7]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-update-workflow-action-request'
      responses:
        '201':
          description: Workflow action added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-workflow-action-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: "#/components/schemas/Cko-Request-Id"
            Cko-Version:
              schema:
                $ref: "#/components/schemas/Cko-Version"
        '401':
          description: Unauthorized
        '404':
          description: Workflow not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
  /workflows/{workflowId}/actions/{workflowActionId}:
    put:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Update a workflow action
      operationId: updateWorkflowAction
      description: |
        Update a workflow action.
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z0-9]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
        - in: path
          name: workflowActionId
          schema:
            type: string
            pattern: ^wfa_[a-z0-9]{26}$
          required: true
          description: The workflow action identifier
          example: wfa_d5estuyxzshubhly2wu3hloehi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-update-workflow-action-request'
      responses:
        '200':
          description: Workflow action updated successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Workflow or workflow action not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Actions;\nusing Checkout.Workflows.Actions.Request;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nWorkflowActionRequest request = new WebhookWorkflowActionRequest\n{\n    Url = \"https://example.com/webhooks/checkout\",\n    Headers = new Dictionary<string, string>\n    {\n        {\"Authorization\", \"70ed20ff-ba31-4ea3-b3ef-772f2be1cbdf\"}\n    },\n    Signature = new WebhookSignature {Method = \"HMACSHA256\", Key = \"public-signing-key\"}\n};\n\ntry\n{\n    await api.WorkflowsClient().UpdateWorkflowAction(\"workflow_id\", \"action_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/workflows/actions\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := actions.NewWebhookActionRequest()\nrequest.Url = \"https://docs.checkout.com/webhook\"\nrequest.Headers = map[string]string{}\nrequest.Signature = &actions.WebhookSignature{\n	Key:    \"8V8x0dLK%*DNS8JJr\",\n	Method: \"HMACSHA256\",\n}\n\nresponse, err := api.WorkFlows.UpdateWorkflowAction(\"workflow_id\", \"action_id\", request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.actions.WebhookSignature;\nimport com.checkout.workflows.actions.request.WebhookWorkflowActionRequest;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nWebhookWorkflowActionRequest request = WebhookWorkflowActionRequest.builder()\n    .signature(WebhookSignature.builder().key(\"8V8x0dLK%AyD*DNS8JJr\").method(\"HMACSHA256\").build())\n    .headers(new HashMap<>())\n    .url(\"https://docs.checkout.com/fail\")\n    .build();\n\ntry {\n    EmptyResponse response = api.workflowsClient().updateWorkflowAction(\"workflow_id\", \"action_id\", request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.updateAction('wf_2i7z3lwdoe5uzmomm7yzrytqdy', 'wfa_5qxwp7stgcqufj63mkr42xyeqi', {\n		type: 'webhook',\n		url: 'https://example.com/updated',\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Workflows\\Actions\\WebhookSignature;\nuse Checkout\\Workflows\\Actions\\WebhookWorkflowActionRequest;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$webhookSignature = new WebhookSignature();\n$webhookSignature->method = \"HMACSHA256\";\n$webhookSignature->key = \"public-signing-key\";\n\n$request = new WebhookWorkflowActionRequest();\n$request->url = \"workflow_name\";\n$request->signature = \"workflow_name\";\n\ntry {\n    $response = $api->getWorkflowsClient()->updateWorkflowAction(\"workflow_id\", \"action_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.workflows.workflows import WebhookSignature, WebhookWorkflowActionRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\nsignature = WebhookSignature()\nsignature.key = '8V8x0dLK%AyD*DNS8JJr'\nsignature.method = 'HMACSHA256'\n\nrequest = WebhookWorkflowActionRequest()\nrequest.url = 'https://docs.checkout.com/fail/fake'\nrequest.signature = signature\n\ntry:\n    response = api.workflows.update_workflow_action('workflow_id', 'action_id', request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    delete:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Remove a workflow action
      operationId: removeWorkflowAction
      description: |
        Removes a workflow action. Actions determine what the workflow will do when it is triggered.
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z2-7]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
        - in: path
          name: workflowActionId
          schema:
            type: string
            pattern: ^wfa_[a-z2-7]{26}$
          required: true
          description: The workflow action identifier
          example: wfa_c7svxlvo2bbuva4f6s3xu4f7wm
      responses:
        '204':
          description: Workflow action removed successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: "#/components/schemas/Cko-Request-Id"
            Cko-Version:
              schema:
                $ref: "#/components/schemas/Cko-Version"
        '401':
          description: Unauthorized
        '404':
          description: Workflow or workflow action not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
  /workflows/{workflowId}/conditions:
    post:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Add a workflow condition
      operationId: addWorkflowCondition
      description: |
        Adds a workflow condition. Conditions determine when the workflow will trigger.
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z2-7]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-update-workflow-condition-request'
      responses:
        '201':
          description: Workflow condition added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-workflow-condition-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: "#/components/schemas/Cko-Request-Id"
            Cko-Version:
              schema:
                $ref: "#/components/schemas/Cko-Version"
        '401':
          description: Unauthorized
        '404':
          description: Workflow not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
  /workflows/{workflowId}/conditions/{workflowConditionId}:
    put:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Update a workflow condition
      operationId: updateWorkflowCondition
      description: |
        Update a workflow condition.
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z0-9]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
        - in: path
          name: workflowConditionId
          schema:
            type: string
            pattern: ^wfc_[a-z0-9]{26}$
          required: true
          description: The workflow condition identifier
          example: wfc_d5estuyxzshubhly2wu3hloehi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-update-workflow-condition-request'
      responses:
        '200':
          description: Workflow condition updated successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Workflow or workflow condition not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Conditions.Request;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nWorkflowConditionRequest request = new EntityWorkflowConditionRequest();\n\ntry\n{\n    EmptyResponse response = await api.WorkflowsClient().UpdateWorkflowCondition(\"workflow_id\", \"condition_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/workflows/conditions\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := conditions.NewEventConditionRequest()\nrequest.Events = map[string][]string{}\n\nresponse, err := api.WorkFlows.UpdateWorkflowCondition(\"workflow_id\", \"condition_id\", request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.conditions.request.EventWorkflowConditionRequest;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nEventWorkflowConditionRequest request = EventWorkflowConditionRequest.builder()\n    .events(new HashMap<>())\n    .build();\n\ntry {\n    EmptyResponse response = api.workflowsClient().updateWorkflowCondition(\"workflow_id\", \"condition_id\", request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.updateCondition(\n		'wf_2i7z3lwdoe5uzmomm7yzrytqdy',\n		'wfc_ybu4t6aruwju5l6ymlc67ya5ne',\n		{\n			type: 'event',\n			events: {\n				gateway: ['card_verification_declined', 'card_verified', 'payment_approved'],\n			},\n		}\n	);\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Workflows\\Conditions\\EntityWorkflowConditionRequest;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new EntityWorkflowConditionRequest();\n\ntry {\n    $response = $api->getWorkflowsClient()->updateWorkflowCondition(\"workflow_id\", \"condition_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.workflows.workflows import EventWorkflowConditionRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\nrequest = EventWorkflowConditionRequest()\nrequest.events = {'gateway': ['card_verified',\n                              'card_verification_declined',\n                              'payment_approved',\n                              'payment_pending',\n                              'payment_declined',\n                              'payment_voided',\n                              'payment_captured',\n                              'payment_refunded'],\n                  'dispute': ['dispute_canceled',\n                              'dispute_evidence_required',\n                              'dispute_expired',\n                              'dispute_lost',\n                              'dispute_resolved',\n                              'dispute_won']}\n\ntry:\n    response = api.workflows.update_workflow_condition('workflow_id', 'condition_id', request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    delete:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Remove a workflow condition
      operationId: removeWorkflowCondition
      description: |
        Removes a workflow condition. Conditions determine when the workflow will trigger.
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z2-7]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
        - in: path
          name: workflowConditionId
          schema:
            type: string
            pattern: ^wfc_[a-z2-7]{26}$
          required: true
          description: The workflow condition identifier
          example: wfc_c7svxlvo2bbuva4f6s3xu4f7wm
      responses:
        '204':
          description: Workflow condition removed successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: "#/components/schemas/Cko-Request-Id"
            Cko-Version:
              schema:
                $ref: "#/components/schemas/Cko-Version"
        '401':
          description: Unauthorized
        '404':
          description: Workflow or workflow condition not found
        '500':
          description: Internal Error
  /workflows/{workflowId}/test:
    servers:
      - url: https://{prefix}.api.sandbox.checkout.com
        description: Sandbox
        variables:
          prefix:
            description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
            default: "{prefix}"
    post:
      security:
        - OAuth:
            - flow
            - flow:workflows
      tags:
        - Workflows
      summary: Test a workflow
      operationId: testWorkflow
      description: >
        Validate a workflow in our Sandbox environment.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/test-workflow-request'
      parameters:
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z2-7]{26}$
          required: true
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
      responses:
        '204':
          description: Workflow test initiated
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Workflow not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_id:
                    type: string
                    example: 0HLHPN8802NUF:00000003
                  error_type:
                    type: string
                    example: request_invalid
                  error_codes:
                    type: array
                    items:
                      type: string
                      example: event_types_invalid
        '500':
          description: Internal Error
  /workflows/event-types:
    get:
      security:
        - OAuth:
            - flow
            - flow:workflows
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Get event types
      operationId: getEventTypes
      description: |
        Get a list of sources and their events for building new workflows
      responses:
        '200':
          description: Event types retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-event-types-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Events;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    ItemsResponse<EventTypesResponse> response = await api.WorkflowsClient().GetEventTypes();\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowWorkflows}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.GetEventTypes()\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.ItemsResponse;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.events.WorkflowEventTypes;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    ItemsResponse<WorkflowEventTypes> response = api.workflowsClient().getEventTypes().get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.getEventTypes();\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->getEventTypes();\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.get_event_types()\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/events/{eventId}:
    get:
      security:
        - OAuth:
            - flow
            - flow:events
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Get an event
      operationId: getWorkflowEvent
      description: |
        Get the details of an event
      parameters:
        - in: path
          name: eventId
          schema:
            type: string
            pattern: ^evt_[a-z0-9]{26}$
          required: true
          description: The event identifier
          example: evt_x5zm2po6kimubhlfitgt2mfwgi
      responses:
        '200':
          description: Event retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-event-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Event not found
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Events;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    GetEventResponse response = await api.WorkflowsClient().GetEvent(\"event_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowEvents}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.GetEvent(\"event_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.events.GetEventResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW_EVENTS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    GetEventResponse response = api.workflowsClient().getEvent(\"event_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.getEvent('evt_hsfxtjwidv6ulah5gdbiqwqnka');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->getEvent(\"event_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_EVENTS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.get_event('event_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/events/{eventId}/actions/{workflowActionId}:
    get:
      security:
        - OAuth:
            - flow
            - flow:events
            - flow:workflows
        - ApiSecretKey: []
      tags:
        - Workflows
      summary: Get action invocations
      operationId: getWorkflowActionInvocations
      description: |
        Get the details of a workflow action executed for the specified event.
      parameters:
        - in: path
          name: eventId
          schema:
            type: string
            pattern: ^evt_[a-z0-9]{26}$
          required: true
          description: The event identifier
          example: evt_x5zm2po6kimubhlfitgt2mfwgi
        - in: path
          name: workflowActionId
          schema:
            type: string
            pattern: ^wfa_[a-z0-9]{26}$
          required: true
          description: The workflow action identifier
          example: wfa_uzkxpffkvpiu5fe3h5ira7sqpa
      responses:
        '200':
          description: Workflow action retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-invocations-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Event not found
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Actions.Response;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    WorkflowActionInvocationsResponse response = await api.WorkflowsClient().GetActionInvocations(\"event_id\", \"action_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowEvents, configuration.FlowWorkflows}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.GetActionInvocations(\"event_id\", \"action_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.actions.response.WorkflowActionInvocationsResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW_EVENTS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    WorkflowActionInvocationsResponse response = api.workflowsClient().getActionInvocations(\"event_id\", \"action_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->getActionInvocations(\"event_id\", \"action_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_EVENTS, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.get_action_invocations('event_id', 'action_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/events/{eventId}/reflow:
    post:
      security:
        - OAuth:
            - flow
            - flow:reflow
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Reflow by event
      operationId: reflowByEvent
      description: |
        Reflows a past event denoted by the event ID and triggers the actions of any workflows with matching conditions.
      parameters:
        - in: path
          name: eventId
          schema:
            type: string
            pattern: ^evt_[a-z0-9]{26}$
          required: true
          description: The unique identifier for the event to be reflowed.
          example: evt_x5zm2po6kimubhlfitgt2mfwgi
      responses:
        '202':
          description: Event reflow initiated successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Events for reflow not found
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Reflows;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    ReflowResponse response = await api.WorkflowsClient().ReflowByEvent(\"event_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.ReflowByEvent(\"event_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.reflow.ReflowResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    ReflowResponse response = api.workflowsClient().reflowByEvent(\"event_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.reflowByEvent('evt_hsfxtjwidv6ulah5gdbiqwqnka');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->reflowByEvent(\"event_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW]) \n    .build()\n)\n\ntry:\n    response = api.workflows.reflow_by_event('event_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/events/{eventId}/workflow/{workflowId}/reflow:
    post:
      security:
        - OAuth:
            - flow
            - flow:reflow
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Reflow by event and workflow
      operationId: reflowByEventAndWorkflow
      description: |
        Reflows a past event by event ID and workflow ID. Triggers all the actions of a specific event and workflow combination if the event denoted by the event ID matches the workflow conditions.
      parameters:
        - in: path
          name: eventId
          schema:
            type: string
            pattern: ^evt_[a-z0-9]{26}$
          required: true
          description: The unique identifier for the event to be reflowed.
          example: evt_x5zm2po6kimubhlfitgt2mfwgi
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z0-9]{26}$
          required: true
          description: The identifier of the workflow whose actions you want to trigger.
          example: wf_c8zm2po6kimubhlfitgt2mferf
      responses:
        '202':
          description: Event reflow initiated successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Events for reflow not found
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Reflows;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    ReflowResponse response = await api.WorkflowsClient().ReflowByEventAndWorkflow(\"event_id\", \"workflow_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.ReflowByEventAndWorkflow(\"event_id\", \"workflow_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.reflow.ReflowResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    ReflowResponse response = api.workflowsClient().reflowByEventAndWorkflow(\"event_id\", \"workflow_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.reflowByEventAndWorkflow(\n		'evt_hsfxtjwidv6ulah5gdbiqwqnka',\n		'wf_6p73pesh75vu7fqo6p6exhpe54'\n	);\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->reflowByEventAndWorkflow(\"event_id\", \"workflow_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.reflow_by_event_and_workflow('event_id', 'workflow_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/events/reflow:
    post:
      security:
        - OAuth:
            - flow
            - flow:reflow
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Reflow
      operationId: reflowEvents
      description: |
        Reflow past events attached to multiple event IDs and workflow IDs, or to multiple subject IDs and workflow IDs. If you don't specify any workflow IDs, all matching workflows will be retriggered.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/reflow-events-by-event-and-workflow-ids'
                - $ref: '#/components/schemas/reflow-events-by-subject-and-workflow-ids'
      responses:
        '202':
          description: Event reflow initiated successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Events for reflow not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ids-validation-error'
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Reflows;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nReflowRequest request = new ReflowByEventsRequest()\n{\n    Events = new List<string>()\n    {\n        \"evt_lzmo6p0i3612judj754w1ngtil\",\n        \"evt_05z6xuagtti48ajyfbuekg6a0a\"\n    },\n    Workflows = new List<string>()\n    {\n        \"wf_sq8jnqi9i749hhb470bu308uk2\",\n        \"wf_bz91q7i4ks4sr0kasmas2xhp56\"\n\n    }\n};\n\ntry\n{\n    ReflowResponse response = await api.WorkflowsClient().Reflow(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/workflows/reflows\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := &reflows.ReflowByEventsRequest{\n	Events:          []string{\"event_id_1\", \"event_id_2\"},\n	ReflowWorkflows: reflows.ReflowWorkflows{Workflows: []string{\"workflow_id_1\", \"workflow_id_2\"}},\n}\n\nresponse, err := api.WorkFlows.Reflow(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.reflow.ReflowByEventsRequest;\nimport com.checkout.workflows.reflow.ReflowResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nReflowByEventsRequest request = ReflowByEventsRequest.builder()\n    .events(Arrays.asList(\"event_id_1\", \"event_id_2\"))\n    .workflows(Arrays.asList(\"workflow_id_1\", \"workflow_id_2\"))\n    .build();\n\ntry {\n    ReflowResponse response = api.workflowsClient().reflow(request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.reflowEventsByEventAndWorkflowIds(\n		['evt_hsfxtjwidv6ulah5gdbiqwqnka'],\n		['wf_6p73pesh75vu7fqo6p6exhpe54']\n	);\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Workflows\\Reflows\\ReflowByEventsRequest;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new ReflowByEventsRequest();\n$request->events = array(\"evt_lzmo6p0i3612judj754w1ngtil\");\n$request->workflows = array(\"wf_sq8jnqi9i749hhb470bu308uk2\");\n\ntry {\n    $response = $api->getWorkflowsClient()->reflow($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.workflows.workflows import ReflowByEventsRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\nrequest = ReflowByEventsRequest()\nrequest.events = ['event_id_1', 'event_id_2']\nrequest.workflows = ['workflow_id_1', 'workflow_id_2']\n\ntry:\n    response = api.workflows.reflow(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/events/subject/{subjectId}:
    get:
      security:
        - OAuth:
            - flow
            - flow:events
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Get subject events
      operationId: getSubjectEvents
      description: |
        Get all events that relate to a specific subject
      parameters:
        - in: path
          name: subjectId
          schema:
            type: string
          required: true
          description: The event identifier
          example: pay_wlu3wxc26jounofs5iez75qaqa
      responses:
        '200':
          description: Events retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/subject-events-response'
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '404':
          description: Subject not found
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Events;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    SubjectEventsResponse response = await api.WorkflowsClient().GetSubjectEvents(\"subject_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow, configuration.FlowEvents}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.GetSubjectEvents(\"subject_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.events.SubjectEventsResponse;\nimport com.checkout.workflows.reflow.ReflowByEventsRequest;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW_EVENTS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nReflowByEventsRequest request = ReflowByEventsRequest.builder()\n    .events(Arrays.asList(\"event_id_1\", \"event_id_2\"))\n    .workflows(Arrays.asList(\"workflow_id_1\", \"workflow_id_2\"))\n    .build();\n\ntry {\n    SubjectEventsResponse response = api.workflowsClient().getSubjectEvents(\"subject_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.getSubjectEvents('pay_ymhp72mhubcejmjjwcupzalm5e');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->getSubjectEvents(\"subject_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_EVENTS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.get_subject_events('subject_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/events/subject/{subjectId}/reflow:
    post:
      security:
        - OAuth:
            - flow
            - flow:reflow
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Reflow by subject
      operationId: reflowBySubject
      description: |
        Reflows the events associated with a subject ID (for example, a payment ID or a dispute ID) and triggers the actions of any workflows with matching conditions.
      parameters:
        - in: path
          name: subjectId
          schema:
            type: string
            pattern: ^[a-z]{3}_[a-z0-9]{26}$
          required: true
          description: The subject identifier (for example, a payment ID or a dispute ID). The events associated with these subjects will be reflowed.
          example: pay_x5zm2po6kimubhlfitgt2mfwgi
      responses:
        '202':
          description: Event reflow initiated successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Events for reflow not found
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Reflows;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    ReflowResponse response = await api.WorkflowsClient().ReflowBySubject(\"subject_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.ReflowBySubject(\"subject_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.reflow.ReflowResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    ReflowResponse response = api.workflowsClient().reflowBySubject(\"subject_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.reflowBySubject('pay_ymhp72mhubcejmjjwcupzalm5e');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->reflowBySubject(\"subject_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.reflow_by_subject('subject_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /workflows/events/subject/{subjectId}/workflow/{workflowId}/reflow:
    post:
      security:
        - OAuth:
            - flow
            - flow:reflow
        - ApiSecretKey: [ ]
      tags:
        - Workflows
      summary: Reflow by subject and workflow
      operationId: reflowBySubjectAndWorkflow
      description: |
        Reflows the events associated with a subject ID (for example, a payment ID or a dispute ID) and triggers the actions of the specified workflow if the conditions match.
      parameters:
        - in: path
          name: subjectId
          schema:
            type: string
            pattern: ^[a-z]{3}_[a-z0-9]{26}$
          required: true
          description: The subject identifier (for example, a payment ID or a dispute ID). The events associated with these subjects will be reflowed.
          example: pay_x5zm2po6kimubhlfitgt2mfwgi
        - in: path
          name: workflowId
          schema:
            type: string
            pattern: ^wf_[a-z0-9]{26}$
          required: true
          description: The identifier of the workflow whose actions you want to trigger.
          example: wf_c8zm2po6kimubhlfitgt2mferf
      responses:
        '202':
          description: Event reflow initiated successfully
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Events for reflow not found
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Workflows.Reflows;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Flow)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    ReflowResponse response = await api.WorkflowsClient().ReflowBySubjectAndWorkflow(\"subject_id\", \"workflow_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Flow}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.WorkFlows.ReflowBySubjectAndWorkflow(\"subject_id\", \"workflow_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.workflows.reflow.ReflowResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.FLOW, OAuthScope.FLOW_WORKFLOWS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    ReflowResponse response = api.workflowsClient().reflowBySubjectAndWorkflow(\"subject_id\", \"workflow_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	let workflows = await cko.workflows.reflowBySubjectAndWorkflow(\n		'pay_ymhp72mhubcejmjjwcupzalm5e',\n		'wf_6p73pesh75vu7fqo6p6exhpe54'\n	);\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Flow])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n\ntry {\n    $response = $api->getWorkflowsClient()->reflowBySubjectAndWorkflow(\"subject_id\", \"workflow_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.FLOW, OAuthScopes.FLOW_WORKFLOWS]) \n    .build()\n)\n\ntry:\n    response = api.workflows.reflow_by_subject_and_workflow('subject_id', 'workflow_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /forex/rates:
    get:
      tags:
        - Forex
      security:
        - OAuth:
            - fx
      summary: Get FX rates
      operationId: getFxRates
      description: |
        Get the indicative foreign exchange (FX) rates for:
    
          - <a href="https://www.checkout.com/docs/developer-resources/api/fx-rates-api#Daily_acquiring_FX_rates" target="_blank">Daily acquiring</a>
          - <a href="https://www.checkout.com/docs/developer-resources/api/fx-rates-api#Scheme_acquiring_FX_rates" target="_blank">Scheme acquiring</a>
          - <a href="https://www.checkout.com/docs/developer-resources/api/fx-rates-api#Card_payouts_FX_rates" target="_blank">Card payouts</a>
    
        If you request an FX rate for a product that is not enabled for your account, you receive a `403 Forbidden` error response.
      parameters:
        - name: product
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ForexProduct'
        - name: source
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ForexSource'
        - name: currency_pairs
          in: query
          required: true
          schema:
            type: string
            description: A list of <a href="https://www.checkout.com/docs/developer-resources/codes/currency-codes" target="_blank">currency code</a> pairs to retrieve FX rates for. For example, to request a rate for a USD to GBP conversion, the currency pair is `USDGBP`.<br/>Format – Comma-separated list
            example: 'USDGBP,EURNOK,JPYCAD'
        - name: processing_channel_id
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ForexProcessingChannelId'
      responses:
        '200':
          description: Rates retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForexRatesResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests / Duplicate Requests 
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
        '502':
          description: Bad Gateway
  /forward:
    post:
      tags:
        - Forward
      security:
        - OAuth:
            - forward
        - ApiSecretKey: []
      summary: Forward an API request
      operationId: forwardRequest
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Forwards an API request to a third-party endpoint.
    
        For example, you can <a href="https://www.checkout.com/docs/payments/manage-payments/forward-stored-payment-credentials" target="_blank\">forward payment credentials</a> you've stored in our Vault to a third-party payment processor.
      servers:
        - url: https://forward.checkout.com
          description: Production environment
        - url: https://forward.sandbox.checkout.com
          description: Sandbox environment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForwardRequest'
      responses:
        '200':
          description: The request was successfully forwarded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForwardResponse'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForwardValidationError'
        '500':
          description: Internal Error
  /forward/{id}:
    get:
      tags:
        - Forward
      security:
        - OAuth:
            - forward
        - ApiSecretKey: [ ]
      summary: Get forward request
      operationId: getForwardRequest
      description: |
        Retrieve the details of a successfully forwarded API request.    
    
        The details can be retrieved for up to 14 days after the request was initiated.
      servers:
        - url: https://forward.checkout.com
          description: Production environment
        - url: https://forward.sandbox.checkout.com
          description: Sandbox environment
      parameters:
        - in: path
          name: id
          schema:
            type: string
            pattern: '^fwd_[A-Z0-9]{26}$'
          required: true
          description: The unique identifier of the forward request.
    
      responses:
        '200':
          description: Forward request retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetForwardRequestResponse'
        '401':
          description: Unauthorized
        '404':
          description: Forward request not found
        '500':
          description: Internal Server Error
  /googlepay/enrollments:
    post:
      tags:
        - Google Pay
      security:
        - OAuth:
            - vault:gpayme-enrollment
      summary: Enroll an entity to the Google Pay Service
      description: |
        Enroll an entity to the Google Pay Service. 
        
        You must accept the <a href=https://payments.developers.google.com/terms/sellertos>Google terms of service</a> to use this feature.
      operationId: GooglePayEnrollMerchant
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GooglePayEnrollmentRequest'
      servers:
        - url: https://{prefix}.api.checkout.com
          description: Live API
          variables:
            prefix:
              description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
              default: "{prefix}"      
        - url: https://{prefix}.api.sandbox.checkout.com
          description: Sandbox API
          variables:
            prefix:
              description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
              default: "{prefix}"      
      responses:
        "201":
          description: Enrolled successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GooglePayEnrollmentResponse'
        "401":
          description: Unauthorized.
        "422":
          description: Invalid request payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GooglePayErrorResponse'
        "500":
          description: Internal server error.
  /googlepay/enrollments/{entity_id}/domain:
    post:
      tags:
        - Google Pay
      security:
        - OAuth:
            - vault:gpayme-enrollment
      summary: Register a web domain for an enrolled entity
      description: |
        Associates a web domain with the specified enrolled entity.
      operationId: GooglePayRegisterDomain
      parameters:
        - in: path
          name: entity_id
          required: true
          description: Unique identifier of the entity.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GooglePayRegisterDomainRequest'
      servers:
        - url: https://{prefix}.api.checkout.com
          description: Live API
          variables:
            prefix:
              description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
              default: "{prefix}"      
        - url: https://{prefix}.api.sandbox.checkout.com
          description: Sandbox API
          variables:
            prefix:
              description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
              default: "{prefix}"  
      responses:
        "204":
          description: Domain registered successfully (no content).
        "401":
          description: Unauthorized.
        "404":
          description: Entity not found.
        "422":
          description: Invalid domain format or missing parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GooglePayErrorResponse'
        "500":
          description: Internal server error.
  /googlepay/enrollments/{entity_id}/domains:
    get:
      tags:
        - Google Pay
      security:
        - OAuth:
            - vault:gpayme-enrollment
      summary: Get registered domains for an entity
      description: |
        Retrieves all web domains registered for the specified entity.
      operationId: GooglePayGetRegisteredDomains
      parameters:
        - in: path
          name: entity_id
          required: true
          description: Unique identifier of the entity.
          schema:
            type: string
      servers:
        - url: https://{prefix}.api.checkout.com
          description: Live API
          variables:
            prefix:
              description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
              default: "{prefix}"      
        - url: https://{prefix}.api.sandbox.checkout.com
          description: Sandbox API
          variables:
            prefix:
              description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
              default: "{prefix}"  
      responses:
        "200":
          description: Successfully retrieved list of domains.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GooglePayDomainListResponse'
        "401":
          description: Unauthorized.
        "404":
          description: Entity was not found or no domains are registered.
        "500":
          description: Internal server error.
  /googlepay/enrollments/{entity_id}/state:
    get:
      tags:
        - Google Pay
      security:
        - OAuth:
            - vault:gpayme-enrollment
      summary: Get enrollment state
      description: |
        Returns the current enrollment state of an entity.
      operationId: GooglePayGetEnrollmentState
      parameters:
        - in: path
          name: entity_id
          required: true
          description: Unique identifier of the entity.
          schema:
            type: string
      servers:
        - url: https://{prefix}.api.checkout.com
          description: Live API
          variables:
            prefix:
              description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
              default: "{prefix}"      
        - url: https://{prefix}.api.sandbox.checkout.com
          description: Sandbox API
          variables:
            prefix:
              description: Your unique <a href="https://www.checkout.com/docs/developer-resources/api/api-endpoints" target="_blank">base URL</a>. There is no default value.
              default: "{prefix}"  
      responses:
        "200":
          description: Successfully retrieved enrollment state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GooglePayEnrollmentStateResponse'
        "401":
          description: Unauthorized.
        "404":
          description: Entity not found.
        "500":
          description: Internal server error.
  /hosted-payments:
    post:
      security:
        - ApiSecretKey: [ ]
      tags:
        - Hosted Payments Page
      summary: Create a Hosted Payments Page session
      operationId: createAHostedPaymentsSession
      description: |
        Create a Hosted Payments Page session and pass through all the payment information, like the amount, currency, country and reference.
    
        To get started with our Hosted Payments Page, contact your solutions engineer or <a href="https://dashboard.checkout.com/support/new?topic=case_account_management_and_access&amp;issue=issue_account_changes" target="_blank">request support</a>.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostedPaymentsRequest'
      responses:
        '201':
          description: Created Hosted Payments Page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostedPaymentsResponse'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\nusing Checkout.Payments;\nusing Checkout.Payments.Hosted;\n\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nHostedPaymentRequest request = new HostedPaymentRequest()\n{\n    Amount = 10,\n    Currency = Currency.GBP,\n    PaymentType = PaymentType.Regular,\n    PaymentIp = \"192.168.0.1\",\n    BillingDescriptor = new BillingDescriptor() {Name = \"Name\", City = \"City\"},\n    Reference = \"reference\",\n    Description = \"Payment for Gold Necklace\",\n    Customer = new CustomerRequest() {Email = \"email@docs.checkout.com\", Name = \"FirstName LastName\"},\n    Shipping =\n        new ShippingDetails()\n        {\n            Address = new Address()\n            {\n                AddressLine1 = \"123 High St.\",\n                AddressLine2 = \"Flat 456\",\n                City = \"London\",\n                State = \"GB\",\n                Zip = \"SW1A 1AA\",\n                Country = CountryCode.GB\n            },\n            Phone = new Phone() {Number = \"4155552671\", CountryCode = \"1\"}\n        },\n    Billing =\n        new BillingInformation()\n        {\n            Address = new Address()\n            {\n                AddressLine1 = \"123 High St.\",\n                AddressLine2 = \"Flat 456\",\n                City = \"London\",\n                State = \"GB\",\n                Zip = \"SW1A 1AA\",\n                Country = CountryCode.GB\n            },\n            Phone = new Phone() {Number = \"4155552671\", CountryCode = \"1\"}\n        },\n    Recipient =\n        new PaymentRecipient()\n        {\n            DateOfBirth = \"1985-05-15\", AccountNumber = \"5555554444\", Zip = \"SW1A\", LastName = \"LastName\",\n        },\n    Processing = new ProcessingSettings() {Aft = true},\n    Products = new List<Product>() {new Product() {Name = \"Gold Necklace\", Quantity = 1, Price = 1000}},\n    Risk = new RiskRequest() {Enabled = false},\n    SuccessUrl = \"https://example.com/payments/success\",\n    CancelUrl = \"https://example.com/payments/cancel\",\n    FailureUrl = \"https://example.com/payments/failure\",\n    Metadata = new Dictionary<string, object>(),\n    Locale = \"en-GB\",\n    ThreeDs = new ThreeDsRequest() {Enabled = false, AttemptN3D = false},\n    Capture = true,\n    CaptureOn = new DateTime()\n};\n\ntry\n{\n    HostedPaymentResponse response =\n        await api.HostedPaymentsClient().CreateHostedPaymentsPageSession(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/payments\"\n	\"github.com/checkout/checkout-sdk-go/payments/hosted\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\naddress := common.Address{\n	AddressLine1: \"123 High St.\",\n	AddressLine2: \"Flat 456\",\n	City:         \"London\",\n	State:        \"GB\",\n	Zip:          \"SW1A 1AA\",\n	Country:      common.GB,\n}\n\nphone := common.Phone{\n	CountryCode: \"1\",\n	Number:      \"415 555 2671\",\n}\n\nrequest := hosted.HostedPaymentRequest{\n	Amount:      10,\n	Currency:    common.GBP,\n	PaymentType: payments.Regular,\n	BillingDescriptor: &payments.BillingDescriptor{\n		Name: \"Name\",\n		City: \"London\",\n	},\n	Reference:   \"Reference\",\n	Description: \"Description\",\n	Customer: &common.CustomerRequest{\n		Email: \"email@docs.checkout.com\",\n		Name:  \"Name\",\n	},\n	Shipping: &payments.ShippingDetails{\n		Address: &address,\n		Phone:   &phone,\n	},\n	Billing: &payments.BillingInformation{\n		Address: &address,\n		Phone:   &phone,\n	},\n	Recipient: &payments.PaymentRecipient{\n		DateOfBirth:   \"1985-05-15\",\n		AccountNumber: \"999999999\",\n		Zip:           \"12345\",\n		LastName:      \"LastName\",\n	},\n	Processing: &payments.ProcessingSettings{Aft: true},\n	Products: []payments.Product{\n		{\n			Name:     \"name\",\n			Quantity: 1,\n			Price:    200,\n		},\n	},\n	Risk:       &payments.RiskRequest{Enabled: false},\n	SuccessUrl: \"https://docs.checkout.com/payments/success\",\n	CancelUrl:  \"https://docs.checkout.com/payments/cancel\",\n	FailureUrl: \"https://docs.checkout.com/payments/failure\",\n	Locale:     \"en-GB\",\n	ThreeDs: &payments.ThreeDsRequest{\n		Enabled:            false,\n		AttemptN3D:         false,\n		ChallengeIndicator: common.NoChallengeRequested,\n	},\n	Capture:   true,\n	CaptureOn: time.Now().AddDate(0, 0, 30),\n}\n\nresponse, err := api.Hosted.CreateHostedPaymentsPageSession(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.Address;\nimport com.checkout.common.ChallengeIndicator;\nimport com.checkout.common.CountryCode;\nimport com.checkout.common.Currency;\nimport com.checkout.common.CustomerRequest;\nimport com.checkout.common.Phone;\nimport com.checkout.common.Product;\nimport com.checkout.payments.BillingDescriptor;\nimport com.checkout.payments.BillingInformation;\nimport com.checkout.payments.PaymentRecipient;\nimport com.checkout.payments.PaymentType;\nimport com.checkout.payments.ProcessingSettings;\nimport com.checkout.payments.RiskRequest;\nimport com.checkout.payments.ShippingDetails;\nimport com.checkout.payments.ThreeDSRequest;\nimport com.checkout.payments.hosted.HostedPaymentRequest;\nimport com.checkout.payments.hosted.HostedPaymentResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n        .staticKeys()\n        .secretKey(\"secret_key\")\n        .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n        .build();\n\nHostedPaymentRequest request = HostedPaymentRequest.builder()\n    .amount(10L)\n    .reference(\"reference\")\n    .currency(Currency.GBP)\n    .description(\"Payment\")\n    .customer(new CustomerRequest(null, \"email@docs.checkout.com\", \"Name\", null))\n    .shipping(ShippingDetails.builder()\n        .address(Address.builder()\n        .addressLine1(\"123 High St.\")\n        .addressLine2(\"Flat 456\")\n        .city(\"London\")\n        .state(\"GB\")\n        .zip(\"SW1A 1AA\")\n        .country(CountryCode.GB)\n        .build())\n    .phone(Phone.builder().countryCode(\"1\").number(\"415 555 2671\").build())\n        .build())\n    .billing(BillingInformation.builder()\n        .address(Address.builder()\n        .addressLine1(\"123 High St.\")\n        .addressLine2(\"Flat 456\")\n        .city(\"London\")\n        .state(\"GB\")\n        .zip(\"SW1A 1AA\")\n        .country(CountryCode.GB)\n        .build())\n    .phone(Phone.builder().countryCode(\"1\").number(\"415 555 2671\").build())\n        .build())\n    .recipient(PaymentRecipient.builder()\n        .accountNumber(\"999999999\")\n        .dateOfBirth(\"1985-05-15\")\n        .lastName(\"LastName\")\n        .zip(\"12345\")\n        .build())\n    .processing(ProcessingSettings.builder()\n        .aft(true)\n        .build())\n    .products(Collections.singletonList(Product.builder()\n        .name(\"name\")\n        .quantity(1L)\n        .price(200L)\n        .build()))\n    .risk(new RiskRequest(Boolean.FALSE))\n    .locale(\"en-GB\")\n    .threeDS(ThreeDSRequest.builder()\n    .enabled(Boolean.FALSE)\n    .attemptN3D(Boolean.FALSE)\n    .challengeIndicator(ChallengeIndicator.NO_CHALLENGE_REQUESTED)\n        .build())\n    .capture(true)\n    .captureOn(Instant.now().plus(30, ChronoUnit.DAYS))\n    .paymentType(PaymentType.REGULAR)\n    .billingDescriptor(BillingDescriptor.builder()\n        .city(\"London\")\n        .name(\"name\")\n        .build())\n    .successUrl(\"https://docs.checkout.com/payments/success\")\n    .failureUrl(\"https://docs.checkout.com/payments/success\")\n    .cancelUrl(\"https://docs.checkout.com/payments/success\")\n    .build();\n\ntry {\n    HostedPaymentResponse response = api.hostedPaymentsClient().createHostedPaymentsPageSession(request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}\n"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Address;\nuse Checkout\\Common\\Country;\nuse Checkout\\Common\\Currency;\nuse Checkout\\Common\\CustomerRequest;\nuse Checkout\\Common\\PaymentSourceType;\nuse Checkout\\Common\\Phone;\nuse Checkout\\Common\\Product;\nuse Checkout\\Environment;\nuse Checkout\\Payments\\BillingDescriptor;\nuse Checkout\\Payments\\BillingInformation;\nuse Checkout\\Payments\\Hosted\\HostedPaymentsSessionRequest;\nuse Checkout\\Payments\\PaymentRecipient;\nuse Checkout\\Payments\\PaymentType;\nuse Checkout\\Payments\\ProcessingSettings;\nuse Checkout\\Payments\\RiskRequest;\nuse Checkout\\Payments\\ShippingDetails;\nuse Checkout\\Payments\\ThreeDsRequest;\n\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n$phone = new Phone();\n$phone->country_code = \"+1\";\n$phone->number = \"415 555 2671\";\n\n$address = new Address();\n$address->address_line1 = \"123 High St.\";\n$address->address_line2 = \"Flat 456\";\n$address->city = \"London\";\n$address->State = \"GB\";\n$address->zip = \"SW1A 1AA\";\n$address->country = Country::$GB;\n\n$customerRequest = new CustomerRequest();\n$customerRequest->email = \"email@docs.checkout.com\";\n$customerRequest->name = \"Name\";\n\n$billingInformation = new BillingInformation();\n$billingInformation->address = $address;\n$billingInformation->phone = $phone;\n\n$shippingDetails = new ShippingDetails();\n$shippingDetails->address = $address;\n$shippingDetails->phone = $phone;\n\n$recipient = new PaymentRecipient();\n$recipient->account_number = \"1234567\";\n$recipient->dob = \"1985-05-15\";\n$recipient->last_name = \"LastName\";\n$recipient->zip = \"12345\";\n\n$product = new Product();\n$product->name = \"Product\";\n$product->quantity = 1;\n$product->price = 10;\n\n$products = array($product);\n\n$theeDsRequest = new ThreeDsRequest();\n$theeDsRequest->enabled = false;\n$theeDsRequest->attempt_n3d = false;\n\n$processing = new ProcessingSettings();\n$processing->aft = true;\n\n$risk = new RiskRequest();\n$risk->enabled = false;\n\n$billingDescriptor = new BillingDescriptor();\n$billingDescriptor->city = \"London\";\n$billingDescriptor->name = \"Awesome name\";\n\n$request = new HostedPaymentsSessionRequest();\n$request->amount = 100;\n$request->reference = \"reference\";\n$request->currency = Currency::$GBP;\n$request->description = \"Payment for Gold Necklace\";\n$request->customer = $customerRequest;\n$request->shipping = $shippingDetails;\n$request->billing = $billingInformation;\n$request->recipient = $recipient;\n$request->processing = $processing;\n$request->products = $products;\n$request->risk = $risk;\n$request->success_url = \"https://example.com/payments/success\";\n$request->cancel_url = \"https://example.com/payments/cancel\";\n$request->failure_url = \"https://example.com/payments/failure\";\n$request->locale = \"en-GB\";\n$request->three_ds = $theeDsRequest;\n$request->capture = true;\n$request->payment_type = PaymentType::$regular;\n$request->billing_descriptor = $billingDescriptor;\n$request->allow_payment_methods = array(PaymentSourceType::$card, PaymentSourceType::$ideal);\n\ntry {\n    $response = $api->getHostedPaymentsClient()->createHostedPaymentsPageSession($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}\n"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.common.common import Phone, Address, CustomerRequest, Product\nfrom checkout_sdk.common.enums import Country, Currency, PaymentSourceType\nfrom checkout_sdk.payments.hosted.hosted_payments import HostedPaymentsSessionRequest\nfrom checkout_sdk.payments.payments_previous import BillingInformation\nfrom checkout_sdk.payments.payments import ThreeDsRequest, ProcessingSettings, RiskRequest, ShippingDetails, PaymentRecipient\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\naddress = Address()\naddress.address_line1 = '123 High St.'\naddress.address_line2 = 'Flat 456'\naddress.city = 'London'\naddress.state = 'GB'\naddress.zip = 'SW1A 1AA'\naddress.country = Country.GB\n\ncustomer_request = CustomerRequest()\ncustomer_request.email = 'email@docs.checkout.com'\ncustomer_request.name = 'Name'\n\nbilling_information = BillingInformation()\nbilling_information.address = address\nbilling_information.phone = phone\n\nshipping_details = ShippingDetails()\nshipping_details.address = address\nshipping_details.phone = phone\n\nrecipient = PaymentRecipient()\nrecipient.account_number = '123456789'\nrecipient.country = Country.ES\nrecipient.dob = '1985-05-18'\nrecipient.first_name = 'First'\nrecipient.last_name = 'Last'\nrecipient.zip = '12345'\n\nproduct = Product()\nproduct.name = 'Name'\nproduct.quantity = 1\nproduct.price = 10\n\nthree_ds_request = ThreeDsRequest()\nthree_ds_request.enabled = True\nthree_ds_request.attempt_n3d = False\n\nprocessing_settings = ProcessingSettings()\nprocessing_settings.aft = True\n\nrisk_request = RiskRequest()\nrisk_request.enabled = True\n\nrequest = HostedPaymentsSessionRequest()\nrequest.amount = 10\nrequest.reference = 'reference'\nrequest.currency = Currency.GBP\nrequest.description = 'Payment for Gold Necklace'\nrequest.customer = customer_request\nrequest.shipping = shipping_details\nrequest.billing = billing_information\nrequest.recipient = recipient\nrequest.processing = processing_settings\nrequest.products = [product]\nrequest.risk = risk_request\nrequest.success_url = 'https://docs.checkout.com/payments/success'\nrequest.failure_url = 'https://docs.checkout.com/payments/failure'\nrequest.cancel_url = 'https://docs.checkout.com/payments/cancel'\nrequest.locale = 'en-GB'\nrequest.three_ds = three_ds_request\nrequest.capture = True\nrequest.allow_payment_methods = [PaymentSourceType.CARD, PaymentSourceType.KLARNA]\n\ntry:\n    response = api.hosted_payments.create_hosted_payments_page_session(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /hosted-payments/{id}:
    get:
      security:
        - ApiSecretKey: []
      tags:
        - Hosted Payments Page
      summary: Get Hosted Payments Page details
      operationId: getHostedPaymentsPageDetails
      description: |
        Retrieve details about a specific Hosted Payments Page using the ID returned when it was created. In the response, you will see the status of the Hosted Payments Page.<br><br>
        For more information, see the <a target="_blank" href="https://www.checkout.com/docs/integrate/hosted-payments-page">Hosted Payments Page documentation</a>.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/HostedPaymentId'
      responses:
        '200':
          description: Hosted Payments Page details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetHostedPaymentsResponse'
        '401':
          description: Unauthorized
        '404':
          description: Hosted Payments Page not found
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Payments.Hosted;\n\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    HostedPaymentDetailsResponse response = await api.HostedPaymentsClient().GetHostedPaymentsPageDetails(\"hosted_payment_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Hosted.GetHostedPaymentsPageDetails(\"hosted_payment_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.payments.hosted.HostedPaymentDetailsResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n        .staticKeys()\n        .secretKey(\"secret_key\")\n        .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n        .build();\n\ntry {\n    HostedPaymentDetailsResponse response = api.hostedPaymentsClient().getHostedPaymentsPageDetails(\"hosted_payment_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\n\n$api = CheckoutSdk::builder()\n    ->previous()\n    ->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\ntry {\n    $response = $api->getHostedPaymentsClient()->getHostedPaymentsPageDetails(\"hosted_payment_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\ntry:\n    response = api.hosted_payments.get_hosted_payments_page_details('hosted_payment_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /id-document-verifications:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - ID Document Verification
      summary: Create an ID document verification
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create an [ID document verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-id-documents) for an applicant.
    
        Ensure you use your ID Document Verification [configuration ID](https://www.checkout.com/docs/business-operations/manage-identities/verify-id-documents#Configuration).
      operationId: create_id_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      requestBody:
        required: true
        content:
          application/json:
            examples:
              id_document_verification_creation_request_body:
                $ref: '#/components/examples/iddv_id_document_verification_creation_request_body'
            schema:
              $ref: "#/components/schemas/IddvIdDocumentVerification"
      responses:
        '201':
          description: ID document verification created successfully
          content:
            application/json:
              examples:
                id_document_verification_creation_response_body:
                  $ref: '#/components/examples/iddv_id_document_verification_creation_response_body'
              schema:
                required:
                  - user_journey_id
                allOf:
                  - $ref: "#/components/schemas/IddvIdDocumentVerificationOutput"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                identity_verification_creation_request_invalid_body:
                  $ref: '#/components/examples/idv_identity_verification_creation_request_invalid_body'
              schema:
                $ref: "#/components/schemas/IdvIdentityVerificationError"
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                identity_verification_creation_request_invalid_body:
                  $ref: '#/components/examples/idv_identity_verification_creation_request_invalid_body'
              schema:
                $ref: "#/components/schemas/IdvIdentityVerificationError"
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /id-document-verifications/{id_document_verification_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - ID Document Verification
      summary: Get an ID document verification
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of an existing [ID document verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-id-documents).
      operationId: retrieve_id_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: id_document_verification_id
          required: true
          in: path
          description: The ID document verification's unique identifier.
          schema:
            $ref: '#/components/schemas/IddvIdDocumentVerificationId'
      responses:
        '200':
          description: ID document verification retrieved successfully
          content:
            application/json:
              examples:
                id_document_verification_creation_response_body:
                  $ref: '#/components/examples/iddv_id_document_verification_creation_response_body'
              schema:
                required:
                  - user_journey_id
                allOf:
                  - $ref: '#/components/schemas/IddvIdDocumentVerificationOutput'
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
            
  /id-document-verifications/{id_document_verification_id}/anonymize:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - ID Document Verification
      summary: Anonymize an ID document verification
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Remove the personal data from an [ID document verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-id-documents).
      operationId: anonymize_id_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: id_document_verification_id
          in: path
          description: The ID document verification's unique identifier.
          schema:
            $ref: '#/components/schemas/IddvIdDocumentVerificationId'
          required: true
      responses:
        '200':
          description: Personal data removed successfully
          content:
            application/json:
              examples:
                id_document_verification_response_body_anonymized:
                  $ref: '#/components/examples/iddv_id_document_verification_response_body_anonymized'
              schema:
                required:
                  - user_journey_id
                allOf:
                  - $ref: '#/components/schemas/IddvIdDocumentVerificationOutput'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
  /id-document-verifications/{id_document_verification_id}/attempts:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - ID Document Verification
      summary: Create an ID document verification attempt
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create an [ID document verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-id-documents) attempt.
        
        If you've previously created an attempt for this verification, the [verification status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Check_statuses) must be one of the following:
        
        - `created`
        - `retry_required`
    
        If you create a new attempt while the status is any other value, you receive a `409 Conflict` response.
    
        Images must not exceed 10MB in size and must be in one of the following formats:
    
        - `JPEG`
        - `PDF`
        - `PNG`
      operationId: create_id_document_verification_attempt
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: id_document_verification_id
          in: path
          description: The ID document verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IddvIdDocumentVerificationId'
      requestBody:
        content:
          multipart/form-data:
            examples:
              Minimal body:
                $ref: "#/components/examples/iddv_id_document_verification_attempt_creation_request_body_min"
              All possible data:
                $ref: "#/components/examples/iddv_id_document_verification_attempt_creation_request_body_max"
            schema:
              $ref: "#/components/schemas/IddvAttemptRequest"
      responses:
        '201':
          description: ID document verification attempt created successfully
          content:
            application/json:
              examples:
                id_document_verification_creation_response_body:
                  $ref: "#/components/examples/iddv_attempt_creation_response_body"
              schema:
                allOf:
                  - $ref: "#/components/schemas/IddvAttemptResponse"
        '404':
          description: Not Found
        '409':
          description: Conflict 
        '500':
          description: Internal Server Error
    
    get:
      tags:
        - ID Document Verification
      summary: Get ID document verification attempts
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of all attempts for a specific [ID document verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-id-documents).
      operationId: list_attempts_id_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: id_document_verification_id
          in: path
          description: The ID document verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IddvIdDocumentVerificationId'
      responses:
        '200':
          description: ID document verification attempts retrieved successfully
          content:
            application/json:
              examples:
                id_document_verification_attempt_list_response_body:
                  $ref: "#/components/examples/iddv_attempt_list_response_body"
              schema:
                allOf:
                  - $ref: "#/components/schemas/IddvAttemptResponseList"
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
  /id-document-verifications/{id_document_verification_id}/attempts/{attempt_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - ID Document Verification
      summary: Get an ID document verification attempt
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of a specific attempt for an [ID document verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-id-documents).
      operationId: get_id_document_verification_attempt
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: id_document_verification_id
          in: path
          description: The ID document verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IddvIdDocumentVerificationId'
        - name: attempt_id
          in: path
          description: The attempt's unique identifier.
          example: datp_tkoi5db4hryu5cei5vwoabraio
          required: true
          schema:
            type: string
            pattern: ^datp_\w+$
      responses:
        '200':
          description: ID document verification attempt retrieved successfully
          content:
            application/json:
              examples:
                id_document_verification_attempt_get_response_body:
                  $ref: "#/components/examples/iddv_attempt_get_response_body"
              schema:
                allOf:
                  - $ref: "#/components/schemas/IddvAttemptResponse"
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
  /id-document-verifications/{id_document_verification_id}/pdf-report:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - ID Document Verification
      summary: Get ID document verification report
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the report for an [ID document verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-id-documents) in PDF format.
    
        The report is only available when the [verification status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Check_statuses) is `approved` or `declined`, and you've received a [ID document verification report created](https://www.checkout.com/docs/developer-resources/webhooks/webhook-event-types/id-document-verification-webhooks) webhook.
      operationId: pdf_id_document_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: id_document_verification_id
          in: path
          description: The ID document verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IddvIdDocumentVerificationId'
      responses:
        '200':
          description: ID document verification report retrieved successfully
          content:
            application/json:
              examples:
                identity_verification_pdf_response_body:
                  $ref: '#/components/examples/idv_identity_verification_pdf_response_body'
              schema:
                required:
                  - pdf_report
                allOf:
                  - $ref: '#/components/schemas/IdvPdf'
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /applicants:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Applicants
      summary: Create an applicant
      description: Create a profile for an [Identities applicant](https://www.checkout.com/docs/business-operations/manage-identities/manage-applicants).
      operationId: create_applicant
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IdvApplicant"
            examples:
              All possible data:
                $ref: "#/components/examples/idv_applicant_creation_request_body"
    
      responses:
        "201":
          description: Applicant created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdvApplicant"
              examples:
                Always replies:
                  $ref: "#/components/examples/idv_applicant_response_body"
          links:
            RetrieveApplicantById:
              operationId: retrieve_applicant
              parameters:
                applicant_id: "$response.body#/id"
        "400":
          description: Bad Request
          content:
            application/json:
              examples:
                Invalid phone number:
                  value:
                    {
                      "error_type": "request_invalid",
                      "error_codes": ["phone_number__invalid_format"],
                    }
  /applicants/{applicant_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Applicants
      summary: Get an applicant
      description: Get the details of an [applicant profile](https://www.checkout.com/docs/business-operations/manage-identities/manage-applicants).
      operationId: retrieve_applicant
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: applicant_id
          required: true
          in: path
          description: The applicant profile's unique identifier.
          schema:
            $ref: "#/components/schemas/ApplicantId"
      responses:
        "200":
          description: Applicant profile retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdvApplicant"
              examples:
                Always replies:
                  $ref: "#/components/examples/idv_applicant_response_body"
        "404":
          description: Not Found
    
    patch:
      tags:
        - Applicants
      summary: Update an applicant
      description: Update the details of an [applicant profile](https://www.checkout.com/docs/business-operations/manage-identities/manage-applicants).
      operationId: update_applicant
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: applicant_id
          required: true
          in: path
          description: The applicant profile's unique identifier.
          schema:
            $ref: "#/components/schemas/ApplicantId"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - $ref: "#/components/schemas/IdvApplicant"
            examples:
              All possible data:
                $ref: "#/components/examples/idv_applicant_update_request_body"
      responses:
        "200":
          description: Applicant profile updated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdvApplicant"
              examples:
                Always replies:
                  $ref: "#/components/examples/idv_applicant_response_body"
        "400":
          description: Bad Request
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
  /applicants/{applicant_id}/anonymize:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Applicants
      summary: Anonymize an applicant
      description: Remove the personal data in an [applicant profile](https://www.checkout.com/docs/business-operations/manage-identities/manage-applicants).
      operationId: anonymize_applicant
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: applicant_id
          in: path
          description: The applicant profile's unique identifier.
          required: true
          schema:
            $ref: "#/components/schemas/ApplicantId"
      responses:
        "200":
          description: Personal data removed successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdvApplicant"
              examples:
                Always replies:
                  $ref: "#/components/examples/idv_applicant_response_body_anonymized"
        "400":
          description: Bad Request
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
  /create-and-open-idv:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Identity Verification
      summary: Create an identity verification and attempt
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create an [identity verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities) and an initial attempt.
        
        If successful, you receive a `201 Created` response and the identity verification resource, which contains the attempt URL.
    
        Ensure you use your identity verification [configuration ID](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities#Configuration).
      operationId: create_and_start_identity_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      requestBody:
        required: true
        content:
          application/json:
            examples:
              Only required data:
                $ref: "#/components/examples/idv_identity_verification_creation_helper_request_body_min"
              All possible data:
                $ref: "#/components/examples/idv_identity_verification_creation_helper_request_body_max"
              Use an existing applicant:
                $ref: "#/components/examples/idv_identity_verification_creation_helper_request_body_min_plus_aplt"
            schema:
              $ref: "#/components/schemas/IdvIdentityVerificationHelper"
      responses:
        "201":
          description: Identity verification and attempt created successfully
          content:
            application/json:
              examples:
                identity_verification_creation_helper_response_body:
                  $ref: "#/components/examples/idv_identity_verification_creation_helper_response_body"
              schema:
                required: [applicant_id, user_journey_id]
                allOf:
                  - $ref: "#/components/schemas/IdvIdentityVerificationHelper"
  /identity-verifications:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Identity Verification
      summary: Create an identity verification
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create an [identity verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities) linked to an applicant.
    
        If successful, you receive a `201 Created` response with the identity verification resource.
    
        Ensure you use your identity verification [configuration ID](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities#Configuration).
      operationId: create_identity_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      requestBody:
        required: true
        content:
          application/json:
            examples:
              Only required data:
                $ref: '#/components/examples/idv_identity_verification_creation_request_body_min'
              All possible data:
                $ref: '#/components/examples/idv_identity_verification_creation_request_body_max'
            schema:
              $ref: '#/components/schemas/IdvIdentityVerification'
      responses:
        '201':
          description: Identity verification created successfully
          content:
            application/json:
              examples:
                identity_verification_creation_response_body:
                  $ref: '#/components/examples/idv_identity_verification_creation_response_body'
              schema:
                required:
                  - user_journey_id
                allOf:
                  - $ref: '#/components/schemas/IdvIdentityVerificationOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                identity_verification_creation_request_invalid_body:
                  $ref: '#/components/examples/idv_identity_verification_creation_request_invalid_body'
              schema:
                $ref: '#/components/schemas/IdvIdentityVerificationError'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable Content
          content:
            application/json:
              example:
                error_type: unprocessable_entity
                error_codes:
                  - organization__no_configuration
              schema:
                $ref: '#/components/schemas/IdvIdentityVerificationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /identity-verifications/{identity_verification_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Identity Verification
      summary: Get an identity verification
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of an existing [identity verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities).
      operationId: retrieve_identity_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: identity_verification_id
          required: true
          in: path
          description: The identity verification's unique identifier.
          schema:
            $ref: '#/components/schemas/IdvIdentityVerificationId'
      responses:
        '200':
          description: Identity verification retrieved successfully
          content:
            application/json:
              examples:
                Approved Identity Verification Response Body:
                  $ref: '#/components/examples/idv_identity_verification_response_body_approved'
                Declined Identity Verification Response Body:
                  $ref: '#/components/examples/idv_identity_verification_response_body_declined'
              schema:
                required:
                  - user_journey_id
                allOf:
                  - $ref: '#/components/schemas/IdvIdentityVerificationOutput'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /identity-verifications/{identity_verification_id}/anonymize:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Identity Verification
      summary: Anonymize an identity verification
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Remove the personal data in an [identity verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities).
      operationId: anonymize_identity_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: identity_verification_id
          in: path
          description: The identity verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IdvIdentityVerificationId'
      responses:
        '200':
          description: Personal data removed successfully
          content:
            application/json:
              examples:
                identity_verification_response_body_anonymized:
                  $ref: '#/components/examples/idv_identity_verification_response_body_anonymized'
              schema:
                required:
                  - user_journey_id
                allOf:
                  - $ref: '#/components/schemas/IdvIdentityVerificationOutput'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                identity_verification_unprocessable_entity_body:
                  $ref: '#/components/examples/idv_identity_verification_unprocessable_entity_body'
              schema:
                $ref: '#/components/schemas/IdvIdentityVerificationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /identity-verifications/{identity_verification_id}/attempts:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    post:
      tags:
        - Identity Verification
      summary: Create an identity verification attempt
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create an [identity verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities) attempt.
        
        If you've already created an attempt for this verification, the [verification status](https://www.checkout.com/docs/developer-resources/codes/identities-codes) must be one of the following:
        
        - `created`
        - `pending`
        - `capture_in_progress`
        - `retry_required`
    
        If you create a new attempt while the status is any other value, you receive a `409 Conflict` response.
      operationId: create_attempt
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: identity_verification_id
          in: path
          description: The identity verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IdvIdentityVerificationId'
      requestBody:
        content:
          application/json:
            examples:
              Minimal body:
                $ref: "#/components/examples/idv_attempt_creation_request_body_min"
              All possible data:
                $ref: "#/components/examples/idv_attempt_creation_request_body_max"
            schema:
              $ref: "#/components/schemas/IdvAttemptRequest"
      responses:
        "201":
          description: Identity verification attempt created successfully
          content:
            application/json:
              examples:
                identity_verification_creation_response_body:
                  $ref: "#/components/examples/idv_attempt_creation_response_body"
              schema:
                allOf:
                  - $ref: "#/components/schemas/IdvAttemptResponse"
                  - type: object
                    properties:
                      _links:
                          readOnly: true
                          allOf:
                            - $ref: "#/components/schemas/IdvAttemptLinks"
        "404":
          description: Not Found
        "409":
          description: Conflict
        "500":
          description: Internal Server Error
    
    get:
      tags:
        - Identity Verification
      summary: Get identity verification attempts
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get all the attempts for a specific [identity verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities).
      operationId: list_attempts
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: identity_verification_id
          in: path
          description: The identity verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IdvIdentityVerificationId'
      responses:
        "200":
          description: Identity verification attempts retrieved successfully
          content:
            application/json:
              examples:
                identity_verification_list_response_body:
                  $ref: "#/components/examples/idv_attempt_list_response_body"
              schema:
                allOf:
                  - $ref: "#/components/schemas/IdvAttemptResponseList"
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
    
  /identity-verifications/{identity_verification_id}/attempts/{attempt_id}:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Identity Verification
      summary: Get an identity verification attempt
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the details of a specific attempt for an [identity verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities).
      operationId: get_attempt
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: identity_verification_id
          in: path
          description: The identity verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IdvIdentityVerificationId'
        - name: attempt_id
          in: path
          description: The attempt's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IdvAttemptId'
      responses:
        "200":
          description: Identity verification attempt retrieved successfully
          content:
            application/json:
              examples:
                identity_verification_list_response_body:
                  $ref: "#/components/examples/idv_attempt_get_response_body"
              schema:
                allOf:
                  - $ref: "#/components/schemas/IdvAttemptResponse"
                  - type: object
                    properties:
                      _links:
                          readOnly: true
                          allOf:
                            - $ref: "#/components/schemas/IdvAttemptLinks"
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
  /identity-verifications/{identity_verification_id}/attempts/{attempt_id}/assets:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Identity Verification
      summary: Get identity verification attempt assets
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the assets (face images, videos, and document images) captured during an [identity verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities) attempt.
    
        Videos are not exposed by default. Contact your account manager to enable this feature.
    
        Results are paginated. Use the `skip` and `limit` query parameters to navigate through pages.
      operationId: get_identity_verification_attempt_assets
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: identity_verification_id
          in: path
          description: The identity verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IdvIdentityVerificationId'
        - name: attempt_id
          in: path
          description: The attempt's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IdvAttemptId'
        - name: skip
          in: query
          description: The number of assets to skip.
          required: false
          schema:
            type: integer
            default: 0
        - name: limit
          in: query
          description: The maximum number of assets to return.
          required: false
          schema:
            type: integer
            default: 10
      responses:
        "200":
          description: Identity verification attempt assets retrieved successfully
          content:
            application/json:
              examples:
                idv_attempt_assets_response_body:
                  $ref: "#/components/examples/idv_attempt_assets_response_body"
              schema:
                $ref: "#/components/schemas/IdvAttemptAssets"
        "404":
          description: Not Found
        "500":
          description: Internal Server Error
  /identity-verifications/{identity_verification_id}/pdf-report:
    servers:
      - url: https://identity-verification.checkout.com
        description: Production environment
      - url: https://identity-verification.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Identity Verification
      summary: Get identity verification report
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get the report with the full details of an [identity verification](https://www.checkout.com/docs/business-operations/manage-identities/verify-identities) in PDF format.
    
        The report is only available when the [verification status](https://www.checkout.com/docs/developer-resources/codes/identities-codes) is `approved` or `declined`, and you've received an [Identity verification report created](https://www.checkout.com/docs/developer-resources/webhooks/webhook-event-types/identity_verification_report_created) webhook.
      operationId: pdf_identity_verification
      security:
        - OAuth:
            - identity-verification
        - ApiSecretKey: []
      parameters:
        - name: identity_verification_id
          in: path
          description: The identity verification's unique identifier.
          required: true
          schema:
            $ref: '#/components/schemas/IdvIdentityVerificationId'
      responses:
        '200':
          description: Identity verification report retrieved successfully
          content:
            application/json:
              examples:
                identity_verification_pdf_response_body:
                  $ref: '#/components/examples/idv_identity_verification_pdf_response_body'
              schema:
                required:
                  - pdf_report
                allOf:
                  - $ref: '#/components/schemas/IdvPdf'
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /instruments:
    post:
      tags:
        - Instruments
      security:
        - OAuth:
            - vault
            - vault:instruments
        - ApiSecretKey: [ ]
      summary: Create an instrument
      operationId: createAnInstrument
      description: |
        Create a payment instrument like card, bank, ach or sepa to use for future payments and payouts. 
        
        The parameters you need to provide when creating a bank account payment instrument depend on the account's country and currency. See the <a href="https://www.checkout.com/docs/payments/request-payouts/bank-payouts/payout-formatting" target="_blank">payout formatting documentation</a>, or use the `GET /validation/bank-accounts/{country}/{currency}` <a href="https://api-reference.checkout.com/#operation/getBankAccountFields">endpoint</a>.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreInstrumentRequest'
      responses:
        '200':
          description: Existing instrument for customer and card details found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreInstrumentResponse'
        '201':
          description: Instrument created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreInstrumentResponse'
        '401':
          description: Unauthorized
        '409':
          description: A concurrent update conflict occurred. Retry the request.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\nusing Checkout.Instruments.Create;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Vault)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nCreateTokenInstrumentRequest request = new CreateTokenInstrumentRequest\n{\n    Token = \"tok_asoto22g2fsu7prwomy12sgfsa\",\n    AccountHolder = new AccountHolder()\n    {\n        FirstName = \"FirstName\",\n        LastName = \"LastName\",\n        BillingAddress = new Address()\n        {\n            AddressLine1 = \"123 High St.\",\n            AddressLine2 = \"Flat 456\",\n            City = \"London\",\n            State = \"GB\",\n            Zip = \"SW1A 1AA\",\n            Country = CountryCode.GB\n        },\n        Phone = new Phone() {Number = \"4155552671\", CountryCode = \"1\"}\n    },\n    Customer = new CreateCustomerInstrumentRequest()\n    {\n        Email = \"email@docs.checkout.com\",\n        Name = \"FirstName LastName\",\n        Phone = new Phone() {CountryCode = \"1\", Number = \"4155552671\"},\n        Default = true\n    }\n};\n\ntry\n{\n    CreateInstrumentResponse response = await api.InstrumentsClient().Create(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/instruments/nas\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := nas.NewCreateTokenInstrumentRequest()\nrequest.Token = \"token\"\nrequest.AccountHolder = &common.AccountHolder{\n	FirstName: \"FirstName\",\n	LastName:  \"LastName\",\n	BillingAddress: &common.Address{\n		AddressLine1: \"123 High St.\",\n		AddressLine2: \"Flat 456\",\n		City:         \"London\",\n		State:        \"GB\",\n		Zip:          \"SW1A 1AA\",\n		Country:      common.GB,\n	},\n	Phone: &common.Phone{\n		CountryCode: \"1\",\n		Number:      \"415 555 2671\",\n	},\n}\nrequest.Customer = &nas.CreateCustomerInstrumentRequest{Id: \"customer_id\"}\n\nresponse, err := api.Instruments.Create(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.AccountHolder;\nimport com.checkout.common.Address;\nimport com.checkout.common.CountryCode;\nimport com.checkout.common.Phone;\nimport com.checkout.instruments.create.CreateCustomerInstrumentRequest;\nimport com.checkout.instruments.create.CreateInstrumentResponse;\nimport com.checkout.instruments.create.CreateInstrumentTokenRequest;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nCreateInstrumentTokenRequest request = CreateInstrumentTokenRequest.builder()\n    .token(\"token\")\n    .accountHolder(AccountHolder.builder()\n        .firstName(\"FirstName\")\n        .lastName(\"LastName\")\n        .phone(Phone.builder().countryCode(\"1\").number(\"415 555 2671\").build())\n        .billingAddress(Address.builder()\n            .addressLine1(\"123 High St.\")\n            .addressLine2(\"Flat 456\")\n            .city(\"London\")\n            .state(\"GB\")\n            .zip(\"SW1A 1AA\")\n            .country(CountryCode.GB)\n            .build())\n        .build())\n    .customer(CreateCustomerInstrumentRequest.builder()\n        .id(\"customer_id\")\n        .build())\n    .build();\n\ntry {\n    CreateInstrumentResponse response = api.instrumentsClient().create(request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const instrument = await cko.instruments.create({\n		// infered type \"token\",\n		token: 'tok_bzi43qc6jeee5mmnfo4gnsnera', // Generated by Checkout.Frames\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\AccountHolder;\nuse Checkout\\Common\\Address;\nuse Checkout\\Common\\Country;\nuse Checkout\\Common\\Phone;\nuse Checkout\\Environment;\nuse Checkout\\Instruments\\Create\\CreateCustomerInstrumentRequest;\nuse Checkout\\Instruments\\Create\\CreateTokenInstrumentRequest;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Vault])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$phone = new Phone();\n$phone->country_code = \"+1\";\n$phone->number = \"415 555 2671\";\n\n$address = new Address();\n$address->address_line1 = \"123 High St.\";\n$address->address_line2 = \"Flat 456\";\n$address->city = \"London\";\n$address->State = \"GB\";\n$address->zip = \"SW1A 1AA\";\n$address->country = Country::$GB;\n\n$accountHolder = new AccountHolder();\n$accountHolder->first_name = \"John\";\n$accountHolder->last_name = \"Smith\";\n$accountHolder->phone = $phone;\n$accountHolder->billing_address = $address;\n\n$createCustomerInstrumentRequest = new CreateCustomerInstrumentRequest();\n$createCustomerInstrumentRequest->id = \"customer_id\";\n\n$request = new CreateTokenInstrumentRequest();\n$request->token = \"token\";\n$request->account_holder = $accountHolder;\n$request->customer = $createCustomerInstrumentRequest;\n\ntry {\n    $response = $api->getInstrumentsClient()->create($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.common.common import Phone, AccountHolder\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.instruments.instruments import CreateTokenInstrumentRequest, CreateCustomerInstrumentRequest\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.VAULT_INSTRUMENTS]) \n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\ncustomer = CreateCustomerInstrumentRequest()\ncustomer.email = 'email@docs.checkout.com'\ncustomer.name = 'Name'\ncustomer.default = True\ncustomer.phone = phone\n\naccount_holder = AccountHolder()\naccount_holder.first_name = 'First'\naccount_holder.last_name = 'Last'\naccount_holder.phone = phone\n\nrequest = CreateTokenInstrumentRequest()\nrequest.token = 'token'\nrequest.account_holder = account_holder\nrequest.customer = customer\n\ntry:\n    response = api.instruments.create(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n# Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n# Invalid authorization"
  /instruments/{id}:
    get:
      security:
        - OAuth:
            - vault
            - vault:instruments
        - ApiSecretKey: [ ]
      tags:
        - Instruments
      summary: Get instrument details
      operationId: getInstrumentDetails
      description: Retrieve the details of a payment instrument.
      parameters:
        - in: path
          name: id
          schema:
            type: string
            pattern: "^(src)_(\\w{26})$"
          required: true
          description: The instrument ID
      responses:
        '200':
          description: Instrument retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveInstrumentResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Instrument not found
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Instruments.Get;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Vault)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    GetInstrumentResponse response = await api.InstrumentsClient().Get(\"instrument_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Instruments.Get(\"instrument_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.instruments.get.GetCardInstrumentResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    // Or GetBankAccountInstrumentResponse\n    GetCardInstrumentResponse response = (GetCardInstrumentResponse) api.instrumentsClient().get(\"instrument_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}\n"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const instrument = await cko.instruments.get('src_udfsqsgpjykutgs26fiejgizau');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Vault])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getInstrumentsClient()->get(\"instrument_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.VAULT_INSTRUMENTS]) \n    .build()\n)\n\ntry:\n    response = api.instruments.get('instrument_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization\n"
    patch:
      tags:
        - Instruments
      security:
        - OAuth:
            - vault
            - vault:instruments
        - ApiSecretKey: [ ]
      summary: Update an instrument
      operationId: updateInstrument
      description: |
        Update the details of a payment instrument.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            pattern: '^(src_)[a-z0-9]{26}$'
          example: src_ubfj2q76miwundwlk72vxt2i7q
          description: The instrument ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateInstrumentRequest'
      responses:
        '200':
          description: Instrument updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateInstrumentResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Instrument not found or not associated with client
        '409':
          description: A concurrent update conflict occurred. Call the [Get customer details](/tag/Customers#operation/getCustomerDetails) to retrieve the latest state before retrying.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
    
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\nusing Checkout.Instruments.Update;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Vault)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nUpdateInstrumentRequest request = new UpdateCardInstrumentRequest\n{\n    ExpiryMonth = 10,\n    ExpiryYear = 2027,\n    Name = \"FirstName LastName\",\n    AccountHolder = new AccountHolder()\n    {\n        FirstName = \"FirstName\",\n        LastName = \"LastName\",\n        BillingAddress = new Address()\n        {\n            AddressLine1 = \"123 High St.\",\n            AddressLine2 = \"Flat 456\",\n            City = \"London\",\n            State = \"GB\",\n            Zip = \"SW1A 1AA\",\n            Country = CountryCode.GB\n        },\n        Phone = new Phone() {Number = \"4155552671\", CountryCode = \"1\"}\n    },\n    Customer = new UpdateCustomerRequest() {Id = \"cus_y3oqhf46pyzuxjbcn2giaqnb44\", Default = true}\n};\n\ntry\n{\n    UpdateInstrumentResponse response = await api.InstrumentsClient().Update(\"instrument_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/instruments/nas\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := nas.NewUpdateCardInstrumentRequest()\nrequest.ExpiryMonth = 10\nrequest.ExpiryYear = 2027\nrequest.Name = \"name\"\nrequest.Customer = &common.UpdateCustomerRequest{\n	Id:      \"customer_id\",\n	Default: true,\n}\nrequest.AccountHolder = &common.AccountHolder{\n	FirstName: \"FirstName\",\n	LastName:  \"LastName\",\n	BillingAddress: &common.Address{\n		AddressLine1: \"123 High St.\",\n		AddressLine2: \"Flat 456\",\n		City:         \"London\",\n		State:        \"GB\",\n		Zip:          \"SW1A 1AA\",\n		Country:      common.GB,\n	},\n	Phone: &common.Phone{\n		CountryCode: \"1\",\n		Number:      \"415 555 2671\",\n	},\n}\n\nresponse, err := api.Instruments.Update(\"instrument_id\", request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.AccountHolder;\nimport com.checkout.common.Address;\nimport com.checkout.common.CountryCode;\nimport com.checkout.common.Phone;\nimport com.checkout.common.UpdateCustomerRequest;\nimport com.checkout.instruments.update.UpdateInstrumentCardRequest;\nimport com.checkout.instruments.update.UpdateInstrumentResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nUpdateInstrumentCardRequest updateRequest = UpdateInstrumentCardRequest.builder()\n    .expiryMonth(10)\n    .expiryYear(2027)\n    .name(\"name\")\n    .customer(UpdateCustomerRequest.builder().id(\"customer_id\").defaultCustomer(true).build())\n    .accountHolder(AccountHolder.builder()\n        .firstName(\"FirstName\")\n        .lastName(\"LastName\")\n        .phone(Phone.builder().countryCode(\"+1\").number(\"415 555 2671\").build())\n        .billingAddress(Address.builder()\n            .addressLine1(\"123 High St.\")\n            .addressLine2(\"Flat 456\")\n            .city(\"London\")\n            .state(\"GB\")\n            .zip(\"SW1A 1AA\")\n            .country(CountryCode.GB)\n            .build())\n        .build())\n    .build();\n\ntry {\n    UpdateInstrumentResponse response = api.instrumentsClient().update(\"instrument_id\", updateRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const instrumentResponse = await cko.instruments.update('src_udfsqsgpjykutgs26fiejgizau', {\n		expiry_year: 2030,\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\Instruments\\Update\\UpdateTokenInstrumentRequest;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Vault])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new UpdateTokenInstrumentRequest();\n$request->token = \"new_token\";\n\ntry {\n    $response = $api->getInstrumentsClient()->update(\"instrument_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.common.common import Phone, Address, AccountHolder, UpdateCustomerRequest\nfrom checkout_sdk.common.enums import Country\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.instruments.instruments import UpdateCardInstrumentRequest\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.VAULT_INSTRUMENTS]) \n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\naddress = Address()\naddress.address_line1 = '123 High St.'\naddress.address_line2 = 'Flat 456'\naddress.city = 'London'\naddress.state = 'GB'\naddress.zip = 'SW1A 1AA'\naddress.country = Country.GB\n\naccount_holder = AccountHolder()\naccount_holder.first_name = \"First\"\naccount_holder.last_name = \"Last\"\naccount_holder.phone = phone\naccount_holder.billing_address = address\n\nupdate_customer_request = UpdateCustomerRequest()\nupdate_customer_request.id = \"customer_id\"\nupdate_customer_request.default = True\n\nrequest = UpdateCardInstrumentRequest()\nrequest.name = 'New Name'\nrequest.expiry_year = 2027\nrequest.expiry_month = 10\nrequest.account_holder = account_holder\nrequest.customer = update_customer_request\n\ntry:\n    response = api.instruments.update('instrument_id', request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
    delete:
      tags:
        - Instruments
      security:
        - OAuth:
            - vault
            - vault:instruments
        - ApiSecretKey: [ ]
      summary: Delete an instrument
      operationId: deleteInstrument
      description: |
        Delete a payment instrument.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            pattern: '^(src_)[a-z0-9]{26}$'
          example: src_ubfj2q76miwundwlk72vxt2i7q
          description: The ID of the payment instrument to be deleted
      responses:
        '204':
          description: Instrument deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: Instrument not found or not associated with client
        '409':
          description: A concurrent update conflict occurred. Retry the request.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Vault)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    EmptyResponse response = await api.InstrumentsClient().Delete(\"instrument_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Instruments.Delete(\"instrument_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.EmptyResponse;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    EmptyResponse response = api.instrumentsClient().delete(\"instrumentId\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const deleteOutcome = await cko.instruments.delete(instrument.id);\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Vault])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getInstrumentsClient()->delete(\"instrument_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.VAULT_INSTRUMENTS]) \n    .build()\n)\n\ntry:\n    response = api.instruments.delete('instrument_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /issuing/access/connect/token:
    post:
      tags:
      - Cardholder access tokens
      summary: Request an access token
      description: OAuth endpoint to exchange your access key ID and access key secret
        for an access token.
      security:
      - OAuth: []
      operationId: requestCardholderAccessToken
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                  - client_credentials
                  example: client_credentials
                client_id:
                  type: string
                  description: Access key ID.
                client_secret:
                  type: string
                  description: Access key secret.
                cardholder_id:
                  $ref: '#/components/schemas/IssuingCardholderId'
                single_use:
                  type: boolean
                  description: 'Specifies if the request is for a single-use token.
    
                    Single-use tokens are required for sensitive endpoints.
    
                    '
                  example: true
            examples:
              example-1:
                value:
                  grant_type: client_credentials
                  client_id: ack_clckqmmnyfiupexjew7shh5ahe
                  client_secret: Pmg36sDWQ9WxtPR3
                  cardholder_id: crh_d3ozhf43pcq2xbldn2g45qnb44
                  single_use: true
      responses:
        '200':
          description: Cardholder access token retrieved successfully
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  access_token:
                    type: string
                    example: 2YotnFZFEjr1zCsicMWpAA
                  token_type:
                    type: string
                    example: example
                  expires_in:
                    type: number
                    description: The remaining time the access token is valid for, in
                      seconds.
                    example: 3600
                  scope:
                    type: string
                    example: issuing:card-management-write issuing:card-management-read
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  error:
                    type: string
                    enum:
                    - invalid_request
                    - invalid_client
                    - invalid_grant
                    - unauthorized_client
                    - unsupported_grant_type
                    - invalid_scope
        '415':
          description: Unsupported Media Type
        '429':
          description: Too Many Requests
        '406':
          description: Not Acceptable
  /issuing/cardholders:
    post:
      tags:
      - Cardholders
      summary: Create a cardholder
      description: Create a new cardholder that you can <a href="https://www.checkout.com/docs/card-issuing/issue-a-card">issue
        a card</a> to at a later point.
      security:
      - OAuth:
        - issuing:card-management-write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-cardholder-request'
      operationId: createCardholder
      responses:
        '201':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Cardholder created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-cardholder-response'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/cardholders/{cardholderId}:
    get:
      tags:
      - Cardholders
      summary: Get cardholder details
      description: Retrieve the details for a cardholder you created previously.
      security:
      - OAuth:
        - issuing:card-management-read
      operationId: getCardholder
      parameters:
      - in: path
        name: cardholderId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardholderId'
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Cardholder retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-cardholder-response'
        '401':
          description: Unauthorized
        '404':
          description: Cardholder not found
        '500':
          description: Internal Server Error
    patch:
      tags:
      - Cardholders
      summary: Update a cardholder
      description: Updates the details of an existing cardholder.
      security:
      - OAuth:
        - issuing:card-management-write
      parameters:
      - in: path
        name: cardholderId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardholderId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-cardholder-request'
      operationId: updateCardholder
      responses:
        '200':
          description: Cardholder updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-cardholder-response'
        '401':
          description: Unauthorized
        '404':
          description: Cardholder not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/cardholders/{cardholderId}/cards:
    get:
      tags:
      - Cardholders
      summary: Get a cardholder's cards
      description: 'Retrieves the cards issued to the specified cardholder.
    
    
        Card credentials are not returned in the response.
    
        The response is limited to a maximum of 150 cards.
    
        '
      security:
      - OAuth:
        - issuing:card-management-read
      parameters:
      - in: path
        name: cardholderId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardholderId'
      - in: query
        name: statuses
        schema:
          type: string
        description: 'The card statuses to filter the results by.
    
          Cards matching any status in this list are returned. If the list is empty, all
          cards are returned.
    
          Format - Comma-separated list
    
          '
        example: active,suspended
        required: false
      operationId: getCardholderCards
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Cardholder's cards retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-cardholder-cards-response'
        '401':
          description: Unauthorized
        '404':
          description: Cardholder not found
        '500':
          description: Internal Server Error
  /issuing/cards:
    post:
      tags:
      - Cards
      summary: Create a card
      description: Creates a physical or virtual card and issues it to the specified cardholder.
      security:
      - OAuth:
        - issuing:card-management-write
      operationId: createCard
      parameters:
      - $ref: '#/components/parameters/IssuingCkoIdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-card-request'
      responses:
        '201':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Card created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-card-response'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /issuing/cards/{cardId}:
    get:
      tags:
      - Cards
      summary: Get card details
      description: 'Retrieves the details for a card you issued previously.
    
    
        The card''s credentials are not returned in the response.
    
        '
      security:
      - OAuth:
        - issuing:card-management-read
      operationId: getCard
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Card retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-card-response'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '500':
          description: Internal Server Error
    patch:
      tags:
      - Cards
      summary: Update card details
      description: 'Update the details of an issued card.
    
    
        Only the fields for which you provide values will be updated. If you pass `null`,
        the existing value will be removed.
    
    
        To retrieve encrypted credentials after updating the card, set the `return-encrypted-cvv`
        header to `true` and provide an RSA public key in the `Encryption-Key` header.
    
        '
      security:
      - OAuth:
        - issuing:card-management-write
      operationId: updateCard
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      - in: header
        name: return-encrypted-cvv
        description: 'Set to `true` to retrieve the card''s encrypted credentials in the
          response. Requires an RSA public key to be provided in the `Encryption-Key`
          header.
    
          '
        schema:
          type: boolean
          example: true
      - in: header
        name: Encryption-Key
        description: 'The RSA public key used to encrypt returned credentials. Required
          when the `return-encrypted-cvv` header is set to `true`.
    
    
          Provide the public key with the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC
          KEY-----` headers and any newline characters removed, encoded as Base64.
    
          '
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-card-request'
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Card updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-card-response'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '422':
          description: 'Invalid data was sent.
    
    
            Possible `error_codes`:
    
            - `encryption_key_required` — `return-encrypted-cvv` header was set to `true`
            but no `Encryption-Key` header was provided.
    
            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/cards/{cardId}/3ds-enrollment:
    post:
      tags:
      - Cards
      summary: Enroll a card in 3DS
      description: 'Enrolls a card in <a href="https://www.checkout.com/docs/risk-management/3d-secure">3D
        Secure</a> (3DS). Additional information is requested from the cardholder through
        a 3DS challenge when performing a transaction.
    
    
        Two-factor authentication (2FA) is supported. For maximum security, we recommend
        using a combination of a one-time password (OTP) sent via SMS, along with a password
        or question and answer security pair.
    
        '
      security:
      - OAuth:
        - issuing:card-management-write
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/security_question'
              - $ref: '#/components/schemas/Password'
      operationId: enrollCard
      responses:
        '202':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: 3DS card enrollment completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/3ds-enrollment-post-response'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
    patch:
      tags:
      - Cards
      summary: Update a card's 3DS details
      description: Updates a card's 3DS enrollment details. At least one of the fields
        is required.
      security:
      - OAuth:
        - issuing:card-management-write
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - type: object
                title: security_question
                properties:
                  security_pair:
                    $ref: '#/components/schemas/3dsSecurityPair'
                  locale:
                    $ref: '#/components/schemas/3dsLocale'
                  phone_number:
                    $ref: '#/components/schemas/3dsPhoneNumber'
              - type: object
                title: password
                properties:
                  password:
                    $ref: '#/components/schemas/3dsPassword'
                  locale:
                    $ref: '#/components/schemas/3dsLocale'
                  phone_number:
                    $ref: '#/components/schemas/3dsPhoneNumber'
      operationId: updateCardEnrollmentDetails
      responses:
        '202':
          description: Card 3DS details updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/3ds-enrollment-patch-response'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
    get:
      tags:
      - Cards
      summary: Get a card's 3DS enrollment details
      description: Retrieves a card's 3DS enrollment details.
      security:
      - OAuth:
        - issuing:card-management-read
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      operationId: getCardEnrollmentDetails
      responses:
        '200':
          description: Card 3DS enrollment details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/3ds-enrollment-get-response'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '500':
          description: Internal Server Error
  /issuing/cards/{cardId}/activate:
    post:
      tags:
      - Cards
      summary: Activate a card
      description: "Activates an `inactive` or `suspended` card so that incoming authorizations\
        \ can be approved. \n\nActivating a renewed card will schedule the parent card\
        \ for revocation the following day, and transfer all configurations to the newly\
        \ activated card. This includes 3DS enrollment, card controls, control profiles\
        \ and tokenisation.\n"
      security:
      - OAuth:
        - issuing:card-management-write
      operationId: activateCard
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Card activated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/activate-card-response'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
  /issuing/cards/{cardId}/credentials:
    get:
      tags:
      - Cards
      summary: Get the card credentials
      description: Retrieves the credentials for a card you issued previously.
      security:
      - OAuth:
        - issuing:card-management-read
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      - in: query
        name: credentials
        required: false
        schema:
          type: string
          enum:
          - number
          - cvc2
          - number,cvc2
          example: number
          description: 'The credentials to retrieve.
    
    
            You can either specify `number` or `cvc2` to retrieve the specified credential,
            or both as a comma-separated list. For example, to retrieve both the CVC and
            PAN:
    
    
            ```
    
            "credentials": "number, cvc2"
    
            ```
    
            '
      operationId: getCardCredentials
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Card credentials retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credentials'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /issuing/cards/{cardId}/renew:
    post:
      tags:
      - Cards
      summary: Renew a card
      description: "Renew an `active`, `inactive`, or `suspended` card. A card cannot\
        \ be renewed if it is `revoked`, `expired`, or is a single use virtual card. \n\
        \nThe renewed card will have a different, nonconsecutive number (PAN), expiry\
        \ date, and CVV. \n\nAny configuration set on the parent card will be copied to\
        \ the renewed card when the renewed card is activated. This includes 3DS enrollment,\
        \ card controls, control profiles, and tokenisation.\n"
      security:
      - OAuth:
        - issuing:card-management-write
      operationId: renewCard
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/physical_card'
              - $ref: '#/components/schemas/virtual_card'
      responses:
        '200':
          description: Card renewed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/renew-card-response'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '415':
          description: Unsupported Media Type
        '429':
          description: Too Many Requests
        '406':
          description: Not Acceptable
  /issuing/cards/{cardId}/revoke:
    post:
      tags:
      - Cards
      summary: Revoke a card
      description: 'Revokes an `inactive`, `active`, or `suspended` card to permanently
        decline all incoming authorizations.
    
    
        This is a permanent action. Revoked cards cannot be reactivated.
    
        '
      security:
      - OAuth:
        - issuing:card-management-write
      operationId: revokeCard
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/revoke-card-request'
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Card revoked successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/revoke-card-response'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
  /issuing/cards/{cardId}/suspend:
    post:
      tags:
      - Cards
      summary: Suspend a card
      description: 'Suspends an `active` or `inactive` card to temporarily decline all
        incoming authorizations.
    
    
        A `suspended` card can be reactivated.
    
        '
      security:
      - OAuth:
        - issuing:card-management-write
      operationId: suspendCard
      parameters:
      - in: path
        name: cardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/suspend-card-request'
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Card suspended successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/suspend-card-response'
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
  /issuing/controls:
    post:
      tags:
      - Controls
      summary: Create a control
      description: Creates a control and applies it to the specified target.
      security:
      - OAuth:
        - issuing:controls-write
      parameters:
      - $ref: '#/components/parameters/IssuingCkoIdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-control-request'
      operationId: createControl
      responses:
        '201':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Control created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-control-response'
        '401':
          description: Unauthorized
        '404':
          description: Target not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
    get:
      tags:
      - Controls
      summary: Get controls by target
      description: Retrieves a list of spending controls applied to the specified target.
      security:
      - OAuth:
        - issuing:controls-read
      parameters:
      - in: query
        name: target_id
        required: true
        schema:
          $ref: '#/components/schemas/IssuingTargetId'
      operationId: getControlByTarget
      responses:
        '200':
          description: Target's controls retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-controls-array-response'
        '401':
          description: Unauthorized
        '404':
          description: Target not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/controls/{controlId}:
    get:
      tags:
      - Controls
      summary: Get control details
      description: Retrieves the details of an existing control.
      security:
      - OAuth:
        - issuing:controls-read
      parameters:
      - in: path
        name: controlId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlId'
      - in: query
        name: cardId
        required: false
        description: The unique identifier for the card you want to get the remaining
          cascading velocity control for.
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      operationId: getControl
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Control retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-control-response'
        '401':
          description: Unauthorized
        '404':
          description: Control not found
        '500':
          description: Internal Server Error
    put:
      tags:
      - Controls
      summary: Update a control
      description: Updates an existing control.
      security:
      - OAuth:
        - issuing:controls-write
      parameters:
      - in: path
        name: controlId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/update-control-request-mcc-limit'
              - $ref: '#/components/schemas/update-control-request-mid-limit'
              - $ref: '#/components/schemas/update-control-request-velocity-limit'
      operationId: updateControl
      responses:
        '200':
          description: Control updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-control-response'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '404':
          description: Control not found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
    delete:
      tags:
      - Controls
      summary: Remove a control
      description: 'Removes an existing control from the target it was applied to.
    
    
        If you want to reapply an equivalent control to the target, you must create a
        new control.
    
        '
      security:
      - OAuth:
        - issuing:controls-write
      parameters:
      - in: path
        name: controlId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlId'
      operationId: deleteControl
      responses:
        '200':
          description: Control deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/remove-control-response'
        '401':
          description: Unauthorized
        '404':
          description: Control not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /issuing/controls/control-groups:
    post:
      tags:
      - Control groups
      summary: Create a control group
      description: Creates a control group and applies it to the specified target.
      security:
      - OAuth:
        - issuing:controls-write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-control-group-request'
      operationId: createControlGroup
      responses:
        '201':
          description: Control group created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-control-group-response'
        '401':
          description: Unauthorized
        '404':
          description: Target not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
    get:
      tags:
      - Control groups
      summary: Get a target's control groups
      description: Retrieves a list of control groups applied to the specified target.
      security:
      - OAuth:
        - issuing:controls-read
      parameters:
      - in: query
        name: target_id
        required: true
        schema:
          $ref: '#/components/schemas/IssuingTargetId'
      operationId: getControlGroupByTarget
      responses:
        '200':
          description: Target's control groups retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-control-groups-array-response'
        '401':
          description: Unauthorized
        '404':
          description: Target not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/controls/control-groups/{controlGroupId}:
    get:
      tags:
      - Control groups
      summary: Get control group details
      description: Retrieves the details of a control group you created previously.
      security:
      - OAuth:
        - issuing:controls-read
      parameters:
      - in: path
        name: controlGroupId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlGroupId'
      operationId: getControlGroup
      responses:
        '200':
          description: Control group retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-control-group-response'
        '401':
          description: Unauthorized
        '404':
          description: Control group not found
        '500':
          description: Internal Server Error
    delete:
      tags:
      - Control groups
      summary: Remove a control group
      description: 'Removes the control group and all the controls it contains.
    
    
        If you want to reapply an equivalent control group to the card, you''ll need to
        create a new control group.
    
        '
      security:
      - OAuth:
        - issuing:controls-write
      parameters:
      - in: path
        name: controlGroupId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlGroupId'
      operationId: deleteControlGroup
      responses:
        '200':
          description: Control group deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/remove-control-group-response'
        '401':
          description: Unauthorized
        '404':
          description: Control group not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /issuing/controls/control-profiles:
    post:
      tags:
      - Control profiles
      summary: Create a control profile
      description: Creates a control profile.
      security:
      - OAuth:
        - issuing:controls-write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-control-profile-request'
      operationId: createControlProfile
      responses:
        '201':
          description: Control profile created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-update-control-profile-response'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
    get:
      tags:
      - Control profiles
      summary: Get all control profiles
      description: Retrieves a list of control profiles for the currently authenticated
        client, or for a specific card if a card ID is provided.
      security:
      - OAuth:
        - issuing:controls-read
      parameters:
      - in: query
        name: target_id
        required: false
        schema:
          $ref: '#/components/schemas/IssuingCardId'
      operationId: getControlProfilesByTarget
      responses:
        '200':
          description: Control profiles retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-control-profiles-client-response'
        '401':
          description: Unauthorized
        '404':
          description: Client not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/controls/control-profiles/{controlProfileId}:
    get:
      tags:
      - Control profiles
      summary: Get control profile details
      description: Retrieves the details of an existing control profile.
      security:
      - OAuth:
        - issuing:controls-read
      parameters:
      - in: path
        name: controlProfileId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlProfileId'
      operationId: getControlProfile
      responses:
        '200':
          description: Control profile retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-update-control-profile-response'
        '401':
          description: Unauthorized
        '404':
          description: Control profile not found
        '500':
          description: Internal Server Error
    patch:
      tags:
      - Control profiles
      summary: Update a control profile
      description: Update the control profile
      security:
      - OAuth:
        - issuing:controls-write
      parameters:
      - in: path
        name: controlProfileId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlProfileId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-control-profile-request'
      operationId: updateControlProfile
      responses:
        '200':
          description: Control profile updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-update-control-profile-response'
        '401':
          description: Unauthorized
        '404':
          description: Control profile not found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
    delete:
      tags:
      - Control profiles
      summary: Remove a control profile
      description: Removes the control profile. A control profile cannot be removed if
        it is used by a control.
      security:
      - OAuth:
        - issuing:controls-write
      parameters:
      - in: path
        name: controlProfileId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlProfileId'
      operationId: deleteControlProfile
      responses:
        '200':
          description: Control profile deleted successfully
          content: {}
        '401':
          description: Unauthorized
        '404':
          description: Control profile not found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
  /issuing/controls/control-profiles/{controlProfileId}/add/{targetId}:
    post:
      tags:
      - Control profiles
      summary: Add target to control profile
      description: Adds a target to an existing control profile.
      security:
      - OAuth:
        - issuing:controls-write
      parameters:
      - in: path
        name: controlProfileId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlProfileId'
      - in: path
        name: targetId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingTargetIdToAddToControlProfile'
      operationId: addTargetToControlProfile
      responses:
        '200':
          description: Target added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-control-profile-target-response'
        '401':
          description: Unauthorized
        '404':
          description: Control profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingNotFoundError'
        '500':
          description: Internal Server Error
  /issuing/controls/control-profiles/{controlProfileId}/remove/{targetId}:
    post:
      tags:
      - Control profiles
      summary: Remove target from control profile
      description: Removes a target from an existing control profile.
      security:
      - OAuth:
        - issuing:controls-write
      parameters:
      - in: path
        name: controlProfileId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingControlProfileId'
      - in: path
        name: targetId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingTargetIdToRemoveFromControlProfile'
      operationId: removeTargetFromControlProfile
      responses:
        '200':
          description: Target removed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/remove-control-profile-target-response'
        '401':
          description: Unauthorized
        '404':
          description: Control profile not found
        '500':
          description: Internal Server Error
  /issuing/digital-cards/{digitalCardId}:
    get:
      security:
      - OAuth:
        - issuing:card-management-read
      tags:
      - Digital cards
      summary: Get digital card details
      description: 'Retrieves the details for a digital card.
    
        '
      operationId: getDigitalCard
      parameters:
      - in: path
        name: digitalCardId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingDigitalCardId'
      responses:
        '200':
          headers:
            cko-request-id:
              schema:
                $ref: '#/components/schemas/cko-request-id'
          description: Digital card retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-digital-card-response'
        '401':
          description: Unauthorized
        '404':
          description: Digital card not found
        '406':
          description: Not Acceptable
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
  /issuing/disputes:
    post:
      tags:
      - Issuing disputes
      parameters:
      - $ref: '#/components/parameters/IssuingCkoIdempotencyKeyRequired'
      summary: Create an Issuing dispute
      description: '<span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0);
        background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Create and submit an [Issuing dispute](https://www.checkout.com/docs/card-issuing/manage-cardholder-transactions/manage-issuing-disputes)
        for an Issuing transaction. The dispute is sent to the card scheme for processing.
        For full guidance, see [Manage Issuing disputes](https://www.checkout.com/docs/card-issuing/manage-cardholder-transactions/manage-issuing-disputes).
    
        The transaction must already be cleared and not refunded.
    
        '
      security:
      - OAuth:
        - issuing:disputes-write
      operationId: createDispute
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-dispute-request'
      responses:
        '200':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Dispute already exists for this transaction/presentment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-dispute-response'
        '201':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Dispute created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-dispute-response'
        '401':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Unauthorized Request
        '422':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Dispute is ineligble
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '429':
          description: Too Many Requests
        '415':
          description: Unsupported Media Type
        '406':
          description: Not Acceptable
  /issuing/disputes/{disputeId}:
    get:
      operationId: getDispute
      tags:
      - Issuing disputes
      summary: Get an Issuing dispute
      description: '<span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0);
        background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Retrieve the details of an [Issuing dispute](https://www.checkout.com/docs/card-issuing/manage-cardholder-transactions/manage-issuing-disputes).
    
        '
      security:
      - OAuth:
        - issuing:disputes-read
      parameters:
      - in: path
        name: disputeId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingDisputeId'
      responses:
        '200':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-dispute-response'
        default:
          description: Issuing dispute response retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-dispute-response'
        '401':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Unauthorized Request
        '404':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute not found
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '415':
          description: Unsupported Media Type
        '406':
          description: Not Acceptable
  /issuing/disputes/{disputeId}/amend:
    post:
      operationId: amendDispute
      tags:
      - Issuing disputes
      summary: Amend an Issuing dispute
      description: '<span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0);
        background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Amend an [Issuing dispute](https://www.checkout.com/docs/card-issuing/manage-cardholder-transactions/manage-issuing-disputes)
    
        that has been blocked from proceeding. This endpoint is used when the dispute''s
        submission
    
        could not go through — either because the DR team requested changes before sending
        to the
    
        card scheme, or because the card scheme returned the submission for a fixable
        reason (in
    
        which case the DR team reviews the rejection and instructs the consumer via `action_details`).
    
    
        This endpoint is only applicable when `status` is `action_required` and the `status_reason`
        is one of `chargeback_change_requested`, `chargeback_evidence_invalid_or_insufficient`,
        `escalation_change_requested`,`prearbitration_evidence_invalid_or_insufficient`.
        The `_links.amend`
    
        link in the GET response is present whenever an amendment is required.
    
    
        Check `action_details.instructions` in `GET /issuing/disputes/{id}` for the specific
        changes
    
        required before calling this endpoint.
    
    
        ### Chargeback stage (`status_reason: chargeback_change_requested`, `chargeback_evidence_invalid_or_insufficient`)
    
    
        Address changes required before the chargeback can proceed. This covers two scenarios:
    
    
        - **issuing rejection:** The Disputes Resolution team reviews the submission and
        rejects providing corrective instructions via `action_details`.
    
    
        - **Scheme rejection:** The card scheme returned the chargeback for a fixable
        reason.
    
    
        ### Escalation stage (`status_reason: escalation_change_requested`, `prearbitration_evidence_invalid_or_insufficient`)
    
    
        Address changes required before the escalation (pre-arbitration or arbitration)
        can proceed.
    
        The same two scenarios apply as at the chargeback stage. `reason_change_justification`
    
        is **required** when changing the `reason` at this stage.
    
        '
      security:
      - OAuth:
        - issuing:disputes-write
      parameters:
      - $ref: '#/components/parameters/IssuingCkoIdempotencyKeyRequired'
      - in: path
        name: disputeId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingDisputeId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/amend-dispute-request'
            examples:
              chargeback_change:
                summary: Amend chargeback — DR team or scheme requested changes
                value:
                  reason: '4853'
                  evidence:
                  - name: cardholder_signed_declaration.pdf
                    content: JVBERi0xLjQKJeLjz9M...
                    description: Signed cardholder declaration as requested by DR team.
                  action_response: Updated reason to 4853 as requested. New evidence meets
                    scheme requirements.
              chargeback_change_fraud:
                summary: Amend chargeback — fraud reason code (fraud_details required)
                value:
                  reason: '4837'
                  fraud_details:
                    fraud_type: card_not_present_fraud
                    description: Cardholder confirmed they did not make any online purchases
                      on this date.
                  evidence:
                  - name: notarised_fraud_affidavit.pdf
                    content: JVBERi0xLjQKJeLjz9M...
                    description: Notarised fraud affidavit as requested by DR team.
                  action_response: Notarised affidavit provided as requested.
              escalation_change:
                summary: Amend escalation — reason code change (reason_change_justification
                  required)
                value:
                  reason: '4837'
                  reason_change_justification: The cardholder's sworn statement confirms
                    this was an unauthorized transaction. Reason code 4837 (No Cardholder
                    Authorization) more accurately reflects the fraud nature and is required
                    for pre-arbitration at this stage.
                  evidence:
                  - name: fraud_affidavit.pdf
                    content: JVBERi0xLjQKJeLjz9M...
                    description: Completed fraud affidavit signed by cardholder.
                  fraud_details:
                    fraud_type: counterfeit_card
                    description: Cardholder's PIN was used without their knowledge, likely
                      via skimming at the point of sale.
                  action_response: Reason updated to 4837 per DR team guidance. Fraud
                    affidavit attached.
      responses:
        '200':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Your corrections were accepted; the dispute continues processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-dispute-response'
        '401':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Unauthorized Request
        '404':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute not found
        '409':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: This dispute is not in a state that accepts corrections (e.g. not
            action_required).
        '422':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: 'Request is missing required information — for example, `fraud_details`
            for a fraud reason code,
    
            or `reason_change_justification` when changing the reason code at the escalation
            stage.
    
            '
  /issuing/disputes/{disputeId}/cancel:
    post:
      operationId: cancelDispute
      tags:
      - Issuing disputes
      summary: Cancel an Issuing dispute
      description: '<span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0);
        background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Cancel an [Issuing dispute](https://www.checkout.com/docs/card-issuing/manage-cardholder-transactions/manage-issuing-disputes).
    
        If you decide not to proceed with a dispute, you can cancel it either:
    
        * While the dispute `status` is `processing` and `status_reason` is `chargeback_pending`
        or `chargeback_processed`
    
        For more information, see <a href="https://www.checkout.com/docs/card-issuing/manage-issuing-transactions/manage-issuing-disputes#Cancel_a_dispute"
        target="_blank">Cancel a dispute</a>.
    
        '
      security:
      - OAuth:
        - issuing:disputes-write
      parameters:
      - $ref: '#/components/parameters/IssuingCkoIdempotencyKeyRequired'
      - in: path
        name: disputeId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingDisputeId'
      responses:
        '202':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute cancellation requested successfully
          content: {}
        '401':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Unauthorized Request
        '404':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute not found
        '409':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute cannot be canceled
        '422':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Request missing required information
  /issuing/disputes/{disputeId}/escalate:
    post:
      operationId: escalateDispute
      tags:
      - Issuing disputes
      summary: Escalate an Issuing dispute
      description: '<span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0);
        background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Escalate an [Issuing dispute](https://www.checkout.com/docs/card-issuing/manage-cardholder-transactions/manage-issuing-disputes)
        to pre-arbitration or arbitration.
    
        '
      security:
      - OAuth:
        - issuing:disputes-write
      parameters:
      - $ref: '#/components/parameters/IssuingCkoIdempotencyKeyRequired'
      - in: path
        name: disputeId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingDisputeId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/escalate-dispute-request'
            example:
              justification: The cardholder maintains that the goods were not received.
              amount: 100
              reason_change:
                reason: '4837'
                justification: Reason changed due to evidence from the acquirer.
              additional_evidence:
              - name: evidence.pdf
                content: c29tZSBiYXNlNjQgZGF0YQ==
                description: Goods were not received.
      responses:
        '202':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute escalation requested successfully
          content: {}
        '401':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Unauthorized Request
        '404':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute not found
        '409':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute cannot be escalated
        '422':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Request missing required information
  /issuing/disputes/{disputeId}/submit:
    post:
      operationId: submitDispute
      tags:
      - Issuing disputes
      summary: Submit an Issuing dispute
      deprecated: true
      description: '<span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0);
        background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Use the <a target="_blank" href="https://api-reference.checkout.com/tag/Issuing-disputes#operation/createDispute">Create
        an Issuing dispute</a> endpoint instead to create and submit a dispute in a single
        step.
    
    
        You can also use the <a target="_blank" href="https://api-reference.checkout.com/tag/Issuing-disputes#operation/amendDispute">Amend</a>
        endpoint to submit changes if the dispute status is `action_required`.
    
        This endpoint may still be used to re-submit after a rejected submission or to
        re-attempt an escalation; existing clients will receive advance communication
        when the new re-open flow is available.
    
        '
      security:
      - OAuth:
        - issuing:disputes-write
      parameters:
      - $ref: '#/components/parameters/IssuingCkoIdempotencyKeyRequired'
      - in: path
        name: disputeId
        required: true
        schema:
          $ref: '#/components/schemas/IssuingDisputeId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/submit-dispute-request'
      responses:
        '200':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-dispute-response'
        '401':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Unauthorized Request
        '404':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute not found
        '409':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Issuing dispute cannot be submitted
        '422':
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
          description: Request missing required information
  /issuing/simulate/authorizations:
    post:
      operationId: simulateAuthorization
      tags:
      - Card testing
      summary: Simulate authorization
      description: Simulate an authorization request with a card you issued previously.
      security:
      - OAuth:
        - issuing:transactions-write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateAuthorizationRequest'
            examples:
              Purchase - Authorization:
                value:
                  card:
                    id: crd_fa6psq242dcd6fdn5gifcq1491
                    expiry_month: 5
                    expiry_year: 2025
                  transaction:
                    type: purchase
                    amount: 2500
                    currency: GBP
                    merchant:
                      category_code: '7399'
              Purchase - Pre-authorization:
                value:
                  card:
                    id: crd_fa6psq242dcd6fdn5gifcq1491
                    expiry_month: 5
                    expiry_year: 2025
                  transaction:
                    type: purchase
                    amount: 2500
                    currency: GBP
                    merchant:
                      category_code: '7399'
                    authorization_type: pre_authorization
      responses:
        '201':
          description: Authorization processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateAuthorizationResponse'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/simulate/authorizations/{id}/authorizations:
    post:
      operationId: simulateIncrementalAuthorization
      tags:
      - Card testing
      summary: Simulate incrementing an authorization
      security:
      - OAuth:
        - issuing:transactions-write
      description: 'Simulate an incremental authorization request for an existing approved
        transaction.
    
    
        Incremental authorizations increase the total authorized amount of the transaction.
        For example, adding a restaurant bill to an existing hotel booking.
    
        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateIncrementalAuthorizationRequest'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          $ref: '#/components/schemas/IssuingTransactionId'
      responses:
        '201':
          description: Authorization processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateIncrementalAuthorizationResponse'
        '401':
          description: Unauthorized
        '404':
          description: Authorization not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/simulate/authorizations/{id}/presentments:
    post:
      operationId: simulatePresentment
      tags:
      - Card testing
      summary: Simulate clearing
      description: Simulate the clearing of an existing approved authorization.
      security:
      - OAuth:
        - issuing:transactions-write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PresentmentRequest'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          $ref: '#/components/schemas/IssuingTransactionId'
      responses:
        '202':
          description: Presentment accepted
          content: {}
        '401':
          description: Unauthorized
        '404':
          description: Authorization not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/simulate/authorizations/{id}/refunds:
    post:
      operationId: simulateRefund
      tags:
      - Card testing
      summary: Simulate refund
      description: Simulate the refund of an existing approved authorization, after it
        has been cleared.
      security:
      - OAuth:
        - issuing:transactions-write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateRefundRequest'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          $ref: '#/components/schemas/IssuingTransactionId'
      responses:
        '202':
          description: Refund accepted
          content: {}
        '401':
          description: Unauthorized
        '404':
          description: Presentment not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/simulate/authorizations/{id}/reversals:
    post:
      operationId: simulateReversal
      tags:
      - Card testing
      summary: Simulate reversal
      description: Simulate the reversal of an existing approved authorization.
      security:
      - OAuth:
        - issuing:transactions-write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReversalRequest'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          $ref: '#/components/schemas/IssuingTransactionId'
      responses:
        '201':
          description: Reversal processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReversalResponse'
        '401':
          description: Unauthorized
        '404':
          description: Authorization not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/simulate/oob/authentication:
    post:
      tags:
      - Out-of-band authentication simulator
      summary: Simulate an out-of-band (OOB) authentication request.
      description: Simulate a request to your back-end from an out-of-band (OOB) authentication
        provider.
      security:
      - OAuth:
        - issuing:card-management-read
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/simulate-oob-authentication-request'
      operationId: simulateOobAuthentication
      responses:
        '204':
          description: No content
        '401':
          description: Unauthorized
        '404':
          description: Card not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingValidationError'
        '500':
          description: Internal Server Error
  /issuing/transactions:
    get:
      tags:
      - Transactions
      summary: Get a list of transactions
      description: '<span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0);
        background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Returns a list of transactions based on the matching input parameters in reverse
        chronological order, with the most recent transactions shown first.
    
        '
      security:
      - OAuth:
        - issuing:transactions-read
      parameters:
      - in: query
        name: limit
        schema:
          type: integer
          minimum: 1
          maximum: 100
          format: int32
        description: The maximum number of transactions returned (between 10-100). The
          default is 10.
        required: false
      - in: query
        name: skip
        schema:
          type: integer
          minimum: 1
          maximum: 500
          format: int32
        description: The number of transactions to skip. The default is 0.
        required: false
      - in: query
        name: cardholder_id
        schema:
          $ref: '#/components/schemas/IssuingCardholderId'
        required: false
      - in: query
        name: card_id
        schema:
          $ref: '#/components/schemas/IssuingCardId'
        required: false
      - in: query
        name: entity_id
        schema:
          $ref: '#/components/schemas/IssuingEntityId'
        required: false
      - in: query
        name: status
        schema:
          type: string
          enum:
          - authorized
          - declined
          - canceled
          - cleared
          - refunded
          - disputed
        description: An optional filter for the transaction lifecycle status.
        required: false
        example: disputed
      - in: query
        name: from
        schema:
          type: string
          format: date-time
        description: An optional start date filter for transactions, in ISO 8601 format.
        required: false
        example: '2023-08-15T17:30:09Z'
      - in: query
        name: to
        schema:
          type: string
          format: date-time
        description: An optional end date filter for transactions, in ISO 8601 format.
        required: false
        example: '2023-09-15T17:30:09Z'
      operationId: getTransactions
      responses:
        '200':
          description: Transactions returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-transactions-response'
        '404':
          description: Not Found
        '401':
          description: Unauthorized
        '429':
          description: Too Many Requests
        '422':
          description: Matching parameters not valid.
  /issuing/transactions/{transactionId}:
    get:
      tags:
      - Transactions
      summary: Get a single transaction
      description: '<span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0);
        background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Get the details of a transaction using its ID.
    
        '
      security:
      - OAuth:
        - issuing:transactions-read
      parameters:
      - name: transactionId
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/IssuingTransactionId'
      operationId: getTransactionById
      responses:
        '200':
          description: Issuing transaction retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-transaction-response'
        default:
          description: Issuing transaction response retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-transaction-response'
        '401':
          description: Unauthorized
        '404':
          description: Transaction Not Found
        '406':
          description: Not Acceptable
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
  /metadata/card:
    post:
      tags:
        - Card metadata
      security:
        - OAuth:
            - vault:card-metadata
        - ApiSecretKey: [ ]
      summary: Get card metadata
      operationId: requestCardMetadata
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Returns a single metadata record for the card specified by the Primary Account Number (PAN), Bank Identification Number (BIN), token, or instrument supplied.
    
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CardMetadataRequest'
            examples:
              card:
                value:
                  source:
                    type: card
                    number: '4539467987109256'
                  format: basic
              bin:
                value:
                  source:
                    type: bin
                    bin: '424242'
                  format: card_payouts
              token:
                value:
                  source:
                    type: token
                    token: 'tok_ubfj2q76miwundwlk72vxt2i7q'
                  format: basic
              id:
                value:
                  source:
                    type: id
                    id: 'src_e7hqezhxdfeetnyfdv3ayu6yru'
                  format: card_payouts
    
      responses:
        '200':
          description: Metadata for the card number, BIN, token, or instrument ID provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardMetadataResponse'
              examples:
                basic:
                  value:
                    bin: '45434720'
                    scheme: visa
                    local_schemes: ['cartes_bancaires']
                    card_type: CREDIT
                    card_category: CONSUMER
                    currency: 'MUR'
                    issuer: 'STATE BANK OF MAURITIUS'
                    issuer_country: MU
                    issuer_country_name: Mauritius
                    is_combo_card: false
                    product_id: F
                    product_type: Visa Classic
                    subproduct_id: 'VA'
                    regulated_indicator: false
                    is_reloadable_prepaid: false
                    anonymous_prepaid_description: 'Anonymous prepaid program and not AMLD5 compliant'
                card_payouts:
                  value:
                    bin: '45434720'
                    scheme: visa
                    local_schemes: ['cartes_bancaires']
                    card_type: CREDIT
                    card_category: CONSUMER
                    currency: 'MUR'
                    issuer: 'STATE BANK OF MAURITIUS'
                    issuer_country: MU
                    issuer_country_name: Mauritius
                    product_id: F
                    product_type: Visa Classic
                    subproduct_id: 'VA'
                    regulated_indicator: false
                    is_reloadable_prepaid: false
                    anonymous_prepaid_description: 'Anonymous prepaid program and not AMLD5 compliant'
                    card_payouts:
                      domestic_non_money_transfer: not_supported
                      cross_border_non_money_transfer: standard
                      domestic_gambling: fast_funds
                      cross_border_gambling: unknown
                      domestic_money_transfer: unknown
                      cross_border_money_transfer: not_supported
    
        '401':
          description: Unauthorized
        '404':
          description: Card Metadata not found
        '415':
          description: Unsupported Media Type
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error
        '502':
          description: Bad Gateway
        '504':
          description: Gateway Timeout
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/metadata\"\n	\"github.com/checkout/checkout-sdk-go/metadata/sessions\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.VaultCardMetadata}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := metadata.CardMetadataRequest{\n	Source: sources.NewRequestCardSource(\"card_number\"),\n	Format: metadata.Basic,\n}\n\nresponse, err := api.Metadata.RequestCardMetadata(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /network-tokens:
    post:
      tags:
        - Network Tokens
      security:
        - OAuth:
            - vault:network-tokens
      summary: Provision a Network Token
      description: >
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Provisions a network token synchronously. If the merchant stores their cards with Checkout.com,
        then source ID can be used to request a network token for the given card.
        If the merchant does not store their cards with Checkout.com, then card details have to be provided.
      operationId: provisionNetworkToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkTokensRequest'
            examples:
              id:
                value:
                  source:
                    type: id
                    id: src_wmlfc3zyhqzehihu7giusaaawu
              card:
                value:
                  source:
                    type: card
                    number: '4539467987109256'
                    expiry_month: '10'
                    expiry_year: '2027'
      responses:
        '200':
          description: Responding with existing network token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkTokensResponse'
        '201':
          description: Network token provisioned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkTokensResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '415':
          description: Unsupported Media Type
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error
        '502':
          description: Bad Gateway
        '504':
          description: Gateway Timeout
  /network-tokens/{network_token_id}:
    get:
      tags:
        - Network Tokens
      summary: Get Network Token
      security:
        - OAuth:
            - vault:network-tokens
      description: >
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Given network token ID, this endpoint returns network token details: DPAN,
        expiry date, state, TRID and also card 
    
        details like last four and expiry date.
      operationId: getNetworkToken
      parameters:
        - in: path
          name: network_token_id
          required: true
          schema:
            type: string
          example: nt_xgu3isllqfyu7ktpk5z2yxbwna
          description: Unique token ID assigned by Checkout.com for each token
      responses:
        '200':
          description: Network Token details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkTokensRetrieveResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network Token not found
        '500':
          description: Internal Server Error
        '502':
          description: Bad Gateway
        '504':
          description: Gateway Timeout
  /network-tokens/{network_token_id}/cryptograms:
    post:
      tags:
        - Network Tokens
      security:
        - OAuth:
            - vault:network-tokens
      summary: Request a cryptogram
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Using network token ID as an input, this endpoint returns token cryptogram.
      operationId: provisionCryptogram
      parameters:
        - in: path
          name: network_token_id
          required: true
          schema:
            type: string
          example: nt_xgu3isllqfyu7ktpk5z2yxbwna
          description: Unique token ID assigned by Checkout.com for each token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkTokensCryptogramRequest'
      responses:
        '201':
          description: Cryptogram from the network token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkTokensCryptogramResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network Token not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error
        '502':
          description: Bad Gateway
        '504':
          description: Gateway Timeout
  /network-tokens/{network_token_id}/delete:
    patch:
      tags:
        - Network Tokens
      security:
        - OAuth:
            - vault:network-tokens
      summary: Permanently deletes a network token
      description: >
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        This endpoint is for permanently deleting a network token. 
        A network token should be deleted when a payment instrument it is associated with
        is removed from file or if the security of the token has been compromised.
      operationId: deleteNetworkToken
      parameters:
        - in: path
          name: network_token_id
          required: true
          schema:
            type: string
          example: nt_xgu3isllqfyu7ktpk5z2yxbwna
          description: Unique token ID assigned by Checkout.com for each token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkTokensRequestDelete'
      responses:
        '204':
          description: Ok
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Network token not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error
        '502':
          description: Bad Gateway. Error from scheme
        '504':
          description: Timeout while waiting for a scheme response
  /payment-contexts:
    post:
      security:
        - OAuth:
            - gateway
            - gateway:payment-contexts
        - ApiSecretKey: [ ]
      tags:
        - Payment Context
      summary: Request a Payment Context
      operationId: requestAPaymentContext
      description: |
        Send a Payment Context request.<br><br><b>Note</b>: Successful Payment Context requests will always return a 201 response.
      parameters:
        - $ref: '#/components/parameters/ckoIdempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentContext'
      responses:
        '201':
          description: Payment Context Created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentContextResponse'
        '401':
          description: Unauthorized
        '429':
          description: Too many requests or duplicate request detected.
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_id:
                    type: string
                    example: 0HL80RJLS76I7
                  error_type:
                    type: string
                    example: request_invalid
                  error_codes:
                    type: array
                    items:
                      type: string
                      example: duplicate_request
        '422':
          description: Invalid data was sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '502':
          description: Bad gateway
  /payment-contexts/{id}:
    get:
      tags:
        - Payment Context
      security:
        - OAuth:
            - Payment Context
        - ApiSecretKey: []
      summary: Get Payment Context details
      operationId: getPaymentContext
      description: Returns all the Payment Context details.
      parameters:
        - in: path
          name: id
          schema:
            $ref: '#/components/schemas/PaymentContextId'
          required: true
      responses:
        '200':
          description: Payment Context retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentContextDetails'
        '401':
          description: Unauthorized
        '404':
          description: Payment Context not found.
  /payment-links:
    post:
      security:
        - ApiSecretKey: [ ]
      tags:
        - Payment Links
      summary: Create a Payment Link
      operationId: createAPaymentLinkSession
      description: |
        Create a Payment Link and pass through all the payment information, like the amount, currency, country and reference.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentLinksRequest'
      responses:
        '201':
          description: Create Payment Link Page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLinksResponse'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\nusing Checkout.Payments;\nusing Checkout.Payments.Links;\n\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nPaymentLinkRequest request = new PaymentLinkRequest\n{\n    Amount = 10,\n    Currency = Currency.GBP,\n    PaymentType = PaymentType.Regular,\n    PaymentIp = \"192.168.0.1\",\n    BillingDescriptor = new BillingDescriptor() {Name = \"string\", City = \"string\"},\n    Reference = \"reference\",\n    Description = \"Payment for Gold Necklace\",\n    ExpiresIn = 604800,\n    Customer = new CustomerRequest() {Email = \"email@docs.checkout.com\", Name = \"FirstName LastName\"},\n    Shipping =\n        new ShippingDetails()\n        {\n            Address = new Address()\n            {\n                AddressLine1 = \"123 High St.\",\n                AddressLine2 = \"Flat 456\",\n                City = \"London\",\n                State = \"GB\",\n                Zip = \"SW1A 1AA\",\n                Country = CountryCode.GB\n            },\n            Phone = new Phone() {Number = \"4155552671\", CountryCode = \"1\"}\n        },\n    Billing =\n        new BillingInformation()\n        {\n            Address = new Address()\n            {\n                AddressLine1 = \"123 High St.\",\n                AddressLine2 = \"Flat 456\",\n                City = \"London\",\n                State = \"GB\",\n                Zip = \"SW1A 1AA\",\n                Country = CountryCode.GB\n            },\n            Phone = new Phone() {Number = \"4155552671\", CountryCode = \"1\"}\n        },\n    Recipient =\n        new PaymentRecipient()\n        {\n            DateOfBirth = \"1985-05-15\",\n            AccountNumber = \"5555554444\",\n            Zip = \"SW1A\",\n            LastName = \"LastName\",\n        },\n    Processing = new ProcessingSettings() {Aft = true},\n    Products = new List<Product>() {new Product() {Name = \"Gold Necklace\", Quantity = 1, Price = 1000}},\n    Metadata = new Dictionary<string, object>(),\n    ThreeDs = new ThreeDsRequest() {Enabled = false, AttemptN3D = false},\n    Risk = new RiskRequest() {Enabled = false},\n    ReturnUrl = \"https://example.com/payments/success\",\n    Locale = \"en-GB\",\n    Capture = true,\n    CaptureOn = new DateTime()\n};\n\ntry\n{\n    PaymentLinkResponse response = await api.PaymentLinksClient().Create(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/payments\"\n	\"github.com/checkout/checkout-sdk-go/payments/links\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\naddress := common.Address{\n	AddressLine1: \"123 High St.\",\n	AddressLine2: \"Flat 456\",\n	City:         \"London\",\n	State:        \"GB\",\n	Zip:          \"SW1A 1AA\",\n	Country:      common.GB,\n}\n\nphone := common.Phone{\n	CountryCode: \"1\",\n	Number:      \"415 555 2671\",\n}\n\nrequest := links.PaymentLinkRequest{\n	Amount:      10,\n	Currency:    common.GBP,\n	PaymentType: payments.Regular,\n	BillingDescriptor: &payments.BillingDescriptor{\n		Name: \"Name\",\n		City: \"London\",\n	},\n	Reference:   \"Reference\",\n	Description: \"Description\",\n	ExpiresIn:   604800,\n	Customer: &common.CustomerRequest{\n		Email: \"email@docs.checkout.com\",\n		Name:  \"Name\",\n	},\n	Shipping: &payments.ShippingDetails{\n		Address: &address,\n		Phone:   &phone,\n	},\n	Billing: &payments.BillingInformation{\n		Address: &address,\n		Phone:   &phone,\n	},\n	Recipient: &payments.PaymentRecipient{\n		DateOfBirth:   \"1985-05-15\",\n		AccountNumber: \"999999999\",\n		Zip:           \"12345\",\n		LastName:      \"LastName\",\n	},\n	Processing: &payments.ProcessingSettings{Aft: true},\n	Products: []payments.Product{\n		{\n			Name:     \"name\",\n			Quantity: 1,\n			Price:    200,\n		},\n	},\n	Risk:      &payments.RiskRequest{Enabled: false},\n	ReturnUrl: \"https://docs.checkout.com/return\",\n	Locale:    \"en-GB\",\n	ThreeDs: &payments.ThreeDsRequest{\n		Enabled:            false,\n		AttemptN3D:         false,\n		ChallengeIndicator: common.NoChallengeRequested,\n	},\n	Capture:   true,\n	CaptureOn: time.Now().AddDate(0, 0, 30),\n}\n\nresponse, err := api.Links.CreatePaymentLink(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.common.Address;\nimport com.checkout.common.ChallengeIndicator;\nimport com.checkout.common.CountryCode;\nimport com.checkout.common.Currency;\nimport com.checkout.common.CustomerRequest;\nimport com.checkout.common.Phone;\nimport com.checkout.common.Product;\nimport com.checkout.payments.BillingDescriptor;\nimport com.checkout.payments.BillingInformation;\nimport com.checkout.payments.PaymentRecipient;\nimport com.checkout.payments.PaymentType;\nimport com.checkout.payments.ProcessingSettings;\nimport com.checkout.payments.RiskRequest;\nimport com.checkout.payments.ShippingDetails;\nimport com.checkout.payments.ThreeDSRequest;\nimport com.checkout.payments.links.PaymentLinkRequest;\nimport com.checkout.payments.links.PaymentLinkResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nPaymentLinkRequest paymentLinksRequest = PaymentLinkRequest.builder()\n    .amount(10L)\n    .currency(Currency.GBP)\n    .reference(\"reference\")\n    .description(\"description\")\n    .expiresIn(604800)\n    .customer(new CustomerRequest(null, \"email@docs.checkout.com\", \"Name\", null))\n    .shipping(ShippingDetails.builder()\n        .address(Address.builder()\n        .addressLine1(\"123 High St.\")\n        .addressLine2(\"Flat 456\")\n        .city(\"London\")\n        .state(\"GB\")\n        .zip(\"SW1A 1AA\")\n        .country(CountryCode.GB)\n        .build())\n    .phone(Phone.builder().countryCode(\"1\").number(\"415 555 2671\").build())\n        .build())\n    .billing(BillingInformation.builder()\n        .address(Address.builder()\n        .addressLine1(\"123 High St.\")\n        .addressLine2(\"Flat 456\")\n        .city(\"London\")\n        .state(\"GB\")\n        .zip(\"SW1A 1AA\")\n        .country(CountryCode.GB)\n        .build())\n    .phone(Phone.builder().countryCode(\"1\").number(\"415 555 2671\").build())\n        .build())\n    .recipient(PaymentRecipient.builder()\n        .accountNumber(\"999999999\")\n        .dateOfBirth(\"1985-05-15\")\n        .lastName(\"LastName\")\n        .zip(\"12345\")\n        .build())\n    .processing(ProcessingSettings.builder()\n        .aft(true)\n        .build())\n    .capture(true)\n    .captureOn(Instant.now().plus(30, ChronoUnit.DAYS))\n    .products(Collections.singletonList(Product.builder()\n        .name(\"name\")\n        .quantity(1L)\n        .price(200L)\n        .build()))\n    .threeDS(ThreeDSRequest.builder()\n        .enabled(Boolean.FALSE)\n        .attemptN3D(Boolean.FALSE)\n        .challengeIndicator(ChallengeIndicator.NO_CHALLENGE_REQUESTED)\n        .build())\n    .risk(new RiskRequest(Boolean.FALSE))\n    .returnUrl(\"https://docs.checkout.com/success\")\n    .locale(\"en-GB\")\n    .paymentType(PaymentType.REGULAR)\n    .billingDescriptor(BillingDescriptor.builder()\n        .city(\"London\")\n        .name(\"name\")\n        .build())\n    .build();\n\ntry {\n    PaymentLinkResponse response = api.paymentLinksClient().createPaymentLink(paymentLinksRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Address;\nuse Checkout\\Common\\Country;\nuse Checkout\\Common\\Currency;\nuse Checkout\\Common\\CustomerRequest;\nuse Checkout\\Common\\Phone;\nuse Checkout\\Common\\Product;\nuse Checkout\\Environment;\nuse Checkout\\Payments\\BillingInformation;\nuse Checkout\\Payments\\Links\\PaymentLinkRequest;\nuse Checkout\\Payments\\PaymentRecipient;\nuse Checkout\\Payments\\ProcessingSettings;\nuse Checkout\\Payments\\RiskRequest;\nuse Checkout\\Payments\\ShippingDetails;\nuse Checkout\\Payments\\ThreeDsRequest;\n\n$api = CheckoutSdk::builder()->staticKeys()\n        ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n        ->secretKey(\"secret_key\")\n        ->build();\n\n$phone = new Phone();\n$phone->country_code = \"+1\";\n$phone->number = \"415 555 2671\";\n\n$address = new Address();\n$address->address_line1 = \"123 High St.\";\n$address->address_line2 = \"Flat 456\";\n$address->city = \"London\";\n$address->State = \"GB\";\n$address->zip = \"SW1A 1AA\";\n$address->country = Country::$GB;\n\n$customerRequest = new CustomerRequest();\n$customerRequest->email = \"\";\n$customerRequest->name = \"Name\";\n\n$billingInformation = new BillingInformation();\n$billingInformation->address = $address;\n$billingInformation->phone = $phone;\n\n$shippingDetails = new ShippingDetails();\n$shippingDetails->address = $address;\n$shippingDetails->phone = $phone;\n\n$recipient = new PaymentRecipient();\n$recipient->account_number = \"1234567\";\n$recipient->dob = \"1985-05-15\";\n$recipient->last_name = \"Last\";\n$recipient->zip = \"12345\";\n\n$product = new Product();\n$product->name = \"Product\";\n$product->quantity = 1;\n$product->price = 10;\n\n$products = array($product);\n\n$theeDsRequest = new ThreeDsRequest();\n$theeDsRequest->enabled = false;\n$theeDsRequest->attempt_n3d = false;\n\n$processing = new ProcessingSettings();\n$processing->aft = true;\n\n$risk = new RiskRequest();\n$risk->enabled = false;\n\n$request = new PaymentLinkRequest();\n$request->amount = 1000;\n$request->reference = \"reference\";\n$request->currency = Currency::$GBP;\n$request->description = \"Description\";\n$request->customer = $customerRequest;\n$request->shipping = $shippingDetails;\n$request->billing = $billingInformation;\n$request->recipient = $recipient;\n$request->processing = $processing;\n$request->products = $products;\n$request->risk = $risk;\n$request->locale = \"en-GB\";\n$request->three_ds = $theeDsRequest;\n$request->capture = true;\n\ntry {\n    $response = $api->getPaymentLinksClient()->createPaymentLink($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.common.common import Phone, Address, CustomerRequest, Product\nfrom checkout_sdk.common.enums import Country, Currency, PaymentSourceType\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.payments.links.payments_links import PaymentLinkRequest\nfrom checkout_sdk.payments.payments import ThreeDsRequest, ProcessingSettings, RiskRequest, ShippingDetails, PaymentRecipient\nfrom checkout_sdk.payments.payments_previous import BillingInformation\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\naddress = Address()\naddress.address_line1 = '123 High St.'\naddress.address_line2 = 'Flat 456'\naddress.city = 'London'\naddress.state = 'GB'\naddress.zip = 'SW1A 1AA'\naddress.country = Country.GB\n\ncustomer_request = CustomerRequest()\ncustomer_request.email = 'email@docs.checkout.com'\ncustomer_request.name = 'Name'\n\nbilling_information = BillingInformation()\nbilling_information.address = address\nbilling_information.phone = phone\n\nshipping_details = ShippingDetails()\nshipping_details.address = address\nshipping_details.phone = phone\n\nrecipient = PaymentRecipient()\nrecipient.account_number = '123456789'\nrecipient.country = Country.ES\nrecipient.dob = '1985-05-18'\nrecipient.first_name = 'First'\nrecipient.last_name = 'Last'\nrecipient.zip = '12345'\n\nproduct = Product()\nproduct.name = 'Product Name'\nproduct.quantity = 1\nproduct.price = 10\n\nthree_ds_request = ThreeDsRequest()\nthree_ds_request.enabled = True\nthree_ds_request.attempt_n3d = False\n\nprocessing_settings = ProcessingSettings()\nprocessing_settings.aft = True\n\nrisk_request = RiskRequest()\nrisk_request.enabled = True\n\nrequest = PaymentLinkRequest()\nrequest.amount = 10\nrequest.reference = 'reference'\nrequest.currency = Currency.GBP\nrequest.description = 'Payment for Gold Necklace'\nrequest.customer = customer_request\nrequest.shipping = shipping_details\nrequest.billing = billing_information\nrequest.recipient = recipient\nrequest.processing = processing_settings\nrequest.products = [product]\nrequest.risk = risk_request\nrequest.return_url = 'https://docs.checkout.com/payments/return'\nrequest.locale = 'en-GB'\nrequest.three_ds = three_ds_request\nrequest.expires_in = 6400\nrequest.capture = True\nrequest.allow_payment_methods = [PaymentSourceType.CARD, PaymentSourceType.IDEAL]\n\ntry:\n    response = api.payments_links.create_payment_link(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /payment-links/{id}:
    get:
      security:
        - ApiSecretKey: []
      tags:
        - Payment Links
      summary: Get Payment Link details
      operationId: getPaymentLinkDetails
      description: |
        Retrieve details about a specific Payment Link using its ID returned when the link was created. In the response, you will see the status of the Payment Link.<br><br>
        For more information, see the <a target="_blank" href="https://www.checkout.com/docs/integrate/payment-links">Payment Links documentation</a>.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/PaymentLinkId'
      responses:
        '200':
          description: Payment Link details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPaymentLinkResponse'
        '401':
          description: Unauthorized
        '404':
          description: Payment Link session not found
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Payments.Links;\n\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    PaymentLinkDetailsResponse response = await api.PaymentLinksClient().Get(\"payment_link_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Links.GetPaymentLink(\"request_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.payments.links.PaymentLinkDetailsResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    PaymentLinkDetailsResponse response = api.paymentLinksClient().getPaymentLink(\"payment_link_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\n\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\ntry {\n    $response = $api->getPaymentLinksClient()->getPaymentLink(\"payment_link_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\ntry:\n    response = api.payments_links.get_payment_link('payment_link_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /payment-methods:
    get:
      security:
        - OAuth:
            - gateway
        - ApiSecretKey: [ ]
      tags:
        - Payment Methods
      summary: Get available payment methods
      operationId: getPaymentMethods
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Get a list of all available payment methods for a specific Processing Channel ID.
      parameters:
        - in: query
          name: processing_channel_id
          required: true
          schema:
            type: string
            pattern: "^(pc)_(\\w{26})$"
            description: The processing channel to be used for payment methods retrieval.
            example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq'
      responses:
        '200':
          description: Enabled payment methods retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodsResponse'
        '401':
          description: Unauthorized
        '404':
          description: Processing channel not found
  /payment-sessions:
    post:
      security:
        - OAuth:
            - gateway:payment
            - payment-sessions
        - ApiSecretKey: [ ]
      tags:
        - Flow
      operationId: CreatePaymentSession
      summary: Request a Payment Session
      description: |
        Creates a payment session.
    
        The values you provide in the request will be used to determine the payment methods available to Flow. Some payment methods may require you to provide specific values for certain fields. Refer to our <a href="https://www.checkout.com/docs/payments/add-payment-methods">documentation</a> for more information.
    
        You must supply the unmodified response body when you <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/get-started-with-flow#Initialize_and_mount_Flow_">initialize Flow</a>.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentSessionsRequest'
      responses:
        '201':
          description: A Payment Session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePaymentSessionsResponse'
        '401':
          description: Unauthorized (Empty Response).
        '422':
          description: Invalid data was sent.
          content:
            application/problem+json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/PaymentSessionsValidationErrorResponse'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSessionsRateLimitedResponse'
        '502':
          description: Bad gateway.
  /payment-sessions/{id}/submit:
    post:
      security:
        - OAuth:
            - gateway:payment
            - payment-sessions
        - ApiSecretKey: [ ]
      tags:
        - Flow
      operationId: SubmitPaymentSession
      summary: Submit a Payment Session
      description: |
        Submit a payment attempt for a payment session.
    
        This request works with the Flow <a href="https://checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/flow-library-reference/flowcomponent#handleSubmit(FlowComponent,_SubmitData)">handleSubmit</a> callback, where you can perform <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/extend-your-flow-integration/dynamically-adjust-the-payment-amount">a customized payment submission</a>.
        You must send the unmodified response body as the response of the `handleSubmit` callback.
      parameters:
        - in: path
          name: id
          schema:
            $ref: '#/components/schemas/PaymentSessionId'
          required: true
          description: The Payment Sessions unique identifier
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitPaymentSessionsRequest'
      responses:
        '201':
          description: Payment processed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitPaymentSessionsProcessedResponse'
        '202':
          description: Payment asynchronous or further action required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitPaymentSessionsActionRequiredResponse'
        '401':
          description: Unauthorized (Empty Response).
        '422':
          description: Invalid data was sent.
          content:
            application/problem+json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/PaymentSessionsValidationErrorResponse'
        '429':
          description: Too many requests or duplicate request detected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSessionsRateLimitedResponse'
        '502':
          description: Bad gateway.
  /payment-sessions/complete:
    post:
      security:
        - OAuth:
            - gateway:payment
            - payment-sessions
        - ApiSecretKey: [ ]
      tags:
        - Flow
      operationId: CreateAndSubmitPaymentSession
      summary: Request a Payment Session with Payment
      description: |
        Create a payment session and submit a payment attempt for it.
    
        The values you provide in the request will be used to determine the payment methods available to Flow. Some payment methods may require you to provide specific values for certain fields. Refer to our <a href="https://www.checkout.com/docs/payments/add-payment-methods">documentation</a> for more information.
    
        This request works with the advanced Flow integration, where <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/extend-your-flow-integration/collect-payment-details-without-an-initial-payment-session">you do not need to create a payment session for initializing Flow</a>. You must send the unmodified response body as the response of the <a href="https://checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/flow-library-reference/flowcomponent#handleSubmit(FlowComponent,_SubmitData)">handleSubmit</a> callback.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAndSubmitPaymentSessionsRequest'
    
      responses:
        '201':
          description: Payment processed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAndSubmitPaymentSessionsProcessedResponse'
        '202':
          description: Payment asynchronous or further action required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAndSubmitPaymentSessionsActionRequiredResponse'
        '401':
          description: Unauthorized (Empty Response).
        '422':
          description: Invalid data was sent.
          content:
            application/problem+json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/PaymentSessionsValidationErrorResponse'
        '429':
          description: Too many requests or duplicate request detected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSessionsRateLimitedResponse'
        '502':
          description: Bad gateway.
  /payments:
    post:
      security:
        - OAuth:
            - gateway
            - gateway:payment
        - ApiSecretKey: [ ]
      tags:
        - Payments
      summary: Request a payment or payout
      operationId: requestAPaymentOrPayout
      description: |
        Send a payment or payout.<br><br><b>Note</b>: successful payout requests will always return a 202 response.
      parameters:
        - $ref: '#/components/parameters/ckoIdempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/PaymentRequest'
                - $ref: '#/components/schemas/PaymentContextPaymentRequest'
                - $ref: '#/components/schemas/CardPayoutRequest'
                - $ref: '#/components/schemas/BankPayoutRequest'
                - $ref: '#/components/schemas/UnreferencedRefundRequest'       
      responses:
        '201':
          description: Payment processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
              examples:
                PaymentResponse:
                  value:
                    id: 'pay_mbabizu24mvu3mela5njyhpit4'
                    action_id: 'act_mbabizu24mvu3mela5njyhpit4'
                    amount: 6540
                    currency: 'USD'
                    approved: true
                    status: 'Authorized'
                    auth_code: '770687'
                    response_code: '10000'
                    response_summary: 'Approved'
                    3ds:
                      downgraded: true
                      enrolled: 'N'
                    risk:
                      flagged: true
                    source:
                      type: 'card'
                      id: 'src_nwd3m4in3hkuddfpjsaevunhdy'
                      billing_address:
                        address_line1: '123 High St.'
                        address_line2: 'Flat 456'
                        city: 'London'
                        state: 'GB'
                        zip: 'SW1A 1AA'
                        country: 'GB'
                      phone:
                        country_code: '+1'
                        number: '415 555 2671'
                      scheme: 'Visa'
                      last4: '6584'
                      fingerprint: 'B16D9C2EF0C861A8825C9BD59CCE9171D84EBC45E89CC792B5D1D2D0DDE3DAB7'
                      bin: '448504'
                      card_type: 'CREDIT'
                      card_category: 'COMMERCIAL'
                      issuer: 'GE CAPITAL FINANCIAL, INC.'
                      issuer_country: 'US'
                      product_type: 'PURCHASING'
                      avs_check: 'G'
                      cvv_check: 'Y'
                      payment_account_reference: 'V001898055688657091'
                    customer:
                      id: 'cus_udst2tfldj6upmye2reztkmm4i'
                      email: 'johnsmith@example.com'
                      name: 'John Smith'
                      phone:
                        country_code: '+1'
                        number: '415 555 2671'
                    processed_on: '2019-09-10T10:11:12Z'
                    reference: 'ORD-5023-4E89'
                    processing:
                      retrieval_reference_number: '909913440644'
                      acquirer_transaction_id: '440644309099499894406'
                      recommendation_code: "02"
                      partner_order_id: "5GK24544NA744002L"
                      scheme_merchant_id: "123456"
                    eci: '06'
                    scheme_id: '489341065491658'
                    _links:
                      self:
                        href: 'https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4'
                      actions:
                        href: 'https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions'
                      void:
                        href: 'https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/voids'
                      capture:
                        href: 'https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/captures'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '202':
          description: Payment asynchronous or further action required
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PaymentAcceptedResponse'
                  - $ref: '#/components/schemas/PaymentContextPaymentResponse'
                  - $ref: '#/components/schemas/BankPayoutAcceptedResponse'
                  - $ref: '#/components/schemas/CardPayoutAcceptedResponse'
                  - $ref: '#/components/schemas/UnreferencedRefundAcceptedResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '429':
          description: Too many requests or duplicate request detected
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_id:
                    type: string
                    example: 0HL80RJLS76I7
                  error_type:
                    type: string
                    example: request_invalid
                  error_codes:
                    type: array
                    items:
                      type: string
                      example: duplicate_request
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '502':
          description: Bad gateway
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\nusing Checkout.Payments;\nusing Checkout.Payments.Request;\nusing Checkout.Payments.Request.Source;\nusing Checkout.Payments.Response;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Gateway)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nPaymentRequest request = new PaymentRequest\n{\n    Source = new RequestTokenSource {Token = \"tok_4gzeau5o2uqubbk6fufs3m7p54\"},\n    Amount = 10,\n    Currency = Currency.USD,\n    PaymentType = PaymentType.Recurring,\n    Reference = \"reference\",\n    Description = \"Set of 3 masks\",\n    Capture = true,\n    CaptureOn = new DateTime(),\n    Customer =\n        new CustomerRequest\n        {\n            Id = \"cus_udst2tfldj6upmye2reztkmm4i\",\n            Email = \"email@docs.checkout.com\",\n            Name = \"FirstName LastName\"\n        },\n    BillingDescriptor = new BillingDescriptor {Name = \"SUPERHEROES.COM\", City = \"GOTHAM\"},\n    Shipping =\n        new ShippingDetails\n        {\n            Address = new Address\n            {\n                AddressLine1 = \"123 High St.\",\n                AddressLine2 = \"Flat 456\",\n                City = \"London\",\n                State = \"GB\",\n                Zip = \"SW1A 1AA\",\n                Country = CountryCode.GB\n            },\n            Phone = new Phone {Number = \"4155552671\", CountryCode = \"1\"}\n        },\n    ThreeDs =\n        new ThreeDsRequest\n        {\n            Enabled = true,\n            AttemptN3D = true,\n            Eci = \"05\",\n            Cryptogram = \"AgAAAAAAAIR8CQrXcIhbQAAAAAA=\",\n            Xid = \"MDAwMDAwMDAwMDAwMDAwMzIyNzY=\",\n            Version = \"2.0.1\"\n        },\n    PreviousPaymentId = \"pay_fun26akvvjjerahhctaq2uzhu4\",\n    Risk = new RiskRequest {Enabled = false},\n    SuccessUrl = \"https://example.com/payments/success\",\n    FailureUrl = \"https://example.com/payments/failure\",\n    PaymentIp = \"192.168.0.1\",\n    Recipient = new PaymentRecipient\n    {\n        DateOfBirth = \"1985-05-15\", AccountNumber = \"5555554444\", Zip = \"SW1A\", LastName = \"LastName\",\n    },\n    Metadata = new Dictionary<string, object> {{\"coupon_code\", \"NY2018\"}, {\"partner_id\", 123989}}\n};\n\ntry\n{\n    PaymentResponse response = await api.PaymentsClient().RequestPayment(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/payments\"\n	\"github.com/checkout/checkout-sdk-go/payments/nas\"\n	\"github.com/checkout/checkout-sdk-go/payments/nas/sessions\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nsource := sources.NewRequestCardSource()\nsource.Number = \"123456789\"\nsource.ExpiryMonth = 10\nsource.ExpiryYear = 2027\nsource.Cvv = \"123\"\nsource.Stored = false\n\nsender := nas.NewRequestIndividualSender()\nsender.FirstName = \"FirstName\"\nsender.LastName = \"LastName\"\nsender.Address = &common.Address{\n	AddressLine1: \"123 High St.\",\n	AddressLine2: \"Flat 456\",\n	City:         \"London\",\n	State:        \"GB\",\n	Zip:          \"SW1A 1AA\",\n	Country:      common.GB,\n}\nsender.Identification = &nas.Identification{\n	Type:           nas.DrivingLicence,\n	Number:         \"1234\",\n	IssuingCountry: common.GB,\n}\n\nrequest := nas.PaymentRequest{\n	Source:              source,\n	Amount:              10,\n	Currency:            common.GBP,\n	Reference:           \"reference\",\n	Capture:             false,\n	ThreeDsRequest:      &payments.ThreeDsRequest{\n		Enabled:               true,\n		ChallengeIndicator:    common.NoChallengeRequested,\n	},\n	ProcessingChannelId: \"processing_channel_id\",\n	SuccessUrl:          \"https://docs.checkout.com/success\",\n	FailureUrl:          \"https://docs.checkout.com/failure\",\n	Sender:              sender,\n}\n\nresponse, err := api.Payments.RequestPayment(request, nil) // or \"RequestPayout(request PayoutRequest, idempotencyKey *string)\"\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.AccountHolderIdentification;\nimport com.checkout.common.AccountHolderIdentificationType;\nimport com.checkout.common.Address;\nimport com.checkout.common.ChallengeIndicator;\nimport com.checkout.common.CountryCode;\nimport com.checkout.common.Currency;\nimport com.checkout.payments.ThreeDSRequest;\nimport com.checkout.payments.request.PaymentRequest;\nimport com.checkout.payments.request.source.RequestCardSource;\nimport com.checkout.payments.response.PaymentResponse;\nimport com.checkout.payments.sender.PaymentIndividualSender;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nRequestCardSource source = RequestCardSource.builder()\n    .number(\"123456789\")\n    .expiryMonth(10)\n    .expiryYear(2027)\n    .cvv(\"123\")\n    .stored(false)\n    .build();\n\nPaymentIndividualSender sender = PaymentIndividualSender.builder()\n    .firstName(\"FirstName\")\n    .lastName(\"LastName\")\n    .address(Address.builder()\n        .addressLine1(\"123 High St.\")\n        .addressLine2(\"Flat 456\")\n        .city(\"London\")\n        .state(\"GB\")\n        .zip(\"SW1A 1AA\")\n        .country(CountryCode.GB)\n        .build())\n    .identification(AccountHolderIdentification.builder()\n        .type(AccountHolderIdentificationType.DRIVING_LICENCE)\n        .number(\"1234\")\n        .issuingCountry(CountryCode.GB)\n        .build())\n    .build();\n\nThreeDSRequest threeDSRequest = ThreeDSRequest.builder()\n    .enabled(true)\n    .challengeIndicator(ChallengeIndicator.NO_CHALLENGE_REQUESTED)\n    .build();\n\nPaymentRequest request = PaymentRequest.builder()\n    .source(source)\n    .sender(sender)\n    .capture(false)\n    .reference(\"reference\")\n    .amount(10L)\n    .currency(Currency.GBP)\n    .threeDS(threeDSRequest)\n    .successUrl(\"https://docs.checkout.com/success\")\n    .failureUrl(\"https://docs.checkout.com/failure\")\n    .build();\n\ntry {\n    PaymentResponse response = api.paymentsClient().requestPayment(request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const payment = await cko.payments.request({\n		source: {\n			// inferred type: \"token\"\n			token: 'tok_bzi43qc6jeee5mmnfo4gnsnera', // Generated by Checkout.Frames\n			billing_address: {\n				address_line1: '123 High St.',\n				address_line2: 'Flat 456',\n				city: 'London',\n				state: 'GB',\n				zip: 'W1W W1W',\n				country: 'GB',\n			},\n			phone: {\n				country_code: '44',\n				number: '7123456789',\n			},\n		},\n		currency: 'USD',\n		amount: 1000,\n		payment_type: 'Regular',\n		reference: 'ORDER 1234',\n		description: 'Mint Tea',\n		customer: {\n			email: 'new_user@email.com',\n			name: 'John Smith',\n		},\n		metadata: {\n			value: 'My value',\n		},\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Address;\nuse Checkout\\Common\\Country;\nuse Checkout\\Common\\Currency;\nuse Checkout\\Common\\CustomerRequest;\nuse Checkout\\Common\\Phone;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Payments\\Request\\PaymentRequest;\nuse Checkout\\Payments\\Request\\Source\\RequestCardSource;\nuse Checkout\\Payments\\Sender\\Identification;\nuse Checkout\\Payments\\Sender\\IdentificationType;\nuse Checkout\\Payments\\Sender\\PaymentIndividualSender;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$phone = new Phone();\n$phone->country_code = \"+1\";\n$phone->number = \"415 555 2671\";\n\n$address = new Address();\n$address->address_line1 = \"123 High St.\";\n$address->address_line2 = \"Flat 456\";\n$address->city = \"London\";\n$address->State = \"GB\";\n$address->zip = \"SW1A 1AA\";\n$address->country = Country::$GB;\n\n$requestCardSource = new RequestCardSource();\n$requestCardSource->name = \"Name\";\n$requestCardSource->number = \"Number\";\n$requestCardSource->expiry_year = 2026;\n$requestCardSource->expiry_month = 10;\n$requestCardSource->cvv = \"123\";\n$requestCardSource->billing_address = $address;\n$requestCardSource->phone = $phone;\n\n$customerRequest = new CustomerRequest();\n$customerRequest->email = \"email@docs.checkout.com\";\n$customerRequest->name = \"Customer\";\n\n$identification = new Identification();\n$identification->issuing_country = Country::$GT;\n$identification->number = \"1234\";\n$identification->type = IdentificationType::$drivingLicence;\n\n$paymentIndividualSender = new PaymentIndividualSender();\n$paymentIndividualSender->fist_name = \"FirstName\";\n$paymentIndividualSender->last_name = \"LastName\";\n$paymentIndividualSender->address = $address;\n$paymentIndividualSender->identification = $identification;\n\n$request = new PaymentRequest();\n$request->source = $requestCardSource;\n$request->capture = true;\n$request->reference = \"reference\";\n$request->amount = 10;\n$request->currency = Currency::$USD;\n$request->customer = $customerRequest;\n$request->sender = $paymentIndividualSender;\n\ntry {\n    $response = $api->getPaymentsClient()->requestPayment($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.common.common import Phone, Address, CustomerRequest\nfrom checkout_sdk.common.enums import Country, Currency\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.payments.payments import PaymentRequestCardSource, Identification, IdentificationType, \n                                        PaymentIndividualSender, PaymentRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\naddress = Address()\naddress.address_line1 = '123 High St.'\naddress.address_line2 = 'Flat 456'\naddress.city = 'London'\naddress.state = 'GB'\naddress.zip = 'SW1A 1AA'\naddress.country = Country.GB\n\nrequest_card_source = PaymentRequestCardSource()\nrequest_card_source.number = 'number'\nrequest_card_source.expiry_month = 10\nrequest_card_source.expiry_year = 2027\nrequest_card_source.cvv = 123\nrequest_card_source.name = 'Name'\nrequest_card_source.billing_address = address\nrequest_card_source.phone = phone\n\ncustomer_request = CustomerRequest()\ncustomer_request.email = 'email@docs.checkout.com'\ncustomer_request.name = 'Name'\n\nidentification = Identification()\nidentification.issuing_country = Country.GT\nidentification.number = '1234'\nidentification.type = IdentificationType.DRIVING_LICENSE\n\npayment_individual_sender = PaymentIndividualSender()\npayment_individual_sender.first_name = 'First'\npayment_individual_sender.last_name = 'Last'\npayment_individual_sender.address = address\npayment_individual_sender.identification = identification\n\nrequest = PaymentRequest()\nrequest.source = request_card_source\nrequest.reference = 'reference'\nrequest.amount = 10\nrequest.currency = Currency.USD\nrequest.capture = False\nrequest.customer = customer_request\nrequest.sender = payment_individual_sender\n\ntry:\n    response = api.payments.request_payment(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n# Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n# Invalid authorization"
    get:
      tags:
        - Payments
      security:
        - OAuth:
            - gateway
            - gateway:payment-details
        - ApiSecretKey: [ ]
      summary: Get payment lists
      operationId: getPaymentsList
      description: |
        Returns a list of your business' payments that match the specified reference. Results are returned in reverse chronological order, with the most recent payments shown first.
        
        This will only return payments initiated from June 2022 onwards. Payments initiated before this date may return a `404` error code if you attempt to retrieve them.
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100
            default: 10
          required: false
          description: The numbers of results to retrieve
        - in: query
          name: skip
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 999999999
            default: 0
          required: false
          description: The number of results to skip
        - in: query
          name: reference
          schema:
            type: string
          required: true
          description: A reference, such as an order ID, that can be used to identify the payment
      responses:
        '200':
          description: Payments retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentPaged'
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Unprocessable paging
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagingError'
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/payments\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nquery := payments.QueryRequest{\n	Limit:     10,\n	Skip:      0,\n	Reference: \"reference\",\n}\n\nresponse, err := api.Payments.RequestPaymentList(query)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /payments/{id}:
    get:
      tags:
        - Payments
      security:
        - OAuth:
            - gateway
            - gateway:payment-details
        - ApiSecretKey: [ ]
      summary: Get payment details
      operationId: getPaymentDetails
      description: |
        Returns the details of the payment with the specified identifier string.
    
        If the payment method requires a redirection to a third party (e.g., 3D Secure),
        the redirect URL back to your site will include a `cko-session-id` query parameter
        containing a payment session ID that can be used to obtain the details of the payment, for example:
    
        https://example.com/success?cko-session-id=sid_ubfj2q76miwundwlk72vxt2i7q.
      parameters:
        - in: path
          name: id
          schema:
            type: string
            pattern: "^(pay|sid)_(\\w{26})$"
          required: true
          description: The payment or payment session identifier
      responses:
        '200':
          description: Payment retrieved successfully
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PaymentDetails'
                  - $ref: '#/components/schemas/PayoutDetails'
                  - $ref: '#/components/schemas/CardPayoutDetails'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Payment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Payments.Response;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Gateway)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    GetPaymentResponse response = await api.PaymentsClient().GetPaymentDetails(\"payment_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Payments.GetPaymentDetails(\"payment_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.payments.response.GetPaymentResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    GetPaymentResponse response = api.paymentsClient().getPayment(\"payment_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const payment = await cko.payments.get('pay_je5hbbb4u3oe7k4u3lbwlu3zkq');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getPaymentsClient()->getPaymentDetails(\"payment_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\ntry:\n    response = api.payments.get_payment_details('payment_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /payments/{id}/actions:
    get:
      tags:
        - Payments
      security:
        - OAuth:
            - gateway
            - gateway:payment-details
        - ApiSecretKey: [ ]
      summary: Get payment actions
      operationId: getPaymentActions
      description: |
        Returns all the actions associated with a payment ordered by processing date in descending order (latest first).
      parameters:
        - in: path
          name: id
          schema:
            type: string
            pattern: "^(pay)_(\\w{26})$"
          required: true
          description: The payment identifier
      responses:
        '200':
          description: Payment actions retrieved successfully
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PaymentActionsResponse'
                  - $ref: '#/components/schemas/CardPayoutActionsResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Payment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Payments;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Gateway)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\ntry\n{\n    ItemsResponse<PaymentAction> response = await api.PaymentsClient().GetPaymentActions(\"payment_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Payments.GetPaymentActions(\"payment_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.ItemsResponse;\nimport com.checkout.OAuthScope;\nimport com.checkout.payments.PaymentAction;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    ItemsResponse<PaymentAction> response = api.paymentsClient().getPaymentActions(\"payment_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const payment = await cko.payments.getActions('pay_je5hbbb4u3oe7k4u3lbwlu3zkq');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getPaymentsClient()->getPaymentActions(\"payment_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY, OAuthScopes.GATEWAY_PAYMENT_DETAILS]) \n    .build()\n)\n\ntry:\n    response = api.payments.get_payment_actions('payment_id')\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /payments/{id}/authorizations:
    post:
      tags:
        - Payments
      security:
        - OAuth:
            - gateway
            - gateway:payment-authorizations
        - ApiSecretKey: [ ]
      summary: Increment authorization
      operationId: incrementPaymentAuthorization
      description: |
        Request an incremental authorization to increase the authorization amount or extend the authorization's validity period.
    
      parameters:
        - $ref: '#/components/parameters/ckoIdempotencyKey'
        - in: path
          name: id
          schema:
            type: string
            pattern: "^(pay)_(\\w{26})$"
          required: true
          description: The payment identifier
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizationRequest'
      responses:
        '201':
          description: Authorization processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '403':
          description: Incremental authorization not allowed
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '404':
          description: Payment not found
        '502':
          description: Bad gateway
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Payments.Request;\nusing Checkout.Payments.Response;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Gateway)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nAuthorizationRequest authorizationRequest = new AuthorizationRequest\n{\n    Amount = 100, Reference = \"payment_reference\"\n};\n\ntry\n{\n    // Optional: idempotencyKey as a third parameter for idempotent requests\n    AuthorizationResponse response = await api.PaymentsClient().IncrementPaymentAuthorization(\"payment_id\", authorizationRequest);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.payments.request.AuthorizationRequest;\nimport com.checkout.payments.response.AuthorizationResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nAuthorizationRequest authorizationRequest = AuthorizationRequest.builder()\n    .amount(100L)\n    .reference(\"reference\")\n    .build();\n\ntry {\n    // Optional: idempotencyKey as a third parameter for idempotent requests\n    AuthorizationResponse response = api.paymentsClient().incrementPaymentAuthorization(\"payment_id\", authorizationRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const increment = await cko.payments.increment('pay_bvxdyo7xdssuhcx3e74dpcrfmu', {\n		amount: 200,\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Payments\\AuthorizationRequest;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new AuthorizationRequest();\n$request->amount = 10;\n$request->reference = \"reference\";\n$request->metadata = array(\"param1\" => \"value1\", \"param2\" => \"value2\");\n\ntry {\n    // Optional: idempotencyKey as a third parameter for idempotent requests\n    $response = $api->getPaymentsClient()->incrementPaymentAuthorization(\"payment_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.payments.payments import AuthorizationRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\nrequest = AuthorizationRequest()\nrequest.amount = 10\nrequest.reference = 'reference'\n\ntry:\n    # Optional: idempotencyKey as a third parameter for idempotent requests\n    response = api.payments.increment_payment_authorization('payment_id', request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n# Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n# Invalid authorization"
  /payments/{id}/cancellations:
    post:
      tags:
        - Payments
      security:
        - OAuth:
            - gateway
            - gateway:payment-cancellations
        - ApiSecretKey: [ ]
      summary: Cancel a scheduled retry
      operationId: cancelAPayment
      description: |
        Cancels an upcoming retry, if there is one scheduled
    
        Cancellation requests are processed asynchronously. You can use [workflows](#tag/Workflows) to be notified if the cancellation is successful.
      parameters:
        - $ref: '#/components/parameters/ckoIdempotencyKey'
        - in: path
          name: id
          schema:
            type: string
            pattern: "^(pay)_(\\w{26})$"
          required: true
          description: The unique payment identifier.
          example: pay_mbabizu24mvu3mela5njyhpit4
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancellationRequest'
      responses:
        '202':
          description: Cancellation accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancellationAcceptedResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '403':
          description: Cancellation not allowed
        '404':
          description: Payment not found
        '429':
          description: Too Many Requests
        '502':
          description: Bad gateway
  /payments/{id}/captures:
    post:
      tags:
        - Payments
      security:
        - OAuth:
            - gateway
            - gateway:payment-captures
        - ApiSecretKey: [ ]
      summary: Capture a payment
      operationId: captureAPayment
      description: |
        Captures a payment if supported by the payment method.
    
        For card payments, capture requests are processed asynchronously. You can use [workflows](#tag/Workflows) to be notified if the capture is successful.
      parameters:
        - $ref: '#/components/parameters/ckoIdempotencyKey'
        - in: path
          name: id
          schema:
            type: string
            pattern: "^(pay)_(\\w{26})$"
          required: true
          description: The payment identifier
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CaptureRequest'
      responses:
        '202':
          description: Capture accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaptureAcceptedResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '200':
          description: Payment is already captured
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/IdempotentActionResponse'
                  - type: object
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '403':
          description: Capture not allowed
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '404':
          description: Payment not found
        '502':
          description: Bad gateway
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Payments;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Gateway)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nCaptureRequest request = new CaptureRequest\n{\n    Amount = 10,\n    Reference = \"reference\",\n    Metadata = new Dictionary<string, object>() {{\"coupon_code\", \"NY2018\"}, {\"partner_id\", \"123989\"}}\n};\n\ntry\n{\n    CaptureResponse response = await api.PaymentsClient().CapturePayment(\"payment_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/payments/nas\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := nas.CaptureRequest{\n	Amount:    10,\n	Reference: \"partial capture\",\n	Metadata: map[string]interface{}{},\n}\n\nresponse, err := api.Payments.CapturePayment(\"payment_id\", request, nil)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.payments.CaptureRequest;\nimport com.checkout.payments.CaptureResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nCaptureRequest captureRequest = CaptureRequest.builder()\n    .amount(10L)\n    .reference(\"partial capture\")\n    .metadata(new HashMap<>())\n    .build();\n\ntry {\n    // or, capturePayment(\"payment_id\") for a full capture\n    CaptureResponse response = api.paymentsClient().capturePayment(\"payment_id\", captureRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}\n\n"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const payment = await cko.payments.capture('pay_je5hbbb4u3oe7k4u3lbwlu3zkq', {\n		amount: 1000,\n		reference: 'CAPTURE ORDER 1234',\n		metadata: {\n			value: 'my value',\n		},\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Payments\\CaptureRequest;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new CaptureRequest();\n$request->reference = \"partial capture\";\n$request->amount = 5;\n\ntry {\n    // or, capturePayment(\"payment_id\") for a full capture\n    $response = $api->getPaymentsClient()->capturePayment(\"payment_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.payments.payments import CaptureRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\nrequest = CaptureRequest()\nrequest.reference = 'reference'\nrequest.amount = 10\n\ntry:\n    # or, capture_payment('payment_id') for a full capture\n    response = api.payments.capture_payment('payment_id', request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n# Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n# Invalid authorization\n\n"
  /payments/{id}/refunds:
    post:
      tags:
        - Payments
      security:
        - OAuth:
            - gateway
            - gateway:payment-refunds
        - ApiSecretKey: [ ]
      summary: Refund a payment
      operationId: refundAPayment
      description: |
        Refunds a payment if supported by the payment method.
    
        For card payments, refund requests are processed asynchronously. You can use [workflows](#tag/Workflows) to be notified if the refund is successful.
      parameters:
        - $ref: '#/components/parameters/ckoIdempotencyKey'
        - in: path
          name: id
          schema:
            type: string
            pattern: "^(pay)_(\\w{26})$"
          required: true
          description: The payment identifier
          example: pay_mbabizu24mvu3mela5njyhpit4
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequest'
      responses:
        '202':
          description: Refund accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundAcceptedResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '200':
          description: Payment is already refunded
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/IdempotentActionResponse'
                  - type: object
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '403':
          description: Refund not allowed
        '404':
          description: Payment not found
        '429':
          description: Too Many Requests
        '502':
          description: Bad gateway
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Payments;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Gateway)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nRefundRequest request = new RefundRequest()\n{\n    Amount = 10,\n    Reference = \"reference\",\n    Metadata = new Dictionary<string, object>() {{\"coupon_code\", \"NY2018\"}, {\"partner_id\", \"123989\"}}\n};\n\ntry\n{\n    RefundResponse response = await api.PaymentsClient().RefundPayment(\"payment_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/payments\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := payments.RefundRequest{\n	Amount:    10,\n	Reference: \"partial refund\",\n	Metadata: map[string]interface{}{},\n}\n\nresponse, err := api.Payments.RefundPayment(\"payment_id\", request, nil)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.payments.RefundRequest;\nimport com.checkout.payments.RefundResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nRefundRequest refundRequest = RefundRequest.builder()\n    .reference(\"partial refund\")\n    .amount(10L)\n    .metadata(new HashMap<>())\n    .build();\n\ntry {\n    // or, refundPayment(\"payment_id\") for a full refund\n    RefundResponse response = api.paymentsClient().refundPayment(\"payment_id\", refundRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const payment = await cko.payments.refund('pay_je5hbbb4u3oe7k4u3lbwlu3zkq', {\n		amount: 1000,\n		reference: 'REFUND ORDER 1234',\n		metadata: {\n			value: 'my value',\n		},\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Payments\\RefundRequest;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new RefundRequest();\n$request->reference = \"reference\";\n$request->amount = 10;\n\ntry {\n    // or, refundPayment(\"payment_id\") for a full refund\n    $response = $api->getPaymentsClient()->refundPayment(\"payment_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.payments.payments import RefundRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\nrequest = RefundRequest()\nrequest.reference = 'reference'\nrequest.amount = 10\n\ntry:\n    # or, refundPayment('payment_id') for a full refund\n    response = api.payments.refund_payment('payment_id', request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n# Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n# Invalid authorization"
  /payments/{id}/reversals:
    post:
      tags:
        - Payments
      security:
        - OAuth:
            - gateway
            - gateway:payment-voids
            - gateway:payment-refunds
            - gateway:payment-cancellations
        - ApiSecretKey: [ ]
      summary: Reverse a payment
      operationId: reversePayment
      description: |
        Returns funds back to the customer by automatically performing the appropriate payment action depending on the payment's status.
        
        For more information, see <a href="https://www.checkout.com/docs/payments/manage-payments/reverse-a-payment">Reverse a payment</a>.
      parameters:
        - $ref: '#/components/parameters/ckoIdempotencyKey'
        - in: path
          name: id
          schema:
            type: string
            pattern: "^(pay)_(\\w{26})$"
          required: true
          description: The unique identifier for the payment.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentReversalRequest'
      responses:
        '202':
          description: Reversal accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentReversalAcceptedResponse'
          headers:
            Cko-Request-Id:
              schema:
                $ref: '#/components/schemas/Cko-Request-Id'
            Cko-Version:
              schema:
                $ref: '#/components/schemas/Cko-Version'
        '200':
            description: Payment is already reversed
            content:
              application/json:
                schema:
                  allOf:
                    - $ref: '#/components/schemas/IdempotentActionResponse'
                    - type: object
            headers:
              Cko-Request-Id:
                $ref: '#/components/headers/Cko-Request-Id'
              Cko-Version:
                $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
        '403':
          description: Reversals not supported for this payment
        '404':
          description: Payment not found
        '502':
          description: Bad gateway
  /payments/{id}/voids:
    post:
      tags:
        - Payments
      security:
        - OAuth:
            - gateway
            - gateway:payment-voids
        - ApiSecretKey: [ ]
      summary: Void a payment
      operationId: voidAPayment
      description: |
        Voids a payment if supported by the payment method.
    
        For card payments, void requests are processed asynchronously. You can use [workflows](#tag/Workflows) to be notified if the void is successful.
      parameters:
        - $ref: '#/components/parameters/ckoIdempotencyKey'
        - in: path
          name: id
          schema:
            type: string
            pattern: "^(pay)_(\\w{26})$"
          required: true
          description: The payment identifier
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoidRequest'
      responses:
        '202':
          description: Void accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoidAcceptedResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '200':
          description: Payment is already voided
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/IdempotentActionResponse'
                  - type: object
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '403':
          description: Void not allowed
        '404':
          description: Payment not found
        '502':
          description: Bad gateway
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Payments;\n\n//API keys\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .SecretKey(\"secret_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\n//OAuth\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Gateway)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nVoidRequest request = new VoidRequest\n{\n    Reference = \"reference\",\n    Metadata = new Dictionary<string, object> {{\"coupon_code\", \"NY2018\"}, {\"partner_id\", \"123989\"}}\n};\n\ntry\n{\n    VoidResponse response = await api.PaymentsClient().VoidPayment(\"payment_id\", request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/payments\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Gateway, configuration.GatewayPayment}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := payments.VoidRequest{\n	Reference: \"reference\",\n	Metadata:  map[string]interface{}{},\n}\n\nresponse, err := api.Payments.VoidPayment(\"payment_id\", request, nil)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.payments.VoidRequest;\nimport com.checkout.payments.VoidResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .secretKey(\"secret_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.GATEWAY) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nVoidRequest voidRequest = VoidRequest.builder()\n    .reference(\"reference\")\n    .metadata(new HashMap<>())\n    .build();\n\ntry {\n    // or, voidPayment(\"payment_id\")\n    VoidResponse response = api.paymentsClient().voidPayment(\"payment_id\", voidRequest).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const payment = await cko.payments.void('pay_je5hbbb4u3oe7k4u3lbwlu3zkq', {\n		amount: 1000,\n		reference: 'VOID ORDER 1234',\n		metadata: {\n			value: 'my value',\n		},\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Payments\\VoidRequest;\n\n//API Keys\n$api = CheckoutSdk::builder()->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->secretKey(\"secret_key\")\n    ->build();\n\n//OAuth\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Gateway])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new VoidRequest();\n$request->reference = \"reference\";\n\ntry {\n    // or, voidPayment(\"payment_id\")\n    $response = $api->getPaymentsClient()->voidPayment(\"payment_id\", $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.payments.payments import VoidRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .secret_key('secret_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.GATEWAY]) \n    .build()\n)\n\nrequest = VoidRequest()\nrequest.reference = 'reference'\n\ntry:\n    # or, void_payment('payment_id')\n    response = api.payments.void_payment('payment_id', request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n# Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n# Invalid authorization"
  /payments/search:
    post:
      tags:
        - Payments
      summary: Search payments
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Search and filter through your payment data to retrieve payments that match your query.
    
        If a search returns more results than the value specified in `limit`, additional results are returned in a new page. A link to the next page of results is returned in the response's `_links.next.href` field.
    
        For more information on search syntax, see the <a href="https://www.checkout.com/docs/payments/manage-payments/search-and-filter-payments" target="blank">Search and filter payments</a> documentation.
      operationId: search
      requestBody:
        description: Search query.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
        required: true
      responses:
        '200':
          description: Successful search
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PayinResponse'
                  - $ref: '#/components/schemas/BankPayoutResponse'
                  - $ref: '#/components/schemas/CardPayoutResponse'
        '400':
          description: Invalid input
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Query validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchError'
      security:
        - OAuth:
            - payments:search
        - ApiSecretKey: [ ]
  /payments/setups:
    post:
      security:
        - OAuth:
            - gateway
            - gateway:payment
            - vault
        - ApiSecretKey: []
      tags:
        - Payment Setups
      summary: Create a Payment Setup
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Creates a Payment Setup.
    
        To maximize the information available to the payment setup, create a Payment Setup as early as possible in the customer's journey. For example, create it the first time they land on the basket page.
      operationId: createAPaymentSetup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentSetup'
        required: true
      responses:
        '200':
          description: Payment Setup created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSetup'
        '401':
          description: Authentication failed. Provide a valid API key or access token.
        '403':
          description: You do not have permission to create a Payment Setup.
        '422':
          description: One or more fields failed validation. See the response body for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSetupValidationError'
  /payments/setups/{id}:
    put:
      security:
        - OAuth:
            - gateway
            - gateway:payment
            - vault
        - ApiSecretKey: []
      tags:
        - Payment Setups
      summary: Update a Payment Setup
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Updates a Payment Setup.
    
        Update the Payment Setup whenever there are significant changes in the data relevant to the customer's transaction. For example, when the customer makes a change that impacts the total payment amount.
      operationId: updateAPaymentSetup
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: The unique identifier of the Payment Setup to update.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentSetup'
        required: true
      responses:
        '200':
          description: Payment Setup updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSetup'
        '401':
          description: Authentication failed. Provide a valid API key or access token.
        '403':
          description: You do not have permission to update this Payment Setup.
        '422':
          description: One or more fields failed validation. See the response body for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSetupValidationError'
    get:
      security:
        - OAuth:
            - gateway
            - gateway:payment
            - vault
        - ApiSecretKey: []
      tags:
        - Payment Setups
      summary: Get a Payment Setup
      description: |
        <span style="font-size: 14px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Retrieves a Payment Setup by its unique identifier.
      operationId: getAPaymentSetup
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: The unique identifier of the Payment Setup to retrieve.
      responses:
        '200':
          description: Payment Setup details returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSetup'
        '401':
          description: Authentication failed. Provide a valid API key.
        '403':
          description: You do not have permission to retrieve this Payment Setup.
  /payments/setups/{id}/confirm/{payment_method_name}:
    post:
      security:
        - OAuth:
            - gateway
            - gateway:payment
            - vault
        - ApiSecretKey: []
      tags:
        - Payment Setups
      summary: Confirm a Payment Setup
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
    
        Confirm a Payment Setup to begin processing the payment request with your chosen payment method.
      operationId: confirmAPaymentSetup
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: The unique identifier of the Payment Setup.
        - in: path
          name: payment_method_name
          schema:
            type: string
          required: true
          description: The name of the payment method to process the payment with (For example, `tabby`, `klarna`, `card`).
      responses:
        '200':
          description: Payment Setup confirmation attempt successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSetup'
        '401':
          description: Authentication failed. Provide a valid API key or access token.
        '403':
          description: You do not have permission to update this Payment Setup.
        '422':
          description: One or more fields failed validation. See the response body for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSetupValidationError'
  /reports:
    get:
      tags:
        - Reports
      security:
        - OAuth:
            - reports
            - reports:view
        - ApiSecretKey: [ ]
      summary: Get all reports
      operationId: getReports
      description: |
        Returns the list of reports and their details.
      parameters:
        - name: created_after
          in: query
          description: Filters reports to those created on or after the specified timestamp, in UTC. <br/>Format – ISO 8601 code
          schema:
            type: string
            format: date-time
            example: '2025-02-17T00:00:00'
        - name: created_before
          in: query
          description: Filters reports to those created before the specified timestamp, in UTC. <br/>Format – ISO 8601 code
          schema:
            type: string
            format: date-time
            example: '2025-02-19T00:00:00'
        - name: entity_id
          in: query
          description: Filters reports to those created for the specified entity. <br/>Sub-entity IDs are not supported.
          schema:
            type: string
            example: 'ent_znj4ih5kn4fuxiaquoudv5mvwy'
            pattern: "^(ent)_(\\w{26})$"
        - name: limit
          in: query
          description: The number of results you want to include per page. </br> For example, if there are 50 results and you set limit=10, you receive 5 pages each containing 10 results.
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100
            default: 100
            example: 5
        - name: pagination_token
          in: query
          description: A token used to paginate multiple pages of results.
          schema:
            type: string
      responses:
        '200':
          description: Reports retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportListResponse'
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
        '401':
          description: Unauthorized – Access token may be invalid or missing
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportErrorResponse'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ReportErrorResponse'
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/reports\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Reports}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nquery := reports.QueryFilter{\n	CreatedAfter:  time.Parse(\"2006-01-02\", time.Now().AddDate(0, 0, -10).Format(\"2006-01-02\")),\n	CreatedBefore: time.Parse(\"2006-01-02\", time.Now().Format(\"2006-01-02\")),\n	EntityId:      \"entity_id\",\n	Limit:         20,\n}\n\nresponse, err := api.Reports.GetAllReports(query)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /reports/{id}:
    get:
      tags:
        - Reports
      security:
        - OAuth:
            - reports
            - reports:view
        - ApiSecretKey: [ ]
      summary: Get report details
      operationId: getReportDetails
      description: |
        Use this endpoint to retrieve a specific report using its ID.
      parameters:
        - name: id
          in: path
          description: The ID of the report to retrieve.
          required: true
          schema:
            type: string
            example: rpt_lmmldzousk7etoqijqundqexa4
            pattern: "^(rpt)_(\\w{26})$"
      responses:
        '200':
          description: Report details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportResponse'
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
        '401':
          description: Unauthorized. Likely causes include an invalid or unspecified access token.
        '404':
          description: No report with the specified ID was found.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ReportErrorResponse'
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Reports}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Reports.GetReportDetails(\"report_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /reports/{id}/files/{fileId}:
    get:
      tags:
        - Reports
      security:
        - OAuth:
            - reports
            - reports:view
        - ApiSecretKey: [ ]
      summary: Get report file
      operationId: getReportFile
      description: |
        Use this endpoint to retrieve a specific file from a given report using their respective IDs.
      parameters:
        - name: id
          in: path
          description: The ID of the report that the file belongs to.
          required: true
          schema:
            type: string
            example: rpt_lmmldzousk7etoqijqundqexa4
            pattern: "^(rpt)_(\\w{26})$"
        - name: fileId
          in: path
          description: The ID of the file to retrieve.
          required: true
          schema:
            type: string
            example: file_7ysmgfkj4ipunduud22uf73iey
            pattern: "^(file)_(\\w{26})$"
      responses:
        '302':
          description: Redirect to the report file download location.
          headers:
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Location: 
              description: Link to download the file. Expires after 30 seconds.
              schema:
                type: string
        '401':
          description: Unauthorized. Likely causes include an invalid or unspecified access token.
        '404':
          description: No report with the specified ID was found.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ReportErrorResponse'
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Reports}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Reports.GetReportFile(\"report_id\", \"file_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /secrets:
    post:
      tags:
        - Forward
      security:
        - OAuth:
            - forward
            - forward:secrets
        - ApiSecretKey: []
      summary: Create secret
      operationId: createSecret
      description: |
        Create a new secret with a plaintext value.
    
        **Validation Rules:**
        - `name`: 1-64 characters, alphanumeric + underscore
        - `value`: max 8KB
        - `entity_id` (optional): when provided, secret is scoped to this entity
    
        **Response:**
        Returns metadata.
      servers:
        - url: https://forward.checkout.com
          description: Production environment
        - url: https://forward.sandbox.checkout.com
          description: Sandbox environment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSecretPlaintextRequest'
            examples:
              plaintext:
                summary: Plain text secret
                value:
                  name: secret_name
                  value: plaintext
                  entity_id: ent_12345
      responses:
        '201':
          description: Secret created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretResponse'
              examples:
                created_secret:
                  summary: Created secret
                  value:
                    name: secret_name
                    created_at: '2025-10-14T00:00:00Z'
                    updated_at: '2025-10-14T00:00:00Z'
                    version: 1
                    entity_id: ent_123
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                invalid_name:
                  summary: Invalid secret name
                  value:
                    error_type: validation_error
                    error_codes:
                      - invalid_secret_name
                value_too_large:
                  summary: Value too large
                  value:
                    error_type: validation_error
                    error_codes:
                      - secret_value_too_large
        '409':
          description: Conflict - secret with this name already exists
        '500':
          description: Internal Error
    get:
      tags:
        - Forward
      security:
        - OAuth:
            - forward
            - forward:secrets
        - ApiSecretKey: []
      summary: List secrets
      operationId: listSecrets
      description: |
        Returns metadata for secrets scoped for client_id.
      servers:
        - url: https://forward.checkout.com
          description: Production environment
        - url: https://forward.sandbox.checkout.com
          description: Sandbox environment
      responses:
        '200':
          description: List of secrets
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SecretResponse'
                required:
                  - data
              examples:
                list_secrets:
                  summary: List of secrets
                  value:
                    data:
                      - name: secret_name_1
                        created_at: '2025-10-14T00:00:00Z'
                        updated_at: '2025-10-14T00:00:00Z'
                        version: 1
                        entity_id: ent_123
                      - name: secret_name_2
                        created_at: '2025-10-14T01:00:00Z'
                        updated_at: '2025-10-14T01:00:00Z'
                        version: 2
                        entity_id: ent_456
                      - name: secret_name_3
                        created_at: '2025-10-14T02:00:00Z'
                        updated_at: '2025-10-14T02:00:00Z'
                        version: 3
                        entity_id: ent_789
        '401':
          description: Unauthorized
        '500':
          description: Internal Error
    
  /secrets/{name}:
    patch:
      tags:
        - Forward
      security:
        - OAuth:
            - forward
            - forward:secrets
        - ApiSecretKey: []
      summary: Update secret
      operationId: updateSecret
      description: |
        Update an existing secret. After updating, the version is automatically incremented.
    
        **Validation Rules:**
        - Only `value` and `entity_id` can be updated
        - `value`: max 8KB
    
        **Response:**
        Returns updated metadata with incremented version.
      servers:
        - url: https://forward.checkout.com
          description: Production environment
        - url: https://forward.sandbox.checkout.com
          description: Sandbox environment
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
            pattern: '^[a-zA-Z0-9_]{1,64}$'
          description: Secret name.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSecretRequest'
            examples:
              update_value:
                summary: Update with plaintext value.
                value:
                  entity_id: ent_1234
                  value: NEW_VALUE_1
              update_entity:
                summary: Only updates the entity scope.
                value:
                  entity_id: ent_5678
      responses:
        '200':
          description: Secret updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretResponse'
              examples:
                updated_secret:
                  summary: Updated secret
                  value:
                    name: secret_name_1
                    created_at: '2025-10-14T00:00:00Z'
                    updated_at: '2025-10-14T12:00:00Z'
                    version: 2
                    entity_id: ent_123
        '401':
          description: Unauthorized
        '404':
          description: Secret not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Error
    delete:
      tags:
        - Forward
      security:
        - OAuth:
            - forward
            - forward:secrets
        - ApiSecretKey: []
      summary: Delete secret
      operationId: deleteSecret
      description: |
        Permanently delete a secret by name.
      servers:
        - url: https://forward.checkout.com
          description: Production environment
        - url: https://forward.sandbox.checkout.com
          description: Sandbox environment
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
            pattern: '^[a-zA-Z0-9_]{1,64}$'
          description: Secret name.
      responses:
        '204':
          description: Secret deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: Secret not found
        '500':
          description: Internal Error
    
  /sessions:
    post:
      tags:
        - Standalone
      security:
        - OAuth:
            - sessions:app
            - sessions:browser
      summary: Request a session
      operationId: createSession
      description: |
        Create a payment session to authenticate a cardholder before requesting a payment.
        Payment sessions can be linked to one or more payments (in the case of recurring and other merchant-initiated payments).
    
        The `next_actions` object in the response tells you which actions can be performed next.
    
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionRequest'
      responses:
        '201':
          description: Session processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSessionOkResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '202':
          description: Session accepted and further action required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSessionAcceptedResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '403':
          description: | 
            Forbidden. Ensure scope matches `"channel_data.channel"`: Use `sessions:app` for `"app"` and `sessions:browser` for `"browser"`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service not available. A temporary server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/sessions\"\n	\"github.com/checkout/checkout-sdk-go/sessions/completion\"\n	\"github.com/checkout/checkout-sdk-go/sessions/sources\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nsource := sources.NewSessionCardSource()\nsource.Number = \"12345678\"\nsource.ExpiryMonth = 10\nsource.ExpiryYear = 2027\n\ncompletion := completion.NewHostedCompletion()\ncompletion.SuccessUrl = \"https://docs.checkout.com/sessions/success\"\ncompletion.FailureUrl = \"https://docs.checkout.com/sessions/fail\"\n\nrequest := sessions.SessionRequest{\n	Source:                 source,\n	Amount:                 10,\n	Currency:               common.GBP,\n	ProcessingChannelId:    \"processing_channel_id\",\n	AuthenticationType:     sessions.RegularAuthType,\n	AuthenticationCategory: sessions.Payment,\n	ChallengeIndicator:     common.NoPreference,\n	Reference:              \"reference\",\n	TransactionType:        sessions.GoodsService,\n	ShippingAddress: &sources.SessionAddress{\n		Address: common.Address{\n			AddressLine1: \"123 High St.\",\n			AddressLine2: \"Flat 456\",\n			City:         \"London\",\n			State:        \"GB\",\n			Zip:          \"SW1A 1AA\",\n			Country:      common.GB,\n		},\n	},\n	Completion:  completion,\n}\n\nresponse, err := api.Sessions.RequestSession(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /sessions/{id}:
    get:
      tags:
        - Standalone
      security:
        - OAuth:
            - sessions:app
            - sessions:browser
        - SessionSecret: [ ]
      summary: Get session details
      operationId: getSession
      description: |
        Returns the details of the session with the specified identifier string.
      parameters:
        - name: id
          in: path
          description: Session ID
          required: true
          schema:
            type: string
        - name: channel
          in: header
          description: Optionally provide the type of channnel so you only get the relevant actions
          schema:
            type: string
            enum:
              - browser
              - app
            description: If a value is not provided, and if the `status` is `pending`, then `next_actions` will return `collect_channel_data` and if available, `issuer_fingerprint`.
            example: browser
      responses:
        '200':
          description: Session retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSessionResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden. This can happen when the OAuth token scope is `sessions:app`, but the session was initiated with the scope `sessions:browser`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Bad gateway
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Sessions.GetSessionDetails(\"session_id\", \"session_secret\") // \"session_secret\" is optional\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /sessions/{id}/collect-data:
    put:
      security:
        - OAuth:
            - sessions:app
            - sessions:browser
        - SessionSecret: [ ]
      summary: Update a session
      operationId: updateSession
      description: Update a session by providing information about the environment.
      tags:
        - Standalone
      parameters:
        - name: id
          in: path
          description: Session ID
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChannelData'
      responses:
        '200':
          description: Session updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSessionResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable channel information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/sessions/channels\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nchannel := channels.NewBrowserSession()\nchannel.AcceptHeader = \"Accept:  *.*, q=0.1\"\nchannel.JavaEnabled = true\nchannel.Language = \"FR-fr\"\nchannel.ColorDepth = \"16\"\nchannel.ScreenWidth = \"1920\"\nchannel.ScreenHeight = \"1080\"\nchannel.Timezone = \"60\"\nchannel.UserAgent = \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36\"\nchannel.ThreeDsMethodCompletion = common.Y\nchannel.IpAddress = \"1.12.123.255\"\n\nresponse, err := api.Sessions.UpdateSession(\"session_id\", channel,\"session_secret\") // \"session_secret\" is optional\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /sessions/{id}/complete:
    post:
      security:
        - OAuth:
            - sessions:app
            - sessions:browser
        - SessionSecret: [ ]
      summary: Complete a session
      operationId: completeSession  
      description: |
        Completes a session by posting the following request to the callback URL. This step is optional and only applies to non-hosted sessions:
        ```
        {
           "session_id": "sid_llraltf4jlwu5dxdtprcv7ba5i",
           "amount" : 6540,
           "currency": "USD",
           "status": "approved",
           "authentication_type": "regular",
           "authentication_category": "payment",
           "reference": "ORD-5023-4E89",
           "approved": true,
           "protocol_version": "2.2.0",
           "response_code": "Y",
           "response_status_reason": "01",
           "cryptogram": "MTIzNDU2Nzg5MDA5ODc2NTQzMjE=",
           "eci": "05",
           "xid": "XSUErNftqkiTdlkpSk8p32GWOFA",
           "cardholder_info": "Card declined. Please contact your issuing bank.",
           "challenged": true
        }
        ```
        <br/>
        The fields of the above are the same as they would be in a GET session response. If the callback URL fails, we recommend that you use a GET call as a fallback.
      tags:
        - Standalone
      parameters:
        - name: id
          in: path
          description: Session ID
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Session completed successfully
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Sessions.CompleteSession(\"session_id\", \"session_secret\") // \"session_secret\" is optional\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /sessions/{id}/issuer-fingerprint:
    put:
      security:
        - OAuth:
            - sessions:browser
        - SessionSecret: [ ]
      summary: Update session 3DS Method completion indicator
      operationId: updateSessionThreeDsMethodCompletion
      description: Update the session's 3DS Method completion indicator based on the result of accessing the 3DS Method URL.
      tags:
        - Standalone
      parameters:
        - name: id
          in: path
          description: Session ID
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThreeDsMethodCompletion'
      responses:
        '200':
          description: Session updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSessionResponseAfterChannelDataSupplied'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable channel information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-code-samples:
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/sessions\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.SessionsApp, configuration.SessionsBrowser}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := sessions.ThreeDsMethodCompletionRequest{ThreeDsMethodCompletion: common.Y}\n\nresponse, err := api.Sessions.Update3dsMethodCompletion(\"session_id\", request, \"session_secret\") // \"session_secret\" is optional\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
  /simulate/entities/{entityId}/requirements-due:
    parameters:
    - name: entityId
      in: path
      description: The ID of the entity.
      required: true
      style: simple
      schema:
        type: string
      example: ent_w4jelhppmfiufdnatam37wrfc4
    post:
      tags:
      - Onboarding Simulator
      summary: Set requirements due
      description: >-
        **Sandbox only** — not available in Production.
    
    
        Marks the specified requirement fields as due on an entity. Use this to test
        how your integration handles the requirements-due state.
      security:
      - OAuth:
        - accounts
      requestBody:
        required: true
        description: The requirement fields to mark as due.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulatorSetRequirementsDueRequest'
      responses:
        '200':
          description: Requirements due set successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorSetRequirementsDueResponse'
        '400':
          description: Unknown or missing fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Entity not found
        '502':
          description: Dependency error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorErrorResponse'
  /simulate/entities/{entityId}/scenarios/{scenarioId}:
    parameters:
    - name: entityId
      in: path
      description: The ID of the entity.
      required: true
      style: simple
      schema:
        type: string
      example: ent_w4jelhppmfiufdnatam37wrfc4
    - name: scenarioId
      in: path
      description: The ID of the scenario to run.
      required: true
      style: simple
      schema:
        type: string
      example: go_active
    post:
      tags:
      - Onboarding Simulator
      summary: Run scenario
      description: >-
        **Sandbox only** — not available in Production.
    
    
        Executes a pre-defined scenario against an entity, triggering the associated
        state transition or capability change. Use GET /simulate/scenarios to list
        available scenario IDs.
      security:
      - OAuth:
        - accounts
      responses:
        '200':
          description: Scenario executed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorRunScenarioResponse'
        '202':
          description: Scenario execution accepted and in progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorRunScenarioResponse'
        '401':
          description: Unauthorized
        '404':
          description: Entity or scenario not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorErrorResponse'
        '502':
          description: Dependency error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorErrorResponse'
  /simulate/entities/{entityId}/status:
    parameters:
    - name: entityId
      in: path
      description: The ID of the entity.
      required: true
      style: simple
      schema:
        type: string
      example: ent_w4jelhppmfiufdnatam37wrfc4
    post:
      tags:
      - Onboarding Simulator
      summary: Set entity status
      description: >-
        **Sandbox only** — not available in Production.
    
    
        Forces the entity to the specified status, bypassing normal onboarding flow.
        Use this to test how your integration handles different entity states.
      security:
      - OAuth:
        - accounts
      requestBody:
        required: true
        description: The status to apply to the entity.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulatorSetStatusRequest'
      responses:
        '200':
          description: Status updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorSetStatusResponse'
        '202':
          description: Status transition accepted and in progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorSetStatusResponse'
        '400':
          description: Invalid status value or transition not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Entity not found
        '502':
          description: Dependency error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulatorErrorResponse'
  /simulate/requirements-due:
    get:
      tags:
      - Onboarding Simulator
      summary: List available requirements
      description: >-
        **Sandbox only** — not available in Production.
    
    
        Returns all requirement fields that can be set as due on an entity. Use the
        field values when calling the [Set requirements due](#tag/Onboarding-Simulator/paths/~1simulate~1entities~1{entityId}~1requirements-due/post) endpoint.
      security:
      - OAuth:
        - accounts
      responses:
        '200':
          description: Requirements listed successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SimulatorAvailableRequirement'
        '401':
          description: Unauthorized
        '404':
          description: Simulator not available in this environment. These endpoints are not registered in production.
  /simulate/scenarios:
    get:
      tags:
      - Onboarding Simulator
      summary: List scenarios
      description: >-
        **Sandbox only** — not available in Production.
    
    
        Returns all pre-defined scenarios available. Use the
        scenario IDs when calling the run scenario endpoint.
      security:
      - OAuth:
        - accounts
      responses:
        '200':
          description: Scenarios listed successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SimulatorScenario'
        '401':
          description: Unauthorized
        '404':
          description: Simulator not available in this environment. These endpoints are not registered in production.
  /tokens:
    post:
      tags:
        - Tokens
      security:
        - ApiPublicKey: [ ]
      summary: Request a token
      operationId: requestAToken
      description: |
        Exchange card details for a reference token that can be used later to request a card payment. Tokens are single use and expire after 15 minutes.
        To create a token, please authenticate using your public key.
    
        **Please note:** You should only use the `card` type for testing purposes.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
      responses:
        '201':
          description: Reference token created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '504':
          description: Gateway timeout
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\nusing Checkout.Tokens;\n\nICheckoutApi api = CheckoutSdk.Builder().StaticKeys()\n    .PublicKey(\"public_key\")\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nCardTokenRequest request = new CardTokenRequest\n{\n    Number = \"4543474002249996\",\n    ExpiryMonth = 10,\n    ExpiryYear = 2027,\n    Name = \"FirstName LastName\",\n    Cvv = \"123\",\n    BillingAddress = new Address()\n    {\n        AddressLine1 = \"123 High St.\",\n        AddressLine2 = \"Flat 456\",\n        City = \"London\",\n        State = \"GB\",\n        Zip = \"SW1A 1AA\",\n        Country = CountryCode.GB\n    },\n    Phone = new Phone() {Number = \"4155552671\", CountryCode = \"1\"}\n};\n\ntry\n{\n    CardTokenResponse response = await api.TokensClient().Request(request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/tokens\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			Previous().\n			WithPublicKey(\"public_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := tokens.CardTokenRequest{\n	Type:        tokens.Card,\n	Number:      \"123456789\",\n	ExpiryMonth: 10,\n	ExpiryYear:  2025,\n	Name:        \"Name\",\n	CVV:         \"123\",\n	BillingAddress: &common.Address{\n		AddressLine1: \"123 High St.\",\n		AddressLine2: \"Flat 456\",\n		City:         \"London\",\n		State:        \"GB\",\n		Zip:          \"SW1A 1AA\",\n		Country:      common.GB,\n	},\n	Phone: &common.Phone{\n		CountryCode: \"1\",\n		Number:      \"415 555 2671\",\n	},\n}\n\nresponse, err := api.Tokens.RequestCardToken(request)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.Address;\nimport com.checkout.common.CountryCode;\nimport com.checkout.tokens.CardTokenRequest;\nimport com.checkout.tokens.CardTokenResponse;\n\n// API Keys\nCheckoutApi api = CheckoutSdk.builder()\n    .staticKeys()\n    .publicKey(\"public_key\")\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nCardTokenRequest request = CardTokenRequest.builder()\n    .number(\"1234567\")\n    .expiryMonth(10)\n    .expiryYear(2027)\n    .billingAddress(Address.builder()\n    .addressLine1(\"123 High St.\")\n    .addressLine2(\"Flat 456\")\n    .city(\"London\")\n    .state(\"GB\")\n    .zip(\"SW1A 1AA\")\n    .country(CountryCode.GB)\n    .build())\n    .build();\n\ntry {\n    CardTokenResponse response = api.tokensClient().requestCardToken(request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const token = await cko.tokens.request({\n		// infered type: \"applepay\"\n		token_data: {\n			version: 'EC_v1',\n			data: 't7GeajLB9skXB6QSWfEpPA4WPhDqB7ekdd+F7588arLzve...',\n			signature: 'MIAGCSqGbGUg...',\n			header: {\n				ephemeralPublicKey: 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgA...',\n				publicKeyHash: 'tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6...',\n				transactionId: '3cee89679130a4b...',\n			},\n		},\n	});\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\Address;\nuse Checkout\\Common\\Country;\nuse Checkout\\Common\\Phone;\nuse Checkout\\Environment;\nuse Checkout\\Tokens\\CardTokenRequest;\n\n$api = CheckoutSdk::builder()\n    ->staticKeys()\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->publicKey(\"public_ey\")\n    ->build();\n\n$phone = new Phone();\n$phone->country_code = \"+1\";\n$phone->number = \"415 555 2671\";\n\n$address = new Address();\n$address->address_line1 = \"123 High St.\";\n$address->address_line2 = \"Flat 456\";\n$address->city = \"London\";\n$address->State = \"GB\";\n$address->zip = \"SW1A 1AA\";\n$address->country = Country::$GB;\n\n$request = new CardTokenRequest();\n$request->name = \"Name\";\n$request->number = \"123456789\";\n$request->expiry_year = 2027;\n$request->expiry_month = 10;\n$request->cvv = \"123\";\n$request->billing_address = $address;\n$request->phone = $phone;\n\ntry {\n    $response = $api->getTokensClient()->requestCardToken($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.common.common import Phone, Address\nfrom checkout_sdk.common.enums import Country\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.tokens.tokens import CardTokenRequest\n\n# API Key\napi_key = (\n    CheckoutSdk.builder() \n    .public_key('public_key') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build()\n)\n\nphone = Phone()\nphone.country_code = '44'\nphone.number = '4155552671'\n\naddress = Address()\naddress.address_line1 = '123 High St.'\naddress.address_line2 = 'Flat 456'\naddress.city = 'London'\naddress.state = 'GB'\naddress.zip = 'SW1A 1AA'\naddress.country = Country.GB\n\nrequest = CardTokenRequest()\nrequest.number = 'number'\nrequest.expiry_month = 10\nrequest.expiry_year = 2027\nrequest.cvv = 123\nrequest.name = 'Name'\nrequest.billing_address = address\nrequest.phone = phone\n\ntry:\n    response = api.tokens.request_card_token(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /tokens/{tokenId}/metadata:
    get:
      tags:
        - Tokens
      security:
        - ApiSecretKey: []
        - OAuth:
            - vault:tokens-metadata
      summary: Get token metadata
      operationId: getTokenMetadata
      description: |
        Returns the details for an active token without consuming it. The token remains usable after this call.
    
        Possible responses:
    
         - `200` – Active and recently-used tokens (still within the 15-minute window).
         - `410` – Expired tokens.
         - `404` – Not found tokens, or of an unsupported type (for example, `cvv` or `pin`). 
        
      parameters:
        - name: tokenId
          in: path
          required: true
          description: The token ID
          schema:
            type: string
            pattern: '^(tok)_(\w{26})$'
            example: tok_4gzeau5o2uqubbk6fudbloo47a
      responses:
        '200':
          description: Token metadata retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenMetadataResponse'
              example:
                token: tok_4gzeau5o2uqubbk6fudbloo47a
                type: card
                expires_on: '2026-05-14T10:11:12Z'
                expiry_month: 12
                expiry_year: 2030
                scheme: Visa
                last4: '4242'
                bin: '424242'
                card_type: CREDIT
                card_category: CONSUMER
                issuer: JPMORGAN CHASE BANK NA
                issuer_country: US
                product_id: A
                product_type: Visa Traditional
                billing_address:
                  city: London
                  country: GB
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Token not found, or token type does not support metadata retrieval
        '410':
          description: Token has expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '504':
          description: Gateway timeout
  /transfers:
    servers:
      - url: https://transfers.checkout.com
        description: Production environment
      - url: https://transfers.sandbox.checkout.com
        description: Sandbox environment
    post:
      security:
        - OAuth:
            - transfers:create
        - ApiSecretKey: []
      description: |
        Initiate a transfer of funds from source entity to destination entity.
      summary: Initiate a transfer of funds
      operationId: createTransfer
      parameters:
        - $ref: '#/components/parameters/ckoIdempotencyKeyRequired'
      requestBody:
        required: true
        description: The details of the transfer.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTransferRequest'
      responses:
        '201':
          description: Transfer successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTransferResponse'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
      tags:
        - Transfers
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Transfers;\n\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Transfers)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nCreateTransferRequest createTransferRequest =\n    new CreateTransferRequest\n    {\n        Source = new TransferSourceRequest {Amount = 100, Id = \"entity_source_id\"},\n        Destination = new TransferDestinationRequest {Id = \"entity_destination_id\"},\n        TransferType = TransferType.Commission\n    };\n\ntry\n{\n    CreateTransferResponse createTransferResponse =\n        await api.TransfersClient().InitiateTransferOfFunds(createTransferRequest);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	\"github.com/checkout/checkout-sdk-go/transfers\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Transfers}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nrequest := transfers.TransferRequest{\n	Reference:    \"reference\",\n	TransferType: transfers.Commission,\n	Source: &transfers.TransferSourceRequest{\n		Id:     \"entity_id\",\n		Amount: 100,\n	},\n	Destination: &transfers.TransferDestinationRequest{Id: \"destination_id\"},\n}\n\nresponse, err := api.Transfers.InitiateTransferOfFounds(request, nil)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.transfers.CreateTransferResponse;\nimport com.checkout.transfers.CreateTransferRequest;\nimport com.checkout.transfers.TransferDestinationRequest;\nimport com.checkout.transfers.TransferSourceRequest;\nimport com.checkout.transfers.TransferType;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.TRANSFERS_CREATE) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nCreateTransferRequest request = CreateTransferRequest.builder()\n    .reference(\"reference\")\n    .transferType(TransferType.COMMISSION)\n        .source(TransferSourceRequest.builder()\n        .id(\"entity_id\")\n        .amount(100L)\n        .build())\n    .destination(TransferDestinationRequest.builder()\n        .id(\"destination_id\")\n        .build())\n    .build();\n\ntry {\n    CreateTransferResponse response = api.transfersClient().initiateTransferOfFunds(request).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\nuse Checkout\\Transfers\\CreateTransferRequest;\nuse Checkout\\Transfers\\TransferDestination;\nuse Checkout\\Transfers\\TransferSource;\nuse Checkout\\Transfers\\TransferType;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Transfers])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$transferSource = new TransferSource();\n$transferSource->id = \"ent_kidtcgc3ge5unf4a5i6enhnr5m\";\n$transferSource->amount = 100;\n\n$transferDestination = new TransferDestination();\n$transferDestination->id = \"ent_w4jelhppmfiufdnatam37wrfc4\";\n\n$request = new CreateTransferRequest();\n$request->transfer_type = TransferType::$commission;\n$request->source = $transferSource;\n$request->destination = $transferDestination;\n\ntry {\n    $response = $api->getTransfersClient()->initiateTransferOfFunds($request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "import checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\nfrom checkout_sdk.transfers.transfers import CreateTransferRequest, TransferType, TransferSource, TransferDestination\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.TRANSFERS]) \n    .build()\n)\n\nsource = TransferSource()\nsource.id = \"source_id\"\nsource.amount = 100\n\ndestination = TransferDestination()\ndestination.id = \"destination_id\"\n\nrequest = CreateTransferRequest()\nrequest.reference = \"superhero1234\"\nrequest.transfer_type = TransferType.COMMISSION\nrequest.source = source\nrequest.destination = destination\n\ntry:\n    # Optional: idempotencyKey as a second parameter for idempotent requests\n    response = api.transfers.initiate_transfer_of_funds(request)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /transfers/{id}:
    servers:
      - url: https://transfers.checkout.com
        description: Production environment
      - url: https://transfers.sandbox.checkout.com
        description: Sandbox environment
    get:
      tags:
        - Transfers
      security:
        - OAuth:
            - transfers:view
        - ApiSecretKey: []
      summary: Retrieve a transfer
      operationId: getTransferDetails
      description: Retrieve transfer details using the transfer identifier.
      parameters:
        - in: path
          name: id
          description: The transfer identifier
          required: true
          schema:
            type: string
          example: tra_y3oqhf46pyzuxjbcn2giaqnb4
      responses:
        '200':
          description: Transfer found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transfer'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Transfer not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationError'
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Transfers;\n\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.Transfers)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nCreateTransferRequest createTransferRequest =\n    new CreateTransferRequest\n    {\n        Source = new TransferSourceRequest {Amount = 100, Id = \"entity_source_id\"},\n        Destination = new TransferDestinationRequest {Id = \"entity_destination_id\"},\n        TransferType = TransferType.Commission\n    };\n\ntry\n{\n    TransferDetailsResponse transferDetailsResponse = await api.TransfersClient().RetrieveATransfer(\"transfer_id\");\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n)\n\n// API Keys\napi, err := checkout.\n			Builder().\n			StaticKeys().\n			WithSecretKey(\"secret_key\").\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.Transfers}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nresponse, err := api.Transfers.RetrieveTransfer(\"transfer_id\")\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-java\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.transfers.TransferDetailsResponse;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.TRANSFERS_VIEW) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\ntry {\n    TransferDetailsResponse response = api.transfersClient().retrieveATransfer(\"transfer_id\").get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Environment;\nuse Checkout\\OAuthScope;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$Transfers])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\ntry {\n    $response = $api->getTransfersClient()->retrieveATransfer(\"transfer_id\");\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "import checkout_sdk\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.TRANSFERS]) \n    .build()\n)\n\ntry:\n    response = api.transfers.retrieve_a_transfer(\"transfer_id\")\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
  /validation/bank-accounts/{country}/{currency}:
    get:
      tags:
        - Instruments
      security:
        - OAuth:
            - payouts:bank-details
      summary: Get bank account field formatting
      operationId: getBankAccountFields
      description: |
        Returns the bank account field formatting required to create bank account instruments or perform payouts for the specified country and currency.
      parameters:
        - in: path
          name: country
          schema:
            type: string
            minLength: 2
            maxLength: 2
          required: true
          description: |
            The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a>
        - in: path
          name: currency
          schema:
            type: string
            minLength: 3
            maxLength: 3
          required: true
          description: |
            The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a>
        - in: query
          name: account-holder-type
          schema:
            type: string
            enum:
              - individual
              - corporate
              - government
          description: |
            The type of account holder that will be used to filter the fields returned
        - in: query
          name: payment-network
          schema:
            type: string
            enum:
              - local
              - sepa
              - fps
              - ach
              - fedwire
              - swift
          description: |
            The banking network that will be used to filter the fields returned
      responses:
        '200':
          description: Bank account fields retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountFields'
          headers:
            Cko-Request-Id:
              $ref: '#/components/headers/Cko-Request-Id'
            Cko-Version:
              $ref: '#/components/headers/Cko-Version'
        '401':
          description: Unauthorized
        '404':
          description: Fields not found
        '422':
          description: Invalid data was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      x-code-samples:
        - lang: C#
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-net\nusing Checkout.Common;\nusing Checkout.Instruments.Get;\n\n\nICheckoutApi api = CheckoutSdk.Builder().OAuth()\n    .ClientCredentials(\"client_id\", \"client_secret\")\n    .Scopes(OAuthScope.PayoutsBankDetails)\n    .Environment(Environment.Sandbox)\n    .EnvironmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .HttpClientFactory(new DefaultHttpClientFactory())\n    .Build();\n\nBankAccountFieldQuery request = new BankAccountFieldQuery\n{\n    AccountHolderType = AccountHolderType.Individual, PaymentNetwork = PaymentNetwork.Local\n};\n\ntry\n{\n    BankAccountFieldResponse response = await api.InstrumentsClient()\n        .GetBankAccountFieldFormatting(CountryCode.GB, Currency.GBP, request);\n}\ncatch (CheckoutApiException e)\n{\n    // API error\n    string requestId = e.RequestId;\n    var statusCode = e.HttpStatusCode;\n    IDictionary<string, object> errorDetails = e.ErrorDetails;\n}\ncatch (CheckoutArgumentException e)\n{\n    // Bad arguments\n}\ncatch (CheckoutAuthorizationException e)\n{\n    // Invalid authorization\n}"
        - lang: Go
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-go\nimport (\n	\"github.com/checkout/checkout-sdk-go\"\n	\"github.com/checkout/checkout-sdk-go/common\"\n	\"github.com/checkout/checkout-sdk-go/configuration\"\n	instruments \"github.com/checkout/checkout-sdk-go/instruments/nas\"\n)\n\n// OAuth\napi, err := checkout.\n			Builder().\n			OAuth().\n			WithClientCredentials(\"client_id\", \"client_secret\").\n			WithScopes([]string{configuration.PayoutsBankDetails}).\n			WithEnvironment(configuration.Sandbox()). // or Environment.PRODUCTION\n                        WithEnvironmentSubdomain(\"{prefix}\"). // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n			Build()\nif err != nil {\n	return nil, err\n}\n\nquery := instruments.QueryBankAccountFormatting{\n	AccountHolderType: common.Individual,\n	PaymentNetwork:    instruments.Local,\n}\n\nresponse, err := api.Instruments.GetBankAccountFieldFormatting(\"GB\", \"GBP\", query)\nif err != nil {\n	return nil, err\n}\n\nreturn response, nil"
        - lang: Java
          source: "// For more information please refer to https://github.com/checkout/checkout-sdk-javaç\nimport com.checkout.CheckoutApi;\nimport com.checkout.CheckoutApiException;\nimport com.checkout.CheckoutArgumentException;\nimport com.checkout.CheckoutAuthorizationException;\nimport com.checkout.CheckoutSdk;\nimport com.checkout.Environment;\nimport com.checkout.OAuthScope;\nimport com.checkout.common.AccountHolderType;\nimport com.checkout.common.CountryCode;\nimport com.checkout.common.Currency;\nimport com.checkout.instruments.get.BankAccountFieldQuery;\nimport com.checkout.instruments.get.BankAccountFieldResponse;\nimport com.checkout.instruments.get.PaymentNetwork;\n\n// OAuth\nCheckoutApi api = CheckoutSdk.builder()\n    .oAuth()\n    .clientCredentials(\"client_id\", \"client_secret\")\n    .scopes(OAuthScope.PAYOUTS_BANK_DETAILS) // more scopes available\n    .environment(Environment.SANDBOX) // or Environment.PRODUCTION\n    .environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .build();\n\nBankAccountFieldQuery query = BankAccountFieldQuery.builder()\n    .accountHolderType(AccountHolderType.INDIVIDUAL)\n    .paymentNetwork(PaymentNetwork.LOCAL)\n    .build();\n\ntry {\n    BankAccountFieldResponse response = api.instrumentsClient().getBankAccountFieldFormatting(CountryCode.GB, Currency.GBP, query).get();\n} catch (CheckoutApiException e) {\n    // API error\n    String requestId = e.getRequestId();\n    int statusCode = e.getHttpStatusCode();\n    Map<String, Object> errorDetails = e.getErrorDetails();\n} catch (CheckoutArgumentException e) {\n    // Bad arguments\n} catch (CheckoutAuthorizationException e) {\n    // Invalid authorization\n}"
        - lang: Node
          source: "import { Checkout } from 'checkout-sdk-node';\n\nlet cko = new Checkout('your_client_secret_here', {\n	client: 'ack_XXXXXXXXXXXX',\n	scope: ['gateway'], // array of scopes\n	environment: 'sandbox', // or \"production\"\n        subdomain: '{prefix}', // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints., // or \"production\"\n});\n\n// Or if you use api keys:\n// const cko = new Checkout('sk_sbox_XXX', { pk: 'pk_sbox_XXX'}});\n\ntry {\n	const bank = await cko.instruments.getBankAccountFieldFormatting('GB', 'GBP');\n} catch (err) {\n	console.log(err.name);\n}"
        - lang: PHP
          source: "<?php\n//For more information please refer to https://github.com/checkout/checkout-sdk-php\n\nuse Checkout\\CheckoutApiException;\nuse Checkout\\CheckoutAuthorizationException;\nuse Checkout\\CheckoutSdk;\nuse Checkout\\Common\\AccountHolderType;\nuse Checkout\\Common\\Country;\nuse Checkout\\Common\\Currency;\nuse Checkout\\Environment;\nuse Checkout\\Instruments\\Get\\BankAccountFieldQuery;\nuse Checkout\\Instruments\\Get\\PaymentNetwork;\nuse Checkout\\OAuthScope;\n\n$api = CheckoutSdk::builder()->oAuth()\n    ->clientCredentials(\"client_id\", \"client_secret\")\n    ->scopes([OAuthScope::$PayoutsBankDetails])\n    ->environment(Environment::sandbox())\n    ->environmentSubdomain(\"{prefix}\") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    ->build();\n\n$request = new BankAccountFieldQuery();\n$request->payment_network = PaymentNetwork::$local;\n$request->account_holder_type = AccountHolderType::$individual;\n\ntry {\n    $response = $api->getInstrumentsClient()->getBankAccountFieldFormatting(Country::$GB, Currency::$GBP, $request);\n} catch (CheckoutApiException $e) {\n    // API error\n    $error_details = $e->error_details;\n    $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null;\n} catch (CheckoutAuthorizationException $e) {\n    // Bad Invalid authorization\n}"
        - lang: Python
          source: "# For more information please refer to https://github.com/checkout/checkout-sdk-python\nimport checkout_sdk\nfrom checkout_sdk.instruments.instruments import BankAccountFieldQuery, AccountHolderType, PaymentNetwork\nfrom checkout_sdk.checkout_sdk import CheckoutSdk\nfrom checkout_sdk.common.enums import Country, Currency\nfrom checkout_sdk.environment import Environment\nfrom checkout_sdk.exception import CheckoutApiException, CheckoutArgumentException, CheckoutAuthorizationException\nfrom checkout_sdk.oauth_scopes import OAuthScopes\n\n# OAuth\noauth = (\n    CheckoutSdk.builder() \n    .oauth() \n    .client_credentials('client_id', 'client_secret') \n    .environment(Environment.sandbox())  # or Environment.production()\n    .environment_subdomain(\"{prefix}\")  # Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.\n    .scopes([OAuthScopes.PAYOUTS_BANK_DETAILS]) \n    .build()\n)\n\nquery = BankAccountFieldQuery()\nquery.account_holder_type = AccountHolderType.INDIVIDUAL\nquery.payment_network = PaymentNetwork.LOCAL\n\ntry:\n    response = api.instruments.get_bank_account_field_formatting(Country.GB, Currency.GBP, query)\nexcept CheckoutApiException as err:\n    # API error\n    request_id = err.request_id\n    status_code = err.http_status_code\n    error_details = err.error_details\n    http_response = err.http_response\nexcept CheckoutArgumentException as err:\n    # Bad arguments\n\nexcept CheckoutAuthorizationException as err:\n    # Invalid authorization"
components:
  schemas:
    Address:
      type: object
      properties:
        address_line1:
          type: string
          description: The first line of the address.
          maxLength: 200
          example: 123 High St.
        address_line2:
          type: string
          description: |
            The second line of the address. <p/>
      
             For SEPA payments, this value has a maximum length of 10 characters.
          maxLength: 200
          example: Flat 456
        city:
          type: string
          description: The address city.
          maxLength: 50
          example: London
        state:
          type: string
          description: "The state or province of the address country <a href=\"https://en.wikipedia.org/wiki/ISO_3166-2\" target=\"_blank\">ISO 3166-2 code</a> (for example: CA for California in the United States)."
          maxLength: 3
        zip:
          type: string
          description: The address zip or postal code.
          maxLength: 50
          example: SW1A 1AA
        country:
          type: string
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the address.
          example: GB
          maxLength: 2
          minLength: 2
    AdvAddress:
      type: object
      description: The address extracted from the document.
      properties:
        address_line1:
          type: string
          description: The first line of the address.
          maxLength: 250
          example: 123 Main Street
        address_line2:
          type: string
          description: The second line of the address.
          maxLength: 250
          example: Apt 4B
        city:
          type: string
          description: The city or town.
          maxLength: 50
          example: London
        state:
          type: string
          description: The state, county, or province.
          maxLength: 50
          example: Greater London
        zip:
          type: string
          description: The postal or ZIP code.
          maxLength: 50
          example: SW1A 1AA
        country:
          type: string
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the address.
          maxLength: 2
          example: GB
    AdvAddressDocumentResult:
      type: object
      description: The result of the address document check.
      readOnly: true
      properties:
        document_type:
          type: string
          description: The type of address document submitted.
          example: utility_bill
        issuer:
          type: string
          description: The issuer of the address document.
          example: EDF Energy
        full_names:
          type: array
          description: The full names of the people named on the document. This can contain more than one name, for example if the document lists joint account holders.
          items:
            type: string
            description: The full name of a person named on the document.
          example:
            - Hannah Bret
        issue_date:
          type: string
          format: date
          description: The date the document was issued.
          example: '2024-01-15'
        address:
          $ref: '#/components/schemas/AdvAddress'
    AdvAddressDocumentVerification:
      type: object
      required:
        - applicant_id
        - user_journey_id
      allOf:
        - $ref: '#/components/schemas/AdvAddressDocumentVerificationBase'
    AdvAddressDocumentVerificationBase:
      type: object
      properties:
        applicant_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/ApplicantId'
        user_journey_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/IdvUserJourneyId'
        declared_data:
          $ref: '#/components/schemas/IdvDeclaredData'
    AdvAddressDocumentVerificationId:
      type: string
      description: The address document verification's unique identifier.
      pattern: ^adv_\w+$
      example: adv_tkoi5db4hryu5cei5vwoabr7we
      readOnly: true
    AdvAddressDocumentVerificationOutput:
      type: object
      required:
        - id
        - applicant_id
        - user_journey_id
        - status
        - response_codes
        - _links
      properties:
        id:
          $ref: '#/components/schemas/AdvAddressDocumentVerificationId'
        status:
          $ref: '#/components/schemas/AdvVerificationStatuses'
        address_document:
          $ref: '#/components/schemas/AdvAddressDocumentResult'
        response_codes:
          $ref: '#/components/schemas/IdvResponseCodes'
        _links:
          $ref: '#/components/schemas/IdvIdentityVerificationLinks'
      allOf:
        - $ref: '#/components/schemas/DatedObject'
        - $ref: '#/components/schemas/AdvAddressDocumentVerificationBase'
    AdvAttemptId:
      type: string
      description: The unique identifier for the address document verification attempt.
      pattern: ^adva_\w+$
      example: adva_tkoi5db4hryu5cei5vwoabr7we
      readOnly: true
    AdvAttemptRequest:
      type: object
      required:
        - document
      properties:
        document:
          type: string
          description: The address document image to upload.
          format: binary
    AdvAttemptResponse:
      type: object
      required:
        - id
        - status
        - response_codes
        - _links
      properties:
        id:
          type: string
          allOf:
            - $ref: '#/components/schemas/AdvAttemptId'
        status:
          type: string
          allOf:
            - $ref: '#/components/schemas/AdvAttemptStates'
        response_codes:
          type: array
          description: One or more [response codes](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Response_codes) that provide more information about the status.
          readOnly: true
          minItems: 0
          items:
            $ref: '#/components/schemas/IdvResponseCode'
        _links:
          $ref: '#/components/schemas/IdvSelfLink'
      allOf:
        - $ref: '#/components/schemas/DatedObject'
    AdvAttemptResponseList:
      type: object
      required:
        - total_count
        - skip
        - limit
        - data
        - _links
      properties:
        total_count:
          type: integer
          description: The total number of attempts.
        skip:
          type: integer
          description: The number of attempts skipped.
        limit:
          type: integer
          description: The maximum number of attempts returned.
        data:
          type: array
          description: The details of the attempts.
          minItems: 0
          items:
            $ref: '#/components/schemas/AdvAttemptResponse'
        _links:
          $ref: '#/components/schemas/IdvSelfLink'
    AdvAttemptStates:
      type: string
      description: The [status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Attempt_statuses) of the address document verification attempt.
      enum:
        - checks_in_progress
        - checks_inconclusive
        - completed
        - quality_checks_aborted
        - quality_checks_in_progress
        - terminated
    AdvVerificationStatuses:
      type: string
      description: The address document [verification status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Check_statuses).
      enum:
        - created
        - quality_checks_in_progress
        - checks_in_progress
        - approved
        - declined
        - retry_required
        - inconclusive
    DelegatedPaymentAllowance:
      type: object
      description: The spending constraints that define what the delegated payment token is authorized for.
      required:
        - reason
        - max_amount
        - currency
        - merchant_id
        - checkout_session_id
        - expires_at
      properties:
        reason:
          type: string
          description: The reason for the allowance.
          enum:
            - one_time
          example: one_time
        max_amount:
          type: integer
          description: |
            The maximum amount that can be charged using the delegated payment token.
      
            Provide the amount in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="_blank">minor currency unit</a>.
          example: 10000
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO 4217 currency code</a>.
          example: 'USD'
          maxLength: 3
          minLength: 3
        merchant_id:
          type: string
          description: The unique identifier of the merchant that will process the payment.
          maxLength: 256
          example: 'cli_vkuhvk4vjn2edkps7dfsq6emqm'
        checkout_session_id:
          type: string
          description: The identifier of the checkout session associated with this delegated payment.
          example: '1PQrsT'
        expires_at:
          type: string
          format: date-time
          description: |
            The expiry time of the delegated payment token, in RFC 3339 format. Must be a time in the future.
          example: '2025-10-09T07:20:50.52Z'
    DelegatedPaymentBillingAddress:
      type: object
      description: The customer billing address associated with the delegated payment.
      required:
        - name
        - line_one
        - city
        - postal_code
        - country
      properties:
        name:
          type: string
          description: The full name of the customer.
          maxLength: 256
          example: 'John Doe'
        line_one:
          type: string
          description: The first line of the street address.
          maxLength: 60
          example: '123 Fake St.'
        line_two:
          type: string
          description: The second line of the street address.
          maxLength: 60
          example: 'Unit 1'
        city:
          type: string
          description: The city of the billing address.
          maxLength: 60
          example: 'San Francisco'
        state:
          type: string
          description: The state, county, province, or region of the billing address.
          example: 'CA'
        postal_code:
          type: string
          description: The postal code or ZIP code of the billing address.
          maxLength: 20
          example: '12345'
        country:
          type: string
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO 3166-1 alpha-2 country code</a>.
          maxLength: 2
          minLength: 2
          example: 'US'
    DelegatedPaymentErrorResponse:
      type: object
      description: The error response returned when a delegated payment request fails.
      properties:
        type:
          type: string
          description: |
            The error category.
          enum:
            - invalid_request
            - rate_limit_exceeded
            - processing_error
            - service_unavailable
          example: 'invalid_request'
        code:
          type: string
          description: A machine-readable error code identifying the specific error.
          example: 'invalid_card'
        message:
          type: string
          description: A human-readable description of the error.
          example: 'Missing/malformed field'
        param:
          type: string
          nullable: true
          description: A JSONPath-style reference to the request field that caused the error, or null if not applicable.
          example: '$.payment_method.number'
    DelegatedPaymentMethodCard:
      type: object
      description: The card details for a delegated payment.
      required:
        - type
        - card_number_type
        - number
        - metadata
      properties:
        type:
          type: string
          description: The payment method type.
          enum:
            - card
          example: card
        card_number_type:
          type: string
          description: |
            The type of card number provided.
      
            - `fpan` – a Funding Primary Account Number. The card number printed on the card.
            - `network_token` – a provisioned network token that represents the underlying card.
          enum:
            - fpan
            - network_token
          example: fpan
        number:
          type: string
          description: |
            The full card number.
          example: '4242424242424242'
        exp_month:
          type: string
          description: The card expiry month, in two-digit format (MM).
          minLength: 2
          maxLength: 2
          example: '11'
        exp_year:
          type: string
          description: The card expiry year, in four-digit format (YYYY).
          minLength: 4
          maxLength: 4
          example: '2026'
        name:
          type: string
          description: The name of the cardholder as it appears on the card.
          example: 'Jane Doe'
        cvc:
          type: string
          description: The card verification code (CVC/CVV).
          minLength: 3
          maxLength: 4
          example: '223'
        cryptogram:
          type: string
          description: The cryptogram associated with a network token transaction. Required when `card_number_type` is `network_token`.
          example: 'gXc5UCLnM6ckD7pjM1TdPA=='
        eci_value:
          type: string
          description: The Electronic Commerce Indicator (ECI) or Security Level Indicator (SLI) value for network token transactions.
          example: '07'
        checks_performed:
          type: array
          description: A list of verification checks that have been performed on the card.
          items:
            type: string
          example:
            - avs
            - cvv
            - ani
            - auth0
        iin:
          type: string
          description: The Issuer Identification Number (IIN), also known as the Bank Identification Number (BIN). This is typically the first 6 digits of the card number.
          minLength: 6
          maxLength: 6
          example: '123456'
        display_card_funding_type:
          type: string
          description: The funding type of the card, used for display purposes.
          enum:
            - credit
            - debit
            - prepaid
          example: credit
        display_wallet_type:
          type: string
          description: The wallet type associated with the card, used for display purposes (for example, Apple Pay or Google Pay).
          example: 'wallet'
        display_brand:
          type: string
          description: The card brand, used for display purposes (for example, Visa, Mastercard).
          example: 'Visa'
        display_last4:
          type: string
          description: The last four digits of the card number, used for display purposes.
          minLength: 4
          maxLength: 4
          example: '4242'
        metadata:
          type: object
          description: A set of key-value pairs containing additional payment method metadata.
          additionalProperties:
            type: string
          example:
            issuing_bank: 'temp'
    DelegatedPaymentRequest:
      type: object
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        The request body for creating a delegated payment token.
      required:
        - payment_method
        - allowance
        - risk_signals
        - metadata
      properties:
        payment_method:
          description: The card payment method details.
          allOf:
            - $ref: '#/components/schemas/DelegatedPaymentMethodCard'
        allowance:
          description: The spending constraints for the delegated payment token.
          allOf:
            - $ref: '#/components/schemas/DelegatedPaymentAllowance'
        billing_address:
          description: The customer billing address.
          allOf:
            - $ref: '#/components/schemas/DelegatedPaymentBillingAddress'
        risk_signals:
          type: array
          description: An array of risk assessment signals provided by the platform.
          items:
            $ref: '#/components/schemas/DelegatedPaymentRiskSignal'
        metadata:
          type: object
          description: |
            A set of key-value pairs to attach to the delegated payment request.
      
            The `metadata` object only supports string values.
          additionalProperties:
            type: string
          example:
            campaign: 'q4'
    DelegatedPaymentResponse:
      type: object
      description: The response returned when a delegated payment token is successfully created.
      required:
        - id
        - created
        - metadata
      properties:
        id:
          type: string
          description: The unique identifier of the provisioned payment token.
          example: 'vt_abc123def456ghi789'
        created:
          type: string
          format: date-time
          description: The date and time the token was created, in RFC 3339 format.
          example: '2026-03-11T10:30:00Z'
        metadata:
          type: object
          description: A set of key-value pairs containing response metadata.
          additionalProperties:
            type: string
          example:
            psp: 'checkout.com'
    DelegatedPaymentRiskSignal:
      type: object
      description: A risk assessment signal provided by the platform to support fraud decisioning.
      required:
        - type
        - score
        - action
      properties:
        type:
          type: string
          description: The type of risk signal.
          example: 'card_testing'
        score:
          type: integer
          description: The risk score associated with this signal.
          example: 10
        action:
          type: string
          description: The action taken based on the risk assessment.
          example: 'blocked'
    AmlVerification:
      type: object
      required:
        - id
      properties:
        id:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/AmlVerificationId'
      allOf:
        - $ref: '#/components/schemas/DatedObject'
        - $ref: '#/components/schemas/AmlVerificationBase'
    AmlVerificationBase:
      type: object
      required:
        [status, _links, applicant_id, search_parameters]
      allOf:
        - properties:
            status:
              readOnly: true
              allOf:
                - $ref: "#/components/schemas/AmlVerificationStatuses"
            applicant_id:
              readOnly: false
              allOf:
                - $ref: "#/components/schemas/ApplicantId"
            search_parameters:
              $ref: "#/components/schemas/SearchParameters"
            monitored:
              type: boolean
              description: Indicates whether to continue to [monitor the applicant's AML status](https://www.checkout.com/docs/business-operations/manage-identities/screen-aml-databases#Configure_monitoring).
            _links:
              readOnly: true
              allOf:
                - $ref: "#/components/schemas/AmlVerificationLinks"
    AmlVerificationCreateBase:
      type: object
      required:
        [status, _links]
      allOf:
        - $ref: "#/components/schemas/AmlVerificationBase"
    AmlVerificationId:
      type: string
      description: The AML screening's unique identifier.
      pattern: ^amlv_\w+$
      example: amlv_tkoi5db4hryu5cei5vwoabr7we
      readOnly: true
    AmlVerificationLinks:
      type: object
      allOf:
        - $ref: '#/components/schemas/IdvSelfLink'
    AmlVerificationOutput:
      type: object
      required: [id]
      properties:
        id:
          $ref: "#/components/schemas/AmlVerificationId"
      allOf:
        - $ref: "#/components/schemas/DatedObject"
        - $ref: "#/components/schemas/AmlVerificationCreateBase"
    AmlVerificationStatuses:
      type: string
      description: The [screening status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Check_statuses).
      readOnly: true
      enum:
        - created
        - screening_in_progress
        - approved
        - declined
        - review_required
    SearchParameters:
      type: object
      required: [configuration_identifier]
      description: The screening's configuration details.
      properties:
        configuration_identifier:
          type: string
          description: Your AML Screening [configuration ID](https://www.checkout.com/docs/business-operations/manage-identities/screen-aml-databases#Configuration).
          example: "12345678-1234-1234-1234-123456789012"
    ApplePayCertificateRequest:
      type: object
      description: Certificate content to be added an account
      required:
        - content
      properties:
        content:
          type: string
          description: The certificate content
          example: MIIEfTCCBCOgAwIBAgIID/asezaWNycwCgYIKoZIzj0EAwIwgYAxNDAyBgNVBAMMK0FwcGxlIFdvcmxkd2lkZSBEZXZlbG9wZXIgUmVsYXRpb25zIENBIC0gRzIxJjAkBgNVBAsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUzAeFw0yMTA2MTExMzQ0MjVaFw0yMzA3MTExMzQ0MjRaMIGuMS0wKwYKCZImiZPyLGQBAQwdbWVyY2hhbnQuY29tLmNoZWNrb3V0LnNhbmRib3gxQzBBBgNVBAMMOkFwcGxlIFBheSBQYXltZW50IFByb2Nlc3Npbmc6bWVyY2hhbnQuY29tLmNoZWNrb3V0LnNhbmRib3gxEzARBgNVBAsMCkUzMlhCUUs0UTUxFjAUBgNVBAoMDUNoZWNrb3V0IEx0ZC4xCzAJBgNVBAYTAkdCMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEsvyUM9D1cssldH+VPptEn4VAw/Q6ovJuHVlyBSRaPGLHFce04lCiT/xnXOWRkUxyCzQWKhfG2zo19u4s+evx7aOCAlUwggJRMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUhLaEzDqGYnIWWZToGqO9SN863wswRwYIKwYBBQUHAQEEOzA5MDcGCCsGAQUFBzABhitodHRwOi8vb2NzcC5hcHBsZS5jb20vb2NzcDA0LWFwcGxld3dkcmNhMjAxMIIBHQYDVR0gBIIBFDCCARAwggEMBgkqhkiG92NkBQEwgf4wgcMGCCsGAQUFBwICMIG2DIGzUmVsaWFuY2Ugb24gdGhpcyBjZXJ0aWZpY2F0ZSBieSBhbnkgcGFydHkgYXNzdW1lcyBhY2NlcHRhbmNlIG9mIHRoZSB0aGVuIGFwcGxpY2FibGUgc3RhbmRhcmQgdGVybXMgYW5kIGNvbmRpdGlvbnMgb2YgdXNlLCBjZXJ0aWZpY2F0ZSBwb2xpY3kgYW5kIGNlcnRpZmljYXRpb24gcHJhY3RpY2Ugc3RhdGVtZW50cy4wNgYIKwYBBQUHAgEWKmh0dHA6Ly93d3cuYXBwbGUuY29tL2NlcnRpZmljYXRlYXV0aG9yaXR5LzA2BgNVHR8ELzAtMCugKaAnhiVodHRwOi8vY3JsLmFwcGxlLmNvbS9hcHBsZXd3ZHJjYTIuY3JsMB0GA1UdDgQWBBRNhvr33NDuM4QxBZd16a+ACbHoEzAOBgNVHQ8BAf8EBAMCAygwTwYJKoZIhvdjZAYgBEIMQDdGRjg0REI5MDE5NkVGN0I5RTc4NDZEMjg4NzZCNkJGRDU2RjM4MDlCNzUyNjAzRDM4QzcxNUJFMTY2M0JENEMwCgYIKoZIzj0EAwIDSAAwRQIgTjywMwOrLX3TwDUrPn7yDGL/dhc+VNudv0uGBOWRyXACIQClFQFvgx+hfTwVdHt8klrswpgtZtbYjs74p9GYuc8Puw==
    ApplePayCertificateResponse:
      type: object
      description: Response for an attached certificate for an account
      required: 
        - id
        - public_key_hash
        - valid_from
        - valid_until
      properties:
          id:
            type: string
            pattern: ^aplc_(\w{26})$
            description: The identifier of the account domain
            example: aplc_hefptsiydvkexnzzb35zrlqgfq
      
          public_key_hash:
            type: string
            description: Hash of the certificate public key
            example: tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6Nl0=
      
          valid_from:
            type: string
            format: date-time
            description: When the certificate is valid from
            example: 2021-01-01T17:32:28Z
      
          valid_until:
            type: string
            format: date-time
            description: When the certificate is valid until
            example: 2025-01-01T17:32:28Z 
    ApplePayEnrollmentErrorResponse:
      type: object
      properties:
        error_codes:
          type: array
          items:
            type: string
            enum:
              - invalid_request
              - domain_not_enrolled
              - domain_does_not_exist
              - domain_verification_failed
              - invalid_domain
        error_type:
          type: string
          enum:
            - invalid_request
            - domain_not_enrolled
            - domain_does_not_exist
            - domain_verification_failed
        request_id:
          type: string
    ApplePayEnrollmentRequest:
      type: object
      description: The enrollment request used to onboard the domain
      properties:
        domain:
          type: string
          description: The domain to enroll
          minLength: 1
          example: 'https://someDomain.com'
    ApplePaySigningRequest:
      type: object
      description: The encryption type used for the signing request.
      properties:
        protocol_version:
          type: string
          description: The protocol version of the encryption type used.
          enum:
            - ec_v1
            - rsa_v1
          default: ec_v1
    ApplePaySigningRequestResponse:
      type: object
      description: Retrieve a signing request for an account to begin certification process
      required:
        - content
      properties:
        content:
          type: string
          description: The signing request content
          example: -----BEGIN CERTIFICATE REQUEST-----MIIBSDCB8AIBADCBjzELMAkGA1UEBhMCR0IxDzANBgNVBAgMBkxvbmRvbjEPMA0GA1UEBwwGTG9uZG9uMRUwEwYDVQQKDAxDaGVja291dC5jb20xCzAJBgNVBA8MAklUMRUwEwYDVQQDDAxjaGVja291dC5jb20xIzAhBgkqhkiG9w0BCQEWFHN1cHBvcnRAY2hlY2tvdXQuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEXf/MDFRLSblykajGm0GE+lUNoOIEa0DbWc7Bv3s55bYtW1fJo2/MJIPojUKuKUx2VsEfGmmqXKbq4IhAr0bM8TAKBggqhkjOPQQDAgNHADBEAiAo1Dv4TXTacSeIfy4HDjzPMQY2+OxTW6szRJjGyfKgXQIgdHAX0BmI+1rozysjXv8MvoxehQIGACQ+UWJle+UZ2ms=-----END CERTIFICATE REQUEST----- 
    ApplicantId:
      type: string
      description: The applicant's unique identifier.
      pattern: ^aplt_\w+$
      example: aplt_tkoi5db4hryu5cei5vwoabr7we
      readOnly: true
    Attempt:
      type: object
      properties:
        scheme:
          type: string
          description: The card scheme to use for the payment attempt.
          enum:
            - accel
            - amex
            - cartes_bancaires
            - diners
            - discover
            - jcb
            - mada
            - maestro
            - mastercard
            - nyce
            - omannet
            - pulse
            - shazam
            - star
            - upi
            - visa
    Balance:
      type: object
      title: Balance values
      description: The respective balance values.
      properties:
        pending:
          type: number
          description: The total incoming funds that will be added to the Available balance once cleared.
          example: 23000
        available:
          type: number
          description: The funds that are available for processing.
          example: 50000
        payable:
          type: number
          description: The funds reserved from the Available balance for outgoing transactions that are yet to clear.
          example: 2700
        collateral:
          type: number
          description: The funds held by Checkout.com to cover potential liabilities and risk events associated with your payment processing.
          example: 6000
        operational:
          type: number
          description: The funds held for processing Payouts and Issuing payments when the Available balance is insufficient.
          example: 7000
        collateral_breakdown:
          type: object
          title: Collateral breakdown
          description: A breakdown of the funds held in the `collateral` balance.
          required:
            - fixed_reserve
            - rolling_reserve
          properties:
            fixed_reserve:
              type: number
              description: The portion of the `collateral` balance held as a fixed reserve.
              example: 4000
            rolling_reserve:
              type: number
              description: The portion of the `collateral` balance held as a rolling reserve.
              example: 2000
    BalancesResponse:
      type: object
      title: Balances response
      description: A list of balances for each currency account returned from the request.
      properties:
        data:
          type: array
          title: Balances
          description: The list of requested balances.
          items:
            $ref: '#/components/schemas/CurrencyAccountBalance'
    CurrencyAccountBalance:
      type: object
      title: Currency Account Balance
      description: The currency account details and balance.
      properties:
        currency_account_id:
          type: string
          description: The unique identifier of the currency account (sub-account). Returned only when the request is made with `withCurrencyAccountId=true`.
          example: ca_g5y7d6jo4e2urgforcbf2ey5jm
        descriptor:
          type: string
          description: A descriptor for the currency account.
          example: Revenue Account 1
        holding_currency:
          type: string
          description: The holding currency of the currency account (the three character ISO 4217 code).
          example: EUR
        balances_as_of:
          type: string
          format: date-time
          description: The UTC datetime reflecting when the balance values were fetched. If the request includes a `balancesAt` query parameter, this matches that value; otherwise, it is the time the request was processed.
          example: '2026-05-06T13:59:59.9999999+00:00'
        balances:
          $ref: '#/components/schemas/Balance'
    CardPayoutAcceptedResponse:
      title: Card Payout
      type: object
      description: Payout accepted response
      required:
        - id
        - status
        - instruction
        - _links
      properties:
        id:
          type: string
          description: The payment's unique identifier.
          pattern: '^(pay)_(\w{26})$'
          maxLength: 30
          minLength: 30
          example: pay_8n2n4o4dsasergngxiq3cx4xtu
        status:
          type: string
          enum:
            - Accepted
            - Rejected
          description: The payout status.
          example: Accepted
        reference:
          type: string
          description: The reference you provided in the payout request.
          maxLength: 50
          example: example payout
        destination:
          type: object
          description: The payout destination.
          properties:
            account_holder:
              type: object
              description: The account holder details.
              properties:
                id:
                  type: string
                  description: The payment destination identifier (e.g., a card source identifier)
                  pattern: '^(src)_(\w{26})$'
                  minLength: 30
                  maxLength: 30
                  example: src_nwd3m4in3hkuddfpjsaevunhdy
        _links:
          type: object
          description: The links related to the payout.
          required:
            - href
          properties:
            self:
              type: object
              description: The payout URI.
              properties:
                href:
                  type: string
                  description: The link URL
                  example: https://{prefix}.api.sandbox.checkout.com/payments/pay_8n2n4o4dsasergngxiq3cx4xtu
    CardPayoutActionsResponse:
      type: array
      items:
        $ref: '#/components/schemas/PaymentAction'
      minItems: 1
      description: |
        The payout actions.
      example:
        - 'id': 'act_z4s46odkw3uerbgujmxdjknthu'
          'type': 'Payout'
          'processed_on': '2018-01-20T10:30:48Z'
          'amount': 1000
          'approved': true
          'response_code': '10000'
          'response_summary': 'Approved'
    CardPayoutDetails:
      type: object
      description: Payout accepted response
      required:
        - id
        - requested_on
        - processed_on
        - source
        - destination
        - amount
        - currency
        - status
        - links 
      properties:
        id:
          type: string
          description: The unique identifier for the payout.
          pattern: '^(pay)_(\w{26})$'
          maxLength: 30
          minLength: 30
          example: pay_8n2n4o4dsasergngxiq3cx4xtu
        requested_on:
          type: string
          format: date-time
          description: The UTC date and time the payout was requested.
          example: "2019-08-24T14:15:22Z"
        processed_on:
          type: string
          format: date-time
          nullable: true
          description: If the scheme has finished processing the payout request, the UTC date and time the payout was approved or declined.
          example: "2019-08-24T14:15:22Z"
        source:
          type: object
          description: The source of the payout.
          required:
            - type
            - id
            - amount
            - currency
          properties:
            type:
              type: string
              description: The source used to fund the payout.
              enum:
                - currency_account
              example: currency_account
            id:
              type: string
              description: The identifier for the currency account used to fund the payout.
              pattern: '^(ca)_(\w{26})$'
              maxLength: 29
              minLength: 29
              example: ca_y3oqhf46pyzuxjbcn2giaqnb44
            amount:
              type: integer
              description: The amount to be paid out from the currency account.
              example: 100
            currency:
              type: string
              maxLength: 3
              minLength: 3
              description: The currency associated with the currency account, as a [three-letter ISO 4217 code](https://www.checkout.com/docs/developer-resources/codes/currency-codes).
              example: GBP
        destination:
          type: object
          description: The payout destination.
          required:
            - type
            - expiry_year
            - expiry_month
            - account_holder
            - last4
            - fingerprint
            - bin
          properties:
            type:
              type: string
              description: The payout destination type.
              enum:
                - token
                - id
                - card
              example: token
            token:
              type: string
              maxLength: 30
              minLength: 30
              description: If `type` = `token`. The Checkout.com token  (eg a card, wallet or token)
              pattern: '^(tok)_(\w{26})$'
              example: tok_ihvkileifkzebkgnhkskbglyte
            id:
              type: string
              description: The payment source identifier. For example, a card source ID.
              example: ca_y3oqhf46pyzuxjbcn2giaqnb44
            expiry_year:
              type: integer
              description: The card expiration year.
              maxLength: 4
              minLength: 4
              example: 2024
            expiry_month:
              type: integer
              description: The card expiration month.
              maxLength: 2
              minLength: 1
              example: 12
            account_holder:
              type: object
              description: The account holder's details.
              required:
                - type
              properties:
                type:
                  type: string
                  description: The account holder type.
                  enum:
                    - individual
                    - corporate
                    - government
                  example: individual
                first_name:
                  type: string
                  maxLength: 35
                  description: Present if `destination.account_holder.type` is `individual`.
                  example: John
                last_name:
                  type: string
                  maxLength: 35
                  description: Present if `destination.account_holder.type` is `individual`.
                  example: Smith
                company_name:
                  type: string
                  maxLength: 35
                  description: Present if `destination.account_holder.type` is `corporate` or `government`.
                  example: ABC International
            scheme:
              type: string
              description: The card scheme.
              example: visa
            last4:
              type: string
              description: The last four digits of the card number.
              example: '4242'
            fingerprint:
              type: string
              description: The card's unique fingerprint.
              example: 436d1eb12c4b92b9eeb1e798dea93a718c78f5362c7fb5d84b51c72a869b6101
            card_type:
              type: string
              description: The card type.
              enum:
                - UNKNOWN
                - CREDIT
                - DEBIT
                - PREPAID
                - CHARGE
                - DEFERRED DEBIT
              example: CREDIT
            card_category:
              type: string
              description: The card category.
              enum:
                - UNKNOWN
                - CONSUMER
                - COMMERCIAL
              example: CONSUMER
            issuer:
              type: string
              description: The issuer name.
              example: ABC Bank
            issuer_country:
              type: string
              description: The issuer country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              example: GB
            product_id:
              type: string
              description: The issuer or card scheme product identifier.
              example: A
            product_type:
              type: string
              description: The issuer or card scheme product type.
              example: Visa Traditional
        amount:
          type: integer
          description: The amount to be paid out to the recipient. This will be equal to `destination.amount`.
          example: 100
        currency:
          type: string
          description: The destination currency, as a [three-letter ISO 4217 code](https://www.checkout.com/docs/developer-resources/codes/currency-codes).
          example: GBP
        reference:
          type: string
          description: An internal reference to identify the payout.
          maxLength: 50
          example: example payout
        billing_descriptor:
          type: object
          description: Details about the billing descriptor.
          properties:
            reference:
              type: string
              maxLength: 14
              description: |
                The dynamic billing descriptor displayed on the payout recipient's bank account statement. 
                
                Only alphanumeric characters are supported.
              example: Card Payout
        status:
          type: string
          description: The status of the payout.
          enum:
            - pending
            - approved
            - declined
          example: approved
        sender:
          type: object
          description: Details about the payout sender.
          properties:
            type:
              type: string
              description: This field is only returned for payout requests for some [funds transfer types](https://www.checkout.com/docs/payments/request-payouts/card-payouts#Fund_Transfer_Types).
              enum:
                - individual
                - corporate
                - government
              example: individual
            first_name:
              type: string
              maxLength: 35
              description: Present if `sender.type` is `individual`.
              example: Hayley
            last_name:
              type: string
              maxLength: 35
              description: Present if `sender.type` is `individual`.
              example: Jones
            company_name:
              type: string
              maxLength: 35
              description: Present if `sender.type` is `corporate` or `government`.
              example: "YXZ International"
        scheme_id:
          type: string
          description: The scheme transaction identifier.
          example: '199254206471459'
        instruction:
          type: object
          description: Details about the instruction for the payout.
          properties:
            funds_transfer_type:
              type: string
              description: Scheme categorisation of the client (FD, MT, AA etc.)
              example: AA
        metadata:
          type: object
          description: | 
            A set of key-value pairs to attach to the payment.
            
            You can use this to store additional information in a structured format.
          example: { 'payout_ref': 'MQIBN2' }
        links:
          type: object
          description: The links related to the payment.
          properties:
            self:
              type: object
              description: The payout URI.
              required:
                - href
              properties:
                href:
                  type: string
                  description: The link URL.
                  example: https://{prefix}.api.sandbox.checkout.com/payments/pay_8n2n4o4dsasergngxiq3cx4xtu
    CardPayoutItems:
      type: array
      description: The order's line items.
      items:
        type: object
        description: The order's line item or product that is being paid out.
        properties:
          type:
            type: string
            description: |
              The item type. For example, `physical` or `digital`.
      
              This field is used to provide item level metadata where applicable.
            enum:
              - digital
              - physical
            example:
              digital
          sub_type:
            type: string
            description: |
              The digital item type.
      
              If `type` is set to `digital`, this field is required.
            enum:
              - blockchain
              - cbdc
              - cryptocurrency
              - nft
              - stablecoin
            example:
              stablecoin
      
    01_CardPayoutRequest_DestinationAccountHolderIndividual:
      type: object
      description: The payout destination account holder's details.
      required:
        - type
        - first_name
        - last_name
      properties:
        type:
          type: string
          description: The type of account receiving the payout.
          example: 'individual'
        first_name:
          type: string
          description: |
            The account holder's first name.
      
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
            This must be a valid legal name. The following formats for the `first_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
             
            - a single character
            - all non-alphabetic characters
      
            This field is not required if the first name is already stored with the `token` or payment instrument `id` provided in `destination`.
          maxLength: 50
        middle_name:
          type: string
          description: |
            The account holder's middle name.
      
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
          maxLength: 50    
        last_name:
          type: string
          description: |
            The account holder's last name.
      
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
            This must be a valid legal name. The following formats for the `last_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
             
              - a single character
              - all non-alphabetic characters
      
      
            This field is not required if the last name is already stored with the `token` or payment instrument `id` provided in `destination`.
          maxLength: 50
    01_CardPayoutRequest_DestinationTypeCardAccountHolderIndividual:
      type: object
      description: The payout destination account holder's details.
      required:
        - type
        - first_name
        - last_name
      properties:
        type:
          type: string
          description: The type of account receiving the payout.
          example: 'individual'
        first_name:
          type: string
          description: |
            The account holder's first name.
      
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.  
            This must be a valid legal name. The following formats for the `first_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
            - a single character
            - all non-alphabetic characters
          maxLength: 50
        middle_name:
          type: string
          description: |
            The account holder's middle name.
      
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
          maxLength: 50
        last_name:
          type: string
          description: |
            The account holder's last name.
      
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
            This must be a valid legal name. The following formats for the `last_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
              - a single character
              - all non-alphabetic characters
          maxLength: 50
        billing_address:
          type: object
          description: |
            The account holder's billing address.
      
            If your company is incorporated in the United States, this field is required for all card payouts you perform.
          properties:
            address_line1:
              type: string
              description: |
                The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
              minLength: 3
            state:
              type: string
              description: |
                The address state.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                You must provide United States ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: |
                The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2
        phone:
          type: object
          description: The account holder's phone number.
          required:
            - country_code
            - number
          properties:
            country_code:
              type: string
              description: The international dialing code for the account holder's address `country`, as an [ITU-T E.164 code](https://checkout.com/docs/four/resources/codes/country-codes).
              maxLength: 7
              minLength: 1
            number:
              type: string
              description: The digits for the phone number, not including the `country_code`.
              maxLength: 25
              minLength: 6
        identification:
          type: object
          required:
            - type
            - number
          description: |
            The account holder's identification.
      
            Providing identification details for the payout recipient increases the likelihood of a successful payout.
          properties:
            type:
              type: string
              description: The type of identification for the account holder.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The account holder's identification number.
              maxLength: 25
            issuing_country:
              type: string
              description: |
                If applicable, the country that issued the account holder's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
      
                Providing `issuing_country` increases the likelihood of a successful identity verification.
              maxLength: 2
              minLength: 2
            date_of_expiry:
              type: string
              description: |
                If applicable, the expiration date of the account holder's identification, in the format `YYYY-MM-DD`.
      
                Providing `date_of_expiry` increases the likelihood of a successful identity verification.
              maxLength: 10
              minLength: 10
        email:
          type: string
          description: The account holder's email address.
          maxLength: 255             
        date_of_birth:
          type: string
          description: The account holder's date of birth, in the format `YYYY-MM-DD`.
          maxLength: 10
          minLength: 10
        country_of_birth:
          type: string
          description: The account holder's country of birth, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
          maxLength: 2
          minLength: 2           
    02_CardPayoutRequest_DestinationAccountHolderCorporate:
      type: object
      description: The payout destination account holder's details.
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The type of account receiving the payout.
          example: 'corporate'
        company_name:
          type: string
          description: |
            The corporate account holder's company name.
            
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
             
              - a single character
              - all non-alphabetic characters
          maxLength: 50
    02_CardPayoutRequest_DestinationTypeCardAccountHolderCorporate:
      type: object
      description: The payout destination account holder's details.
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The type of account receiving the payout.
          example: 'corporate'
        company_name:
          type: string
          description: |
            The corporate account holder's company name.
              
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
              - a single character
              - all non-alphabetic characters
          maxLength: 50
        billing_address:
          type: object
          description: |
            The account holder's billing address.
      
            If your company is incorporated in the United States, this field is required for all card payouts you perform.
          properties:
            address_line1:
              type: string
              description: |
                The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
              minLength: 3
            state:
              type: string
              description: The address state.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                You must provide US ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: |
                The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2
        phone:
          type: object
          description: The account holder's phone number.
          required:
            - country_code
            - number
          properties:
            country_code:
              type: string
              description: The international dialing code for the account holder's address `country`, as an [ITU-T E.164 code](https://checkout.com/docs/four/resources/codes/country-codes).
              maxLength: 7
              minLength: 1
            number:
              type: string
              description: The digits of the phone number, not including the `country_code`.
              maxLength: 25
              minLength: 6
        identification:
          type: object
          required:
            - type
            - number
          description: |
            The account holder's identification.
      
            Providing identification details for the payout recipient increases the likelihood of a successful payout.
          properties:
            type:
              type: string
              description: The type of identification for the account holder.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The account holder's identification number.
              maxLength: 25
            issuing_country:
              type: string
              description: |
                If applicable, the country that issued the account holder's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
      
                Providing `issuing_country` increases the likelihood of a successful identity verification.
              maxLength: 2
              minLength: 2
            date_of_expiry:
              type: string
              description: |
                If applicable, the expiration date of the account holder's identification, in the format `YYYY-MM-DD`.
      
                Providing `date_of_expiry` increases the likelihood of a successful identity verification.
              maxLength: 10
              minLength: 10
        email:
          type: string
          description: The account holder's email address.
          maxLength: 255
    03_CardPayoutRequest_DestinationAccountHolderGovernment:
      type: object
      description: The payout destination account holder's details.
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The type of account receiving the payout.
          example: 'government'
        company_name:
          type: string
          description: |
            The government account holder's company name.
            
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
             
              - a single character
              - all non-alphabetic characters
          maxLength: 50
    03_CardPayoutRequest_DestinationTypeCardAccountHolderGovernment:
      type: object
      description: The payout destination account holder's details.
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The type of account receiving the payout.
          example: 'corporate'
        company_name:
          type: string
          description: |
            The account holder's company name.
              
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
              - a single character
              - all non-alphabetic characters
          maxLength: 50
        billing_address:
          type: object
          description: |
            The account holder's billing address.
      
            If your company is incorporated in the United States, this field is required for all card payouts you perform.
          properties:
            address_line1:
              type: string
              description: |
                The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
              minLength: 3
            state:
              type: string
              description: |
                The address state.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                You must provide United States ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: |
                The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2         
        phone:
          type: object
          description: The account holder's phone number.
          required:
            - country_code
            - number
          properties:
            country_code:
              type: string
              description: The international dialing code for the account holder's address `country`, as an [ITU-T E.164 code](https://checkout.com/docs/four/resources/codes/country-codes).
              maxLength: 7
              minLength: 1
            number:
              type: string
              description: The digits for the phone number, not including the `country_code`.
              maxLength: 25
              minLength: 6
        identification:
          type: object
          required:
            - type
            - number
          description: |
            The account holder's identification.
      
            Providing identification details for the payout recipient increases the likelihood of a successful payout.
          properties:
            type:
              type: string
              description: The type of identification for the account holder.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The account holder's identification number.
              maxLength: 25
            issuing_country:
              type: string
              description: |
                If applicable, the country that issued the account holder's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
      
                Providing `issuing_country` increases the likelihood of a successful identity verification.
              maxLength: 2
              minLength: 2
            date_of_expiry:
              type: string
              description: |
                If applicable, the expiration date of the account holder's identification, in the format `YYYY-MM-DD`.
      
                Providing `date_of_expiry` increases the likelihood of a successful identity verification.
              maxLength: 10
              minLength: 10
        email:
          type: string
          description: The account holder's email address.
          maxLength: 255    
    01_CardPayoutRequest_DestinationTypeCard:
      type: object
      description: The destination of the payout.
      required:
        - type
        - number
        - expiry_month
        - expiry_year
        - account_holder
      properties:
        type:
          type: string
          description: The payout destination type.
        number:
          type: string
          description: The card number.
          maxLength: 19
        expiry_month:
          type: integer
          description: The card's expiration month.
          maxLength: 2
          minLength: 1
        expiry_year:
          type: integer
          description: The card's expiration year.
          maxLength: 4
          minLength: 4
        account_holder:
          type: object
          description: The payout destination account holder.
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_CardPayoutRequest_DestinationTypeCardAccountHolderIndividual'
              corporate: '#/components/schemas/02_CardPayoutRequest_DestinationTypeCardAccountHolderCorporate'
              government: '#/components/schemas/03_CardPayoutRequest_DestinationTypeCardAccountHolderGovernment'
          required:
            - type
          properties:
            type:
              type: string
              example: 'individual'
    02_CardPayoutRequest_DestinationTypeNetworkToken:
      type: object
      description: The destination of the payout.
      required:
        - type
        - token
        - expiry_month
        - expiry_year
        - token_type
        - account_holder
      properties:
        type:
          type: string
          description: The payout destination type.
        token:
          type: string
          description: The network token's Primary Account Number (PAN).
          example: '4543474002249996'
        expiry_month:
          type: integer
          description: The network token's expiration month.
          minimum: 1
          example: 6
          minLength: 1
          maxLength: 2
        expiry_year:
          type: integer
          description: The network token's expiration year.
          example: 2025
          minLength: 4
          maxLength: 4
        token_type:
          type: string
          description: The network token type.
          enum:
            - vts
            - mdes
            - applepay
            - googlepay
        cryptogram:
          type: string
          description: |
            The network token's Base64-encoded cryptographic identifier (TAVV).
            
            The cryptogram is used by card schemes to validate the token verification result.
          maxLength: 50
          example: hv8mUFzPzRZoCAAAAAEQBDMAAAA=
        eci:
          type: string
          description: The network token's Electronic Commerce Indicator (ECI) security level.
          maxLength: 2
          example: '05'
        account_holder:
          type: object
          description: The payout destination account holder.
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_CardPayoutRequest_DestinationTypeCardAccountHolderIndividual'
              corporate: '#/components/schemas/02_CardPayoutRequest_DestinationTypeCardAccountHolderCorporate'
              government: '#/components/schemas/03_CardPayoutRequest_DestinationTypeCardAccountHolderGovernment'
          required:
            - type
          properties:
            type:
              type: string
              example: 'individual'
    03_CardPayoutRequest_DestinationTypeId:
      type: object
      description: The destination of the payout.
      required:
        - type
        - id
        - account_holder
      properties:
        type:
          type: string
          description: The payout destination type.
        id:
          type: string
          pattern: ^(src)_(\w{26})$
          maxLength: 30
          minLength: 30
          description: The payment source ID. This will be an ID with the prefix `src_`.
        account_holder:
          type: object
          description: The payout destination account holder.
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_CardPayoutRequest_DestinationAccountHolderIndividual'
              corporate: '#/components/schemas/02_CardPayoutRequest_DestinationAccountHolderCorporate'
              government: '#/components/schemas/03_CardPayoutRequest_DestinationAccountHolderGovernment'
          properties:
            type:
              type: string
              example: 'individual'
    04_CardPayoutRequest_DestinationTypeToken:
      type: object
      description: The destination of the payout.
      required:
        - type
        - token
        - account_holder
      properties:
        type:
          type: string
          description: The payout destination type.
        token:
          type: string
          pattern: ^(tok)_(\w{26})$
          maxLength: 30
          minLength: 30
          description: The Checkout.com card token ID. This will be an ID with the prefix `tok_`.
        account_holder:
          type: object
          description: The payout destination account holder.
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_CardPayoutRequest_DestinationAccountHolderIndividual'
              corporate: '#/components/schemas/02_CardPayoutRequest_DestinationAccountHolderCorporate'
              government: '#/components/schemas/03_CardPayoutRequest_DestinationAccountHolderGovernment'
          required:
            - type
          properties:
            type:
              type: string
              example: 'individual'
    01_CardPayoutRequest_SenderAccountHolderIndividual:
      type: object
      required:
        - type
        - first_name
        - last_name
        - address
        - reference
        - reference_type
        - source_of_funds
      properties:
        type:
          type: string
          description: The type of entity performing the payout.
          example: 'individual'
        first_name:
          type: string
          description: |
            The sender's first name.
      
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
            This must be a valid legal name. The following formats for the `first_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
            - a single character
            - all non-alphabetic characters
          maxLength: 50
        middle_name:
          type: string
          description: |
            The sender's middle name.
      
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
          maxLength: 50
        last_name:
          type: string
          description: |
            The sender's last name.
      
            The combination of `first_name`, `middle_name`, and `last_name` must exceed 3 letters in length.
            This must be a valid legal name. The following formats for the `last_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
              - a single character
              - all non-alphabetic characters
          maxLength: 50
        address:
          type: object
          required:
            - address_line1
            - city
            - country
          description: The sender's residential address.
          properties:
            address_line1:
              type: string
              description: The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
              minLength: 3
            state:
              type: string
              description: |
                The address state.
      
                This field is required if `sender.address.country` is `US`.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                This field is required if `sender.address.country` is `US`. You must provide US ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2
        reference:
          type: string
          description: |
            The unique identifier for the sender. For example, a customer number.
            
            Only alphanumeric characters are supported.
          maxLength: 15
          minLength: 5
        reference_type:
          type: string
          description: The type of identifier used as the `sender.reference`.
          enum:
            # - rtn_and_ban
            # - iban
            # - card_account
            # - email
            # - phone_number
            # - ban_and_bic
            # - wallet_id
            # - social_network_id
            - other
        source_of_funds:
          type: string
          enum:
            - credit
            - debit
            - prepaid
            - deposit_account
            - mobile_money_account
            - cash
          description: The source of the funds used to fund the card payout.
        identification:
          type: object
          description: |
            The sender's identification.
      
            This field is required if the card's `issuer_country` is one of:
      
              - `AR` (Argentina)
              - `BR` (Brazil)
              - `CO` (Colombia)
              - `PE` (Peru)
            
            To view a card's `issuer_country`, [retrieve the card's metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response).
          required:
            - type
            - number
          properties:
            type:
              type: string
              description: The type of identification for the sender.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The sender's identification number.
            issuing_country:
              type: string
              description: If applicable, the country that issued the sender's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              minLength: 2
              maxLength: 2
            date_of_expiry:
              type: string
              description: If applicable, the expiration date of the sender's identification, in the format `YYYY-MM-DD`.
              maxLength: 10
              minLength: 10
        date_of_birth:
          type: string
          description: |
            The sender's date of birth, in the format `YYYY-MM-DD`.
      
            This field is required for cross-border money transfers.
          maxLength: 10
          minLength: 10        
        country_of_birth:
          type: string
          description: The sender's country of birth, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
          maxLength: 2
          minLength: 2
        nationality:
          description: The sender's nationality, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
          maxLength: 2
          minLength: 2
    02_CardPayoutRequest_SenderAccountHolderCorporate:
      type: object
      required:
        - type
        - company_name
        - address
        - reference
        - reference_type
        - source_of_funds
      properties:
        type:
          type: string
          description: The type of entity performing the payout.
          example: 'corporate'
        company_name:
          type: string
          description: |
            The corporate sender's company name.
                
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
              - a single character
              - all non-alphabetic characters
          maxLength: 35
        address:
          type: object
          description: The sender's registered corporate address.
          required:
            - address_line1
            - city
            - country
          properties:
            address_line1:
              type: string
              description: The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
            state:
              type: string
              description: |
                The address state.
      
                This field is required if `sender.address.country` is `US`.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                This field is required if `sender.address.country` is `US`. You must provide US ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2
        reference:
          type: string
          description: |
            The unique identifier for the sender. For example, a customer number.
              
            Only alphanumeric characters are supported.
          maxLength: 15
          minLength: 5
        reference_type:
          type: string
          description: The type of identifier used as the `reference`.
          enum:
            # - rtn_and_ban
            # - iban
            # - card_account
            # - email
            # - phone_number
            # - ban_and_bic
            # - wallet_id
            # - social_network_id
            - other
        source_of_funds:
          type: string
          enum:
            - credit
            - debit
            - prepaid
            - deposit_account
            - mobile_money_account
            - cash
          description: The source of the funds used to fund the card payout.
        identification:
          type: object
          description: |
            The sender's identification.
      
            This field is required if the card's `issuer_country` is one of:
      
              - `AR` (Argentina)
              - `BR` (Brazil)
              - `CO` (Colombia)
              - `PE` (Peru)
            
            To view a card's `issuer_country`, [retrieve the card's metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response).
          required:
            - type
            - number      
          properties:
            type:
              type: string
              description: The type of identification for the sender.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The sender's identification number.
            issuing_country:
              type: string
              description: If applicable, the country that issued the sender's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              minLength: 2
              maxLength: 2
            date_of_expiry:
              type: string
              description: If applicable, the expiration date of the sender's identification, in the format `YYYY-MM-DD`.
              maxLength: 10
              minLength: 10
    03_CardPayoutRequest_SenderAccountHolderGovernment:
      type: object
      required:
        - type
        - company_name
        - address
        - reference
        - reference_type
        - source_of_funds
      properties:
        type:
          type: string
          description: The type of entity performing the payout.
          example: 'government'
        company_name:
          type: string
          description: |
            The sender's company name.
                  
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
              - a single character
              - all non-alphabetic characters
          maxLength: 35
        address:
          type: object
          description: The sender's registered corporate address.
          required:
            - address_line1
            - city
            - country
          properties:
            address_line1:
              type: string
              description: The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
            state:
              type: string
              description: |
                The address state.
      
                This field is required if `sender.address.country` is `US`.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                This field is required if `sender.address.country` is `US`. You must provide US ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2
        reference:
          type: string
          description: |
            The unique identifier for the sender. For example, a customer number.
            Only alphanumeric characters are supported.
          maxLength: 15
          minLength: 5
        reference_type:
          type: string
          description: The type of identifier used as the `reference`.
          enum:
            # - rtn_and_ban
            # - iban
            # - card_account
            # - email
            # - phone_number
            # - ban_and_bic
            # - wallet_id
            # - social_network_id
            - other
        source_of_funds:
          type: string
          enum:
            - credit
            - debit
            - prepaid
            - deposit_account
            - mobile_money_account
            - cash
          description: The source of the funds used to fund the card payout.
        identification:
          type: object
          description: |
            The sender's identification.
      
            This field is required if the card's `issuer_country` is one of:
      
              - `AR` (Argentina)
              - `BR` (Brazil)
              - `CO` (Colombia)
              - `PE` (Peru)
            
            To view a card's `issuer_country`, [retrieve the card's metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response).
          required:
            - type
            - number      
          properties:
            type:
              type: string
              description: The type of identification for the sender.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The sender's identification number.
            issuing_country:
              type: string
              description: If applicable, the country that issued the sender's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              minLength: 2
              maxLength: 2
            date_of_expiry:
              type: string
              description: If applicable, the expiration date of the sender's identification, in the format `YYYY-MM-DD`.
              maxLength: 10
              minLength: 10
    CardPayoutRequest:
      title: Card Payout
      type: object
      required: 
        - source
        - destination
        - currency
        - instruction
        - processing_channel_id
      properties:
        source:
          type: object
          description: The source of the payout.
          required:
            - type
            - id
          properties:
            type:
              type: string
              description: The payout source type.
              enum:
                - currency_account  
            id:
              type: string
              description: The ID of the currency account that will fund the payout.
              pattern: '^(ca)_(\w{26})$'
              maxLength: 29
              minLength: 29
        destination:
          $ref: '#/components/schemas/CardPayoutRequestDestination'
        amount:
          type: integer
          description: |
            The amount to pay out, in minor units. Use the [specific format](https://www.checkout.com/docs/payments/accept-payments/calculating-the-amount) for the `currency` you specify for the payout.
          minimum: 0
        currency:
          type: string
          description: |
            The [three-letter ISO 4217 code](https://www.checkout.com/docs/developer-resources/codes/currency-codes) for the currency you want to pay out to the recipient.
        instruction:
          type: object
          required:
            - funds_transfer_type
          description: Additional details about the payout instruction.
          properties:
            funds_transfer_type:
              type: string
              description: |
                The [funds transfer type](https://www.checkout.com/docs/payments/request-payouts/card-payouts#Fund_Transfer_Types) code for the type of payout you're performing. 
                
                You can only use codes that have been assigned to you by the card schemes and Checkout.com, based on your business case and requirements. 
                
                If you have only been assigned one funds transfer type code, this field is optional.
            purpose:
              type: string
              description: |
                The purpose of the payout.
              
                This field is required if the card's `issuer_country` is one of:
      
                  - `AR` (Argentina)
                  - `BD` (Bangladesh)
                  - `CL` (Chile)
                  - `CO` (Colombia)
                  - `EG` (Egypt)
                  - `IN` (India)
                  - `MX` (Mexico)
                  - `SA` (Saudi Arabia)
                
                To view a card's `issuer_country`, [retrieve the card's metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response).
              enum:
                - family_support
                - expatriation
                - travel_and_tourism
                - education
                - medical_treatment
                - emergency_need
                - leisure
                - savings
                - gifts
                - donations
                - financial_services
                - it_services
                - investment
                - insurance
                - loan_payment
                - pension
                - royalties
                - other
                - income
        items:
          $ref: '#/components/schemas/CardPayoutItems'
        processing_channel_id:
          type: string
          description: The unique identifier for the processing channel.
          pattern: '^(pc)_(\w{26})$'
          minLength: 29
          maxLength: 29
        sender:
          $ref: '#/components/schemas/CardPayoutRequestSender'
        reference:
          type: string
          description: A custom reference to identify the payout. For example, an order number.
          maxLength: 50
        previous_payment_id:
          type: string
          description: |
            The identifier of an existing payment from the recurring series, if the payout is a recurring payment that uses <a href="https://www.checkout.com/docs/previous/payments/accept-payments/pay-with-stored-details" target="blank">stored card details</a>.
            
            If the card payout is linked to a previous <a href="https://www.checkout.com/docs/payments/manage-payments/perform-an-account-funding-transaction" target="_blank">Account Funding Transaction (AFT)</a>, you must include this field in your request with one of the following values:
      
            - If the previous AFT was processed by Checkout.com, use the previous payment's ID.
            - If the previous AFT was processed by another payment service provider (PSP), use the scheme's transaction ID.
          example: 'pay_fun26akvvjjerahhctaq2uzhu4'
        metadata:
          type: object
          description: |
            Stores additional information about the transaction with custom fields.
            
            You can also provide up to five user-defined fields (`udf1` to `udf5`), for your reporting purposes. `udf1` is also used for some of our risk rules. 
            
            You can only supply primitive data types with one level of depth. Fields of type `object` or `array` are not supported.
        segment:
          $ref: '#/components/schemas/Segment'
        processing:
          type: object
          description: Returns information related to the processing of the payment.
          properties:
            affiliate_id:
              type: string
              pattern: ^[a-zA-Z0-9]{1,15}$
              description: |
                The unique identifier for Visa-registered ramp providers.
                
                Must only contain alphanumeric characters.
      
                If you're a Visa-registered ramp provider operating with affiliates, this field is required.
              maxLength: 15
            affiliate_url:
              type: string
              description: |
                The affiliate URL.
      
                If you're a Visa-registered ramp provider operating with affiliates, this field is required.
              example: www.mycrypto.com
            processing_speed:
              type: string
              description: |
                The speed at which the payout is processed. 
                
                Only applicable for <a href="https://www.checkout.com/docs/payments/manage-payments/refund-a-payment/refund-a-payment-without-a-reference">unreferenced refunds</a>.
              enum:
                - "fast"
            purchase_country:
              type: string
              description: |
                The two-letter <a href="https://www.checkout.com/docs/previous/resources/codes/country-codes" target="_blank">ISO country code</a> of the purchase country.
      
                If you're a Visa-registered ramp provider operating with affiliates, this field is required.
              example: GB
              maxLength: 2
    CardPayoutRequestDestination:
      type: object
      description: The destination of the payout.
      required:
        - type
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/01_CardPayoutRequest_DestinationTypeCard'
          network_token: '#/components/schemas/02_CardPayoutRequest_DestinationTypeNetworkToken'
          id: '#/components/schemas/03_CardPayoutRequest_DestinationTypeId'
          token: '#/components/schemas/04_CardPayoutRequest_DestinationTypeToken'
      properties:
        type:
          type: string
          description: The payout destination type.
          example: 'card'
    CardPayoutRequestSender:
      type: object
      description: |
        The sender of the payout.
      
        This field is required for [money transfer](https://www.checkout.com/docs/payments/request-payouts/card-payouts#Fund_Transfer_Types) card payouts.
      required:
        - type  
      discriminator:
        propertyName: type
        mapping:
          individual: '#/components/schemas/01_CardPayoutRequest_SenderAccountHolderIndividual'
          corporate: '#/components/schemas/02_CardPayoutRequest_SenderAccountHolderCorporate'
          government: '#/components/schemas/03_CardPayoutRequest_SenderAccountHolderGovernment'
      properties:
        type:
          type: string
          description: The type of entity sending the payout.
          example: 'individual'
    Cko-Request-Id:
      description: The unique identifier of the request
      type: string
      maxLength: 40
      example: 12345678-1234-1234-1234-123456789abc
    Cko-Version:
      description: The version of the API
      type: string
    ComplianceRequestDetails:
      type: object
      properties:
        payment_id:
          type: string
          description: The compliance request's payment ID.
          nullable: true
          example: pay_fun26akvvjjerahhctaq2uzhu4
        client_id:
          type: string
          description: The compliance request's client ID.
          nullable: true
          example: cli_vkuhvk4vjn2edkps7dfsq6emqm
        entity_id:
          type: string
          description: The compliance request's entity ID.
          nullable: true
          example: ent_azsiyswl7bwe2ynjzujy7lcjca
        segment_id:
          type: string
          description: The compliance request's segment ID.
          nullable: true
          example: seg_siopnqocrc4ehgyer4tpepq5pp
        amount:
          type: string
          description: The payment's transaction amount.
          nullable: true
          example: '38.23'
        currency:
          type: string
          description: >-
            The payment's transaction currency, as a three-letter <a
            href="https://www.checkout.com/docs/developer-resources/codes/currency-codes">ISO
            currency code</a>.
          nullable: true
          example: HKD
        recipient_name:
          type: string
          description: The payment's recipient's name.
          nullable: true
          example: Jia Tsang
        requested_on:
          type: string
          description: The date and time when the compliance request was initiated.
          nullable: true
          example: '2026-02-04T15:46:44.9663151Z'
        status:
          type: string
          description: The compliance request's status.
          nullable: true
          example: responded
        fields:
          $ref: '#/components/schemas/RequestedFields'
        transaction_reference:
          type: string
          description: The payment's transaction reference.
          nullable: true
          example: ref-abc
        sender_reference:
          type: string
          description: The payment sender's reference.
          nullable: true
          example: ref-def
        last_updated:
          type: string
          description: The date and time when the compliance request was last updated.
          nullable: true
          example: '2026-02-04T15:47:18.6326970Z'
        sender_name:
          type: string
          description: The payment sender's name.
          nullable: true
          example: Ali Farid
        payment_type:
          type: string
          description: The payment type.
          nullable: true
          example: PayToCard
      additionalProperties: false
      description: Represents a compliance request.
    ComplianceRequestRespondedField:
      required:
        - name
        - not_available
        - value
      type: object
      properties:
        name:
          type: string
          description: The field name being responded to.
          nullable: true
          example: date_of_birth
        value:
          description: The value provided for the field.
          nullable: true
        not_available:
          type: boolean
          description: Indicates whether the value is unavailable for this field.
          example: false
      additionalProperties: false
      description: Describes a single response field provided for a compliance request.
    ComplianceRequestRespondedFields:
      type: object
      properties:
        sender:
          type: array
          items:
            $ref: '#/components/schemas/ComplianceRequestRespondedField'
          description: The fields provided for the sender.
          nullable: true
        recipient:
          type: array
          items:
            $ref: '#/components/schemas/ComplianceRequestRespondedField'
          description: The fields provided for the recipient.
          nullable: true
      additionalProperties: false
      description: Groups the responded fields by party (sender/recipient).
    ComplianceRequestResponse:
      required:
        - fields
      type: object
      properties:
        fields:
          $ref: '#/components/schemas/ComplianceRequestRespondedFields'
        comments:
          type: string
          description: Optional free-text comment provided with the response.
          nullable: true
          example: Optional comment
      additionalProperties: false
      description: Represents the payload used to respond to a compliance request.
    RequestedField:
      required:
        - name
        - type
      type: object
      properties:
        name:
          type: string
          description: The requested field name.
          nullable: true
          example: date_of_birth
        type:
          type: string
          description: The requested field type. For example, "string" or "date".
          nullable: true
          example: date
        value:
          type: string
          description: The current value for the requested field, if available.
          nullable: true
          example: '2000-01-01'
      additionalProperties: false
      description: Describes a single requested field within a compliance request.
    RequestedFields:
      required:
        - recipient
        - sender
      type: object
      properties:
        sender:
          type: array
          items:
            $ref: '#/components/schemas/RequestedField'
          description: The list of requested sender details.
          nullable: true
        recipient:
          type: array
          items:
            $ref: '#/components/schemas/RequestedField'
          description: The list of requested recipient details.
          nullable: true
      additionalProperties: false
      description: Groups the requested fields by party (sender/recipient).
    CustomerRequest:
      type: object
      description: The customer's details. Required if `source.type` is `tamara`
      properties:
        id:
          type: string
          pattern: "^(cus)_(\\w{26})$"
          description: The identifier of an existing customer
          example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44'
        email:
          type: string
          format: email
          description: |
            The customer's email address. 
      
            If `source.type` is set to `sequra`, this field is required.
      
            If `source.type` is set to `tamara`, this field is required and has a maximum length of 50 characters.
          maxLength: 255
          example: 'brucewayne@gmail.com'
        name:
          type: string
          description: | 
            The customer's name. Required if `source.type` is:
              - `alipay_cn`
              - `alipay_hk`
              - `alipay_plus`
              - `dana`
              - `gcash`
              - `kakaopay`
              - `sequra`
              - `tamara`
              - `tng`
              - `truemoney`
          maxLength: 255
          example: 'Bruce Wayne'
        tax_number:
          type: string
          description: Contains the customer's value-added tax (VAT) registration number.
          maxLength: 13
          example: '1350693505279'
        phone:
          type: object
          description: The customer's phone number. Required if `source.type` is `tamara`
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        summary:
          $ref: '#/components/schemas/CustomerSummary'
    CustomerResponse:
      type: object
      description: Stored customer details
      required:
        - id
      properties:
        id:
          type: string
          pattern: "^(cus)_(\\w{26})$"
          description: The customer's unique identifier. This can be passed as a source when making a payment.
          example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44'
        email:
          type: string
          description: The customer's email address.
          example: 'johnsmith@example.com'
        name:
          type: string
          description: The customer's name.
          example: 'John Smith'
        phone:
          type: object
          description: The customer's phone number.
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'    
        summary:
          $ref: '#/components/schemas/CustomerSummary'
    RetrieveCustomerAchInstrumentResponse:
      type: object
      description: card instrument response
      allOf:
        - $ref: '#/components/schemas/RetrieveCustomerInstrumentResponse'
      required:
        - type
        - id
        - fingerprint
        - created_on
        - modified_on
        - vault_id
        - instrument_data
        - account_holder
      properties:
        id:
          description: |
            The unique identifier of the payment source or destination. 
            
            You can use the `id` in future payments.
          type: string
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers.
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
        created_on:
          type: string
          format: date-time
          description: The date and time the instrument was created.
          example: '2021-01-01T00:00:00Z'
        modified_on:
          type: string
          format: date-time
          description: The date and time the instrument was last modified.
          example: '2021-01-01T00:00:00Z'
        vault_id:
          type: string
          description: The Vault ID currently attached to the instrument.
          example: 'vid_wmlfc3zyhqzehihu7giusaaawu' 
        instrument_data:
          type: object
          description: The details of the bank account
          required:
            - account_type
            - account_number
            - bank_code
            - currency
            - country
          properties:
            account_type:
              type: string
              description: The type of Direct Debit account
              enum:
                - savings
                - checking
              example: savings
            account_number:
              type: string
              description: The account number of the Direct Debit account
              minLength: 4
              maxLength: 17
              example: '4099999992'
            bank_code:
              type: string
              description: The bank code of the Direct Debit account
              minLength: 8
              maxLength: 9
              example: '211370545'
            currency:
              type: string
              description: The currency of the account 
              minLength: 3
              maxLength: 3
              example: "USD"
            country:
              type: string
              description: The country of the account
              minLength: 2
              maxLength: 2
              example: "US"
        account_holder:
          type: object
          description: >-
            The account holder details
          required:
            - first_name
            - last_name
            - company_name
            - type
          properties:
            first_name:
              type: string
              description: First name. Required for individual account holder type
              example: John
            last_name:
              type: string
              description: Last name. Required for individual account holder type
              example: Smith
            company_name:
              type: string
              description: Company name. Required for corporate account holder type
              example: Smith Enterprises
            type:
              type: string
              description: Account holder type
              enum:
                - individual
                - corporate
        customer:
          $ref: '#/components/schemas/RetrieveInstrumentCustomerResponse'
    RetrieveCustomerBankAccountInstrumentResponse:
      type: object
      description: Bank account details
      required:
        - id
        - type
        - fingerprint
        - currency
        - country
      allOf:
        - $ref: '#/components/schemas/RetrieveCustomerInstrumentResponse'
      properties:
        id:
          description: The unique identifier of the payment source or destination that can be used later for payments
          type: string
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
      
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
      
        account_type:
          description: The type of account
          type: string
          enum:
            - savings
            - current
            - cash
          example: savings
      
        account_number:
          description: Number (which can contain letters) that identifies the account
          type: string
          example: '13654567455'
      
        bank_code:
          description: Code that identifies the bank
          type: string
          example: 123-456
      
        branch_code:
          description: Code that identifies the bank branch
          type: string
          example: '6443'
      
        iban:
          description: Internationally agreed standard for identifying bank account
          type: string
          example: HU93116000060000000012345676
      
        bban:
          description: The combination of bank code and/or branch code and account number
          type: string
          example: 3704 0044 0532 0130 00
      
        swift_bic:
          description: 8 or 11 character code which identifies the bank or bank branch
          type: string
          example: '37040044'
      
        currency:
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a> of the account's currency
          type: string
          example: GBP
      
        country:
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of where the account is based
          type: string
          example: GB
      
        account_holder:
          $ref: '#/components/schemas/AccountHolder'
      
        bank:
          $ref: '#/components/schemas/BankDetails'
    RetrieveCustomerCardInstrumentResponse:
      type: object
      description: card instrument response
      allOf:
        - $ref: '#/components/schemas/RetrieveCustomerInstrumentResponse'
      required:
        - id
        - fingerprint
        - expiry_month
        - expiry_year
        - last4
        - bin
      properties:
        id:
          description: The unique identifier of the payment source or destination that can be used later for payments
          type: string
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
        expiry_month:
          type: integer
          description: The expiry month
          minimum: 1
          example: 6
          maxLength: 2
        expiry_year:
          type: integer
          description: The expiry year
          example: 2025
          minLength: 4
          maxLength: 4
        scheme:
          type: string
          description: The card scheme
          example: 'VISA'
        last4:
          type: string
          description: The last four digits of the card number
          example: '9996'
          minLength: 4
          maxLength: 4
        bin:
          type: string
          description: The card issuer's bank identification number (BIN)
          example: '454347'
        card_type:
          type: string
          description: The card type
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
          example: CREDIT
        card_category:
          type: string
          description: The card category
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        issuer:
          type: string
          description: The name of the card issuer
          example: 'GOTHAM STATE BANK'
        issuer_country:
          type: string
          maxLength: 2
          minLength: 2
          description: The card issuer's country (<a href="https://www.checkout.com/docs/resources/codes/country-codes" target="blank">two-letter ISO code</a>)
          example: 'US'
        product_id:
          type: string
          description: The issuer/card scheme product identifier
          example: 'F'
        product_type:
          type: string
          description: The issuer/card scheme product type
          example: CLASSIC
        account_holder:
          type: object
          description: The account holder details
          properties:
            first_name:
              description: The first name of the account holder
              type: string
              example: 'John'
            last_name:
              description: The last name of the account holder
              type: string
              example: 'Smith'
            billing_address:
              description: The billing address of the account holder
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              description: The phone number of the account holder
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
        card_wallet_type:
          type: string
          description: The type of digital wallet used for the card.
          enum:
            - googlepay
            - applepay
    RetrieveCustomerInstrumentResponse:
      type: object
      discriminator:
        propertyName: type
        mapping:
          bank_account: '#/components/schemas/RetrieveCustomerBankAccountInstrumentResponse'
          card: '#/components/schemas/RetrieveCustomerCardInstrumentResponse'
          ach: '#/components/schemas/RetrieveCustomerAchInstrumentResponse'
          sepa: '#/components/schemas/RetrieveCustomerSepaInstrumentResponse'
      required:
        - type
      properties:
        type:
          description: The instrument type
          type: string
          example: 'card'
    RetrieveCustomerResponse:
      type: object
      description: Customer retrieved successfully
      required: 
        - id
        - email
      properties:
        id:
          type: string
          description: The customer's unique identifier
          example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44'
        email:
          type: string
          format: email
          description: The customer's email address
          example: 'brucewayne@gmail.com'
        default:
          type: string
          description: The ID for this customer's default instrument
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
        name:
          type: string
          description: The customer's name
          example: 'Bruce Wayne'
        phone:
          description: The customer's phone number
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        metadata:
          type: object
          description: A set of key-value pairs that is attached to a customer
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
        instruments:
          type: array
          title: Instrument
          description: The details of the instruments linked to this customer
          items:
            $ref: '#/components/schemas/RetrieveCustomerInstrumentResponse'
          example:
            - type: 'card'
              id: 'src_wmlfc3zyhqzehihu7giusaaawu'
              fingerprint: 'vnsdrvikkvre3dtrjjvlm5du4q'
              expiry_month: 6
              expiry_year: 2025
              scheme: 'VISA'
              last4: '9996'
              bin: '454347'
              card_type: 'CREDIT'
              card_category: 'CONSUMER'
              issuer: 'TEST STATE BANK'
              issuer_country: 'US'
              product_id: 'F'
              product_type: 'CLASSIC'
              account_holder:
                first_name: 'John'
                last_name: 'Smith'
                billing_address:
                  address_line1: '123 High St.'
                  address_line2: 'Flat 456'
                  city: 'London'
                  zip: 'SW1A 1AA'
                  country: 'GB'
                phone:
                  country_code: '+1'
                  number: '415 555 2671'
              card_wallet_type: 'applepay'
    RetrieveCustomerSepaInstrumentResponse:
      type: object
      description: card instrument response
      allOf:
        - $ref: '#/components/schemas/RetrieveCustomerInstrumentResponse'
      required:
        - type
        - id
        - fingerprint
        - created_on
        - modified_on
        - vault_id
      properties:
        id:
          description: |
            The unique identifier of the payment source or destination. 
            
            You can use the `id` in future payments.
          type: string
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers.
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
        created_on:
          type: string
          format: date-time
          description: The date and time the instrument was created.
          example: '2021-01-01T00:00:00Z'
        modified_on:
          type: string
          format: date-time
          description: The date and time the instrument was last modified.
          example: '2021-01-01T00:00:00Z'
        vault_id:
          type: string
          description: The Vault ID currently attached to the instrument.
          example: 'vid_wmlfc3zyhqzehihu7giusaaawu' 
        instrument_data:
          type: object
          description: The details of the SEPA mandate.
          required:
            - country
            - account_number
            - currency
            - payment_type
            - mandate_id
            - date_of_signature
          properties:
            account_number:
              type: string
              description: The International Bank Account Number (IBAN) of the account.
              example: 'FR2810096000509685512959O86'
              maxLength: 34
              minLength: 15
            country:
              type: string
              description: The country of the account.
              example: 'GB'
              maxLength: 2
              minLength: 2
            currency:
              type: string
              description: The currency of the account.
              example: 'GBP'
              maxLength: 3
              minLength: 3
            payment_type:
              type: string
              description: The type of payment.
              example: 'recurring'
              enum:
                - recurring
                - regular
            mandate_id:
              type: string
              description: |
                The mandate ID.
      
                If this value was not provided when the instrument was created, it may take up to five seconds for the generated mandate ID to be available.
              example: '1234567890'
              maxLength: 35
              minLength: 1
            date_of_signature:
              type: string
              format: date
              description: | 
                The date the mandate was signed.
      
                If `mandate_id` was not provided when the instrument was created, it may take up to five seconds for the generated date of signature to be available.
              example: '2021-01-01'
              maxLength: 10
              minLength: 10
        account_holder:
          type: object
          description: The account holder's details.
          required:
            - first_name
            - last_name
            - billing_address
          properties:
            first_name:
              description: The first name of the account holder.
              type: string
              example: 'Hannah'
            last_name:
              description: The last name of the account holder.
              type: string
              example: 'Bret'
            billing_address:
              type: object
              description: The billing address of the account holder.
              required:
                - address_line1
                - address_line2
                - city
                - zip
                - country
              properties:
                address_line1:
                  description: The first line of the address.
                  type: string
                  example: '123 High St.'
                address_line2:
                  description: The second line of the address.
                  type: string
                  example: 'Flat 456'
                city:
                  description: The address city.
                  type: string
                  example: 'London'
                zip:
                  description: The address ZIP or postal code.
                  type: string
                  example: 'SW1A 1AA'
                country:
                  description: The address country.
                  type: string
                  example: 'GB'
                  maxLength: 2
                  minLength: 2
        customer:
          $ref: '#/components/schemas/RetrieveInstrumentCustomerResponse'
               
    StoreCustomerRequest:
      type: object
      description: Create a customer
      required:
        - email
      properties:
        email:
          type: string
          format: email
          description: The customer's email address
          maxLength: 255
          example: 'brucewayne@gmail.com'
        name:
          type: string
          description: The customer's name
          maxLength: 255
          example: 'Bruce Wayne'
        phone:
          description: The customer's phone number
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        metadata:
          type: object
          description: Allows you to store additional information about a customer. You can include a maximum of 10 key-value pairs. Each key and value can be up to 100 characters long.
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
        default:
          type: string
          description: The ID of the instrument you want to set as this customer's default instrument
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
    StoreCustomerResponse:
      type: object
      description: Customer created successfully
      required:
        - id
      properties:
        id:
          description: The customer's unique identifier
          type: string
          example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44'
    UpdateCustomerDetailsRequest:
      type: object
      description: The customer's details
      properties:
        email:
          type: string
          format: email
          description: The email address of the customer
          maxLength: 255
          example: 'brucewayne@gmail.com'
        name:
          type: string
          description: The name of the customer
          maxLength: 255
          example: 'Bruce Wayne'
        phone:
          description: The customer's phone number
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        metadata:
          type: object
          description: Allows you to store additional information about a customer. You can include a maximum of 10 key-value pairs. Each key and value can be up to 100 characters long. Providing metadata in this request will replace any existing stored for this customer.
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
        default:
          type: string
          description: The ID of this customer's default instrument
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
    DatedObject:
      type: object
      required:
        - created_on
        - modified_on
      properties:
        created_on:
          description: The date and time when the resource was created, in UTC. <br/>Format – `yyyy-mm-ddThh:mm:ss.sss`
          type: string
          format: date-time
          example: '2025-07-21T17:32:28Z'
          readOnly: true
        modified_on:
          description: The date and time when the resource was modified, in UTC. <br/>Format – `yyyy-mm-ddThh:mm:ss.sss`
          type: string
          format: date-time
          example: '2025-07-21T17:40:32Z'
          readOnly: true
    CompellingEvidence:
      type: object
      required:
        - merchandise_or_service
        - merchandise_or_service_desc
        - merchandise_or_service_provided_date
        - historical_transactions
      properties:
        merchandise_or_service:
          type: string
          description: Value can be either "Merchandise" or "Services".
          example: 'Merchandise'
        merchandise_or_service_desc:
          type: string
          description: Description of the merchandise or service that this transaction was for.
          minLength: 1
          maxLength: 5000
          example: 'Subscription payment'
        merchandise_or_service_provided_date:
          type: string
          description: The date and time the merchandise or service was provided, in UTC format.
          format: date-time
          example: '2024-07-25T11:23:06Z'
        shipping_delivery_status:
          type: string
          description: >
                Status of the order. Only valid if merchandise_or_services is equal to "Merchandise”.
                  * `not_shipped`
                  * `back_ordered`
                  * `in_transit`
                  * `partial_shipped`
                  * `shipped`
                  * `cancelled`
                  * `shipping_exception`
                  * `picked_up_by_customer`
                  * `delivered`
                  * `other`
          example: 'shipped'
        tracking_information:
          type: string
          description: >
                Tracking of the order. Only valid if merchandise_or_services is equal to "Merchandise”. Required if the shipping_delivery_status is any of the following:
                  * `in_transit`
                  * `partial_shipped`
                  * `shipped`
                  * `shipping_exception`
                  * `delivered`
                  * `other`
          maxLength: 50
          example: '129481229312'
        user_id:
          type: string
          description: User ID is synonymous to Customer Account/log in ID.
          maxLength: 50
          example: 'user@cko.com'
        ip_address:
          type: string
          description: IpAddress used in the transaction. Should be either IPV4 or IPV6.
          example: '192.168.1.150'
        device_id:
          type: string
          description: Device used in the transaction.
          maxLength: 64
          minLength: 15
          example: 'device_123_x_1220'
        shipping_address:
          type: object
          description: The shipping address provided for this transaction.
          required:
            - address
            - city
            - postal_code
            - country
          properties:
            address:
              type: string
              maxLength: 50
              description: It describes the main address.
            address2:
              type: string
              maxLength: 50
              description: Any additional information about the address.
            city:
              type: string
              maxLength: 50
              description: The name of the city.
            state_region:
              type: string
              maxLength: 2
              minLength: 2
              description: The state for the address. Required if the country is "US" or "CA" (Canada).
            postal_code:
              type: string
              maxLength: 9
              description: The postal code of the address.
            country:
              type: string
              description: The three digit ISO code of the country.
              maxLength: 3
              minLength: 3
              example: '826'
        historical_transactions:
          type: array
          description: List of historical transactions. At least two transactions.
          items:
            type: object
            required:
              - historical_arn
              - merchandise_or_service_desc
            properties:
              historical_arn:
                type: string
                description: The Acquirer reference number (ARN) of the capture transaction.
                maxLength: 23
                minLength: 22
              merchandise_or_service_desc:
                type: string
                description: Description of the merchandise or service that this transaction was for.
                minLength: 1
                maxLength: 5000
    Dispute:
      type: object
      properties:
        id:
          type: string
          pattern: "^(dsp)_(\\w{22,26})$"
          description: The dispute identifier. This is the same as the payment action ID.
          example: 'dsp_rbhwd2qrg13uhrp2newfarfder'
        entity_id:
          type: string
          description: The client entity linked to this dispute.
          example: 'ent_wxglze3wwywujg4nna5fb7ldli'
        sub_entity_id:
          type: string
          description: The sub-entity linked to this dispute.
          example: 'ent_uzm3uxtssvmuxnyrfdffcyjxeu'
        reference:
          type: string
          description: An optional reference to identify the dispute.
          example: "dispute-09"
        category:
          type: string
          description: The reason for the dispute. [Find out more](https://www.checkout.com/docs/risk-management/disputes/responding-to-disputes/dispute-reasons-and-recommended-evidence)
          enum:
            [
                fraudulent,
                unrecognized,
                canceled_recurring,
                product_service_not_received,
                not_as_described,
                credit_not_issued,
                duplicate,
                incorrect_amount,
                general,
            ]
          example: 'fraudulent'
        amount:
          type: number
          description: The amount that is being disputed, in the processing currency. This amount can be positive or negative depending on the type of transaction the dispute is received against.
          example: 999
        currency:
          type: string
          description: The processing currency.
          example: 'GBP'
        reason_code:
          type: string
          description: The reason code provided by the card scheme.
          example: '10.4'
        status:
          type: string
          description: The current status of the dispute.
          enum:
            [
                evidence_required,
                evidence_under_review,
                resolved,
                won,
                lost,
                canceled,
                expired,
                accepted,
                arb_evidence_submitted,
                arbitration_under_review,
                arbitration_won,
                arbitration_lost,
            ]
          example: 'evidence_required'
        resolved_reason:
          type: string
          description: If the dispute is automatically resolved, `resolved_reason` will contain the reason why it was resolved.
          enum: [ rapid_dispute_resolution, negative_amount, already_refunded ]
          example: 'already_refunded'
        relevant_evidence:
          type: array
          description: <i>This list and the dispute categories will change over time. Your evidence logic should be informed by this field, not hard coded.</i>
          items:
            type: array
            items:
              type: string
              enum:
                [
                    proof_of_delivery_or_service,
                    invoice_or_receipt,
                    invoice_showing_distinct_transactions,
                    customer_communication,
                    refund_or_cancellation_policy,
                    recurring_transaction_agreement,
                    proof_of_delivery_or_service_date
                    additional_evidence,
                    compelling_evidence
                ]
            example:
              - 'proof_of_delivery_or_service'
              - 'compelling_evidence'
        evidence_required_by:
          type: string
          format: date-time
          description: |
            The deadline by which you must respond to the dispute. 
            
            This is equal to the `received_on` date + `n` calendar days, where `n` is the number of days set by the scheme or acquirer.
          example: '2018-08-21T00:00:00Z'
        received_on:
          type: string
          format: date-time
          description: The date and time at which the dispute was issued.
          example: '2018-08-01T04:00:10Z'
        last_update:
          type: string
          format: date-time
          description: The date and time at which the dispute was last updated.
          example: '2018-08-04T10:53:13Z'
        is_ce_candidate:
          type: boolean
          description: Indicates whether the dispute is eligible for compelling evidence.
          example: true
        payment:
          type: object
          description: Provides details for the payment linked to the dispute.
          allOf:
            - $ref: '#/components/schemas/PaymentData'
        evidence_list:
          type: array
          description: List of evidence files provided for the dispute.
          items:
            type: object
            properties:
              file:
                type: string
                description: The file's unique identifier.
              text:
                type: string
                description: A description for the evidence file.
              type:
                type: string
                description: The type of evidence the file is intended to support.
                enum:
                  [
                    proof_of_delivery_or_service,
                    invoice_or_receipt,
                    invoice_showing_distinct_transactions,
                    customer_communication,
                    refund_or_cancellation_policy,
                    recurring_transaction_agreement,
                    proof_of_delivery_or_service_date,
                    additional_evidence,
                    compelling_evidence,
                    arbitration_no_review,
                    arbitration_review_required
                  ]
                example: 'proof_of_delivery_or_service'
              dispute_id:
                type: string
        evidence_bundle:
          type: array
          description: The bundled evidence file sent to the scheme.
          items:
            type: object
            properties:
              dispute_id:
                type: string
                description: The unique identifier of the dispute associated with the bundle.
                example: 'dsp_rbhwd2qrg13uhrp2newfab'
              filename:
                type: string
                description: The name of the bundled evidence file.
              file_size:
                type: number
                description: The file size of the bundled evidence file, in KB.
              is_file_oversized:
                type: boolean
                description: Specifies whether the bundled file exceeded the maximum file size limit.
              created_at:
                type: string
                format: date-time
                description: The date and time the file was created, in UTC format.
              modified_at:
                type: string
                format: date-time
                description: The date and time the file was last modified, in UTC format.
        segment_id:
          type: string
          description: The unique identifier of the business segment that the payment belongs to.
        _links:
          type: object
          properties:
            self:
              description: The dispute retrieval endpoint.
              properties:
                href:
                  example: 'https://{prefix}.api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf'
            evidence:
              description: The dispute evidence retrieval endpoint.
              properties:
                href:
                  example: 'https://{prefix}.api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf/evidence'
    DisputePaged:
      type: object
      properties:
        limit:
          type: integer
          description: The numbers of items to return.
          example: 10
        skip:
          type: integer
          description: The number of results to skip.
          example: 10
        from:
          type: string
          format: date-time
          description: The date and time from which to filter disputes, based on the dispute's `last_update` field.
          example: '2018-08-12T01:15:56Z'
        to:
          type: string
          format: date-time
          description: The date and time until which to filter disputes, based on the dispute's `last_update` field.
          example: '2018-08-13T11:09:01Z'
        id:
          type: string
          pattern: "^(dsp)_(\\w{22,26})$"
          description: The unique identifier of the dispute.
          example: 'dsp_rbhwd2qrg13uhrp2newfcd'
        entity_ids:
          type: string
          description: One or more comma-separated client entities. This works like a logical *OR* operator.
          example: 'ent_wxglze3wwywujg4nna5fb7ldli,ent_vkb5zcy64zoe3cwfmaqvqyqyku'
        sub_entity_ids:
          type: string
          description: One or more comma-separated sub-entities. This works like a logical *OR* operator.
          example: 'ent_uzm3uxtssvmuxnyrfdffcyjxeu,ent_hy5wtzwzeuwefmsnjtdhw4scfi'
        processing_channel_ids:
          type: string
          description: One or more comma-separated processing channels. This works like a logical *OR* operator.
          example: 'pc_uzm3uxtssvmuxnyrfdffcyjxeu,pc_hy5wtzwzeuwefmsnjtdhw4scfi'
        segment_ids:
          type: string
          description: One or more comma-separated segments. This works like a logical *OR* operator.
        statuses:
          type: string
          description: One or more comma-separated statuses. This works like a logical *OR* operator.
          example: 'evidence_required,evidence_under_review'
        payment_id:
          type: string
          pattern: "^pay_(\\w{26})$"
          description: The unique identifier of the payment.
          example: 'pay_lzmo6p0i3612judj754w1ngtil'
        payment_reference:
          type: string
          description: An optional reference (such as an order ID) that you can use later to identify the payment. Previously known as `TrackId`.
          example: 'th7zxa1kcnqmes8'
        payment_arn:
          type: string
          description: The acquirer reference number (ARN) that you can use to query the issuing bank.
          example: '74548998294293193445538'
        payment_mcc:
          type: string
          description: The merchant category code (MCC) of the payment (ISO 18245).
          example: '5021'
        this_channel_only:
          type: boolean
          description: If `true`, only returns disputes of the specific channel that the secret key is associated with. Otherwise, returns all disputes for that business.
          example: true
        total_count:
          type: integer
          description: The total number of disputes retrieved (without taking into consideration skip and limit parameters).
          example: 1
        data:
          type: array
          description: The list of disputes.
          items:
            $ref: '#/components/schemas/DisputeSummary'
    DisputeSummary:
      type: object
      properties:
        id:
          type: string
          pattern: "^(dsp)_(\\w{22,26})$"
          description: The dispute identifier. This is the same as the action ID in the reconciliation API or the charge ID in the Hub.
          example: 'dsp_rbhwd2qrg13uhrp2newfafreds'
        entity_id:
          type: string
          description: The client entity linked to this dispute
          example: 'ent_wxglze3wwywujg4nna5fb7ldli'
        sub_entity_id:
          type: string
          description: The sub-entity linked to this dispute
          example: 'ent_uzm3uxtssvmuxnyrfdffcyjxeu'
        processing_channel:
          type: string
          description: The processing channel linked to the dispute.
          example: 'pc_uzm3uxtssvmuxnyrfdffcyjxeu'
        segment_id:
          type: string
        category:
          type: string
          description: The reason for the dispute. [Find out more](https://www.checkout.com/docs/risk-management/disputes/responding-to-disputes/dispute-reasons-and-recommended-evidence)
          enum:
            [
                fraudulent,
                unrecognized,
                canceled_recurring,
                product_service_not_received,
                not_as_described,
                credit_not_issued,
                duplicate,
                incorrect_amount,
                general,
            ]
          example: 'fraudulent'
        status:
          type: string
          description: The current status of the dispute
          enum:
            [
                evidence_required,
                evidence_under_review,
                resolved,
                won,
                lost,
                canceled,
                expired,
                accepted,
                arbitration_under_review,
                arbitration_won,
                arbitration_lost,
            ]
          example: 'evidence_required'
        amount:
          type: number
          description: The amount that is being disputed, in the processing currency
          example: 999
        currency:
          type: string
          description: The currency the payment was made in
          example: 'GBP'
        reason_code:
          type: string
          description: The reason code provided by the card scheme
          example: '10.4'
        payment_id:
          type: string
          description: The unique payment identifier
          example: 'pay_88cb4e671m1da22e9bbbyx'
        payment_action_id:
          type: string
          description: The unique identifier of the payment action
          example: 'act_mbabizu24mvu3mela5njyhpit4'
        payment_reference:
          type: string
          description: An optional reference (such as an order ID) a merchant can use to later identify the charge. Previously known as TrackId
          example: 'th7zxa1kcnqmes8'
        payment_arn:
          type: string
          description: The acquirer reference number that can be used to query the issuing bank
          example: '74548998294293193445538'
        payment_mcc:
          type: string
          description: The merchant category code (MCC) of the payment (ISO 18245)
          example: '5021'
        payment_method:
          type: string
          description: The payment method/card scheme
          example: VISA
        evidence_required_by:
          type: string
          format: date-time
          description: The deadline by which to respond to the dispute. This corresponds to `received_on` + `n`, where `n` is a number of calendar days set by the scheme/acquirer
          example: '2018-08-22T00:00:00Z'
        received_on:
          type: string
          format: date-time
          description: The date and time at which the dispute was issued
          example: '2018-08-01T01:15:56Z'
        last_update:
          type: string
          format: date-time
          description: The date and time at which the dispute was last updated
          example: '2018-08-12T04:15:56Z'
        resolved_reason:
          type: string
          description: If the dispute is automatically resolved, `resolved_reason` will contain the reason it was resolved
          enum: [ rapid_dispute_resolution, negative_amount, already_refunded ]
          example: 'already_refunded'
        is_ce_candidate:
          type: boolean
          description: | 
            Specifies whether the dispute is eligible for <a href="https://support.checkout.com/hc/en-us/articles/14323750143634-Visa-Compelling-Evidence-3-0-Overview">Visa Compelling Evidence</a>.
          example: true
        _links:
          type: object
          properties:
            self:
              description: The dispute retrieval endpoint
              properties:
                href:
                  example: 'https://{prefix}.api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf'
    Evidence:
      type: object
      properties:
        proof_of_delivery_or_service_file:
          type: string
          description: A file containing proof of delivery of goods or services.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        proof_of_delivery_or_service_text:
          type: string
          description: |
            A brief description of the file provided in `proof_of_delivery_or_service_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Description of evidence available at: http://checkout.com/evidenceDocument.pdf'
        proof_of_delivery_or_service_date_file:
          type: string
          description: A file showing the delivery date of the provided service or merchandise.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        proof_of_delivery_or_service_date_text:
          type: string
          description: |
            A brief description of the file provided in `proof_of_delivery_or_service_date_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of the customer receipt showing the merchandise was delivered on 2018-12-20'
        invoice_or_receipt_file:
          type: string
          description: A file containing an invoice or receipt.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        invoice_or_receipt_text:
          type: string
          description: |
            A brief description of the file provided in `invoice_or_receipt_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of the invoice'
        invoice_showing_distinct_transactions_file:
          type: string
          description: A file containing an invoice which shows two distinct transactions.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        invoice_showing_distinct_transactions_text:
          type: string
          description: |
            A brief description of the file provided in `invoice_showing_distinct_transactions_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of invoice #1244 showing two transactions'
        customer_communication_file:
          type: string
          description: A file containing proof of communication with the customer.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        customer_communication_text:
          type: string
          description: |
            A brief description of the file provided in `customer_communication_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of an email exchange with the cardholder'
        refund_or_cancellation_policy_file:
          type: string
          description: A file containing the refund or cancellation policy.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        refund_or_cancellation_policy_text:
          type: string
          description: |
            A brief description of the file provided in `refund_or_cancellation_policy_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of the refund policy'
        recurring_transaction_agreement_file:
          type: string
          description: A file containing the recurring transaction agreement.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        recurring_transaction_agreement_text:
          type: string
          description: |
            A brief description of the file provided in `recurring_transaction_agreement_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of the recurring transaction agreement'
        additional_evidence_file:
          type: string
          description: A file containing additional supporting documents.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        additional_evidence_text:
          type: string
          description: |
            A brief description of the file provided in `additional_evidence_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Scanned document'
        arbitration_no_review_files:
          type: array
          items:
            type: string
          description: |
            The evidence to submit directly to the scheme when you escalate the dispute to arbitration.
      
            Evidence you provide with this field is submitted directly to the scheme.
          example: [ "file_jmbfgkjromvcrn9t4qu4", "file_kmbfgkjromvcrn9t4qu5" ]
        arbitration_no_review_text:
          type: string
          description: |
            A brief description of the file provided in `arbitration_no_review_files`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Evidence for arbitration'
        arbitration_review_required_files:
          type: array
          items:
            type: string
          description: |
            The evidence to submit to the Checkout.com Dispute Resolution team for review. 
            
            You'll be advised on the likelihood of success if you choose to escalate the dispute to arbitration.
          example: [ "file_jmbfgkjromvcrn9t4qu4", "file_kmbfgkjromvcrn9t4qu5" ]
        arbitration_review_required_text:
          type: string
          description: |
            A brief description of the file provided in `arbitration_review_required_files`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Evidence for arbitration'
        compelling_evidence:
          type: object
          description: Used to resolve friendly fraud with merchant historical transactions.
          allOf:
            - $ref: '#/components/schemas/CompellingEvidence'
    File:
      type: object
      required:
        - file
        - purpose
      properties:
        file:
          type: string
          description: The path of the file to upload, and its type. <br><i>This must be a local path.</i>
          example: 'file=@/path/receipt.png;type=image/png'
        purpose:
          type: string
          description: | 
            The purpose of the file upload. 
            
            If the file is a supporting document for a dispute, set this to `dispute_evidence`. If the file is a supporting document for arbitration, set this to `arbitration_evidence`.
          example: 'dispute_evidence'
    FilePurpose:
      type: string
      description: |
        The purpose of the file. 
        
        The value `submitted_evidence` represents the finalized evidence which was uploaded to the scheme portals.
      example: 'dispute_evidence'
      enum:
        - dispute_evidence
        - arbitration_evidence
        - submitted_evidence
    FileResult:
      type: object
      description: File was retrieved successfully
      properties:
        id:
          type: string
          description: The file identifier
          example: 'file_6lbss42ezvoufcb2beo76rvwly'
        filename:
          type: string
          description: The filename, including its extension
          example: 'receipt.jpg'
        purpose:
          $ref: '#/components/schemas/FilePurpose'
        size:
          type: integer
          description: The size of the file upload object (in bytes)
          example: 1024
        uploaded_on:
          type: string
          format: date-time
          description: The date and time file was uploaded (in UTC)
          example: '2019-05-17T16:48:52Z'
        _links:
          type: object
          properties:
            self:
              description: The file information retrieval URL
              properties:
                href:
                  example: 'https://{prefix}.api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly'
            download:
              description: The temporary file download URL. This expires after 60 minutes
              properties:
                href:
                  example: 'https://file-bucket.s3.eu-west-1.amazonaws.com/ucdac/ucdac/6lbss42ezvoufcb2beo76rvwly?X-Amz-Expires=3600&x-amz-security-token=FQoDYXdzENL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEa'
    FileUploadResponse:
      type: object
      description: File uploaded successfully
      properties:
        id:
          type: string
          description: The file identifier
          example: 'file_6lbss42ezvoufcb2beo76rvwly'
        _links:
          type: object
          properties:
            self:
              description: The file information retrieval URL
              properties:
                href:
                  example: 'https://{prefix}.api.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly'
    PaymentData:
      type: object
      properties:
        id:
          type: string
          description: The payment's unique identifier
          example: 'pay_mbabizu24mvu3mela5njyhpit4'
        action_id:
          type: string
          description: The unique identifier of the payment action
          example: 'act_mbabizu24mvu3mela5njyhpit4'
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: The processing channel used for the payment.
          example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq'
        amount:
          type: number
          description: The amount that is being disputed, in the processing currency
          example: 999
        currency:
          type: string
          description: The payment currency
          example: 'GBP'
        reference:
          type: string
          description: An optional reference to identify the payment.
        method:
          type: string
          description: The payment method used
          example: 'Visa'
        acquirer_reference_number:
          type: string
          description: The acquirer reference number (ARN)
          example: 'AA246873253573571073808'
        mcc:
          type: string
          description: The <a href= "https://www.checkout.com/docs/resources/codes/merchant-category-codes">merchant category code (MCC)</a> for the payment.
          example: '5021'
        3ds: 
          type: object 
          description: Specifies if the payment was authenticated with 3DS.
          properties:
            version:
              type: string
              description: The 3D Secure version used for authentication.
              example: '2.1.0'
            enrolled:
              type: string
              description: |
                The issuer's 3D Secure (3DS) enrollment status:
                  - `Y`: issuer enrolled
                  - `N`: customer not enrolled
                  - `U`: enrollment status unknown
              example: Y
        eci:
          type: string
          description: |
            The final Electronic Commerce Indicator (ECI) security level used to authorize the payment.
      
            The ECI indicator is applicable to 3D Secure (3DS) and network token payments.
          example: '06'
        has_refund:
          type: boolean
          description: Specifies whether there is a refund against the payment.
        processed_on:
          type: string
          format: date-time
          description: The date and time at which the payment was requested
          example: '2018-08-01T08:18:10Z'
    ProvideEvidenceRequest:
      type: object
      properties:
        proof_of_delivery_or_service_file:
          type: string
          description: A file containing proof of delivery of goods or services.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        proof_of_delivery_or_service_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `proof_of_delivery_or_service_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Description of evidence available at: http://checkout.com/evidenceDocument.pdf'
        proof_of_delivery_or_service_date_file:
          type: string
          description: A file showing the delivery date of the provided service or merchandise.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        proof_of_delivery_or_service_date_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `proof_of_delivery_or_service_date_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of the customer receipt showing the merchandise was delivered on 2018-12-20'
        invoice_or_receipt_file:
          type: string
          description: A file containing an invoice or receipt.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        invoice_or_receipt_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `invoice_or_receipt_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of the invoice'
        invoice_showing_distinct_transactions_file:
          type: string
          description: A file containing invoice showing two distinct transactions.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        invoice_showing_distinct_transactions_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `invoice_showing_distinct_transactions_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of invoice #1244 showing two transactions'
        customer_communication_file:
          type: string
          description: A file containing customer communication.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        customer_communication_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `customer_communication_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of an email exchange with the cardholder'
        refund_or_cancellation_policy_file:
          type: string
          description: A file containing refund/cancellation policy
          example: 'file_jmbfgkjromvcrn9t4qu4'
        refund_or_cancellation_policy_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `refund_or_cancellation_policy_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of the refund policy'
        recurring_transaction_agreement_file:
          type: string
          description: A file containing the recurring transaction agreement
          example: 'file_jmbfgkjromvcrn9t4qu4'
        recurring_transaction_agreement_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `recurring_transaction_agreement_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Copy of the recurring transaction agreement'
        additional_evidence_file:
          type: string
          description: A file containing additional supporting documents.
          example: 'file_jmbfgkjromvcrn9t4qu4'
        additional_evidence_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `additional_evidence_file`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Scanned document'
        arbitration_no_review_files:
          type: array
          items:
            type: string
          description: |
            The evidence to submit directly to the scheme when you escalate the dispute to arbitration.
      
            Evidence you provide with this field is submitted directly to the scheme.
          example: [ "file_jmbfgkjromvcrn9t4qu4", "file_kmbfgkjromvcrn9t4qu5" ]
        arbitration_no_review_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `arbitration_no_review_files`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Evidence for arbitration'
        arbitration_review_required_files:
          type: array
          items:
            type: string
          description: |
            The evidence to submit to the Checkout.com Dispute Resolution team for review. 
            
            You'll be advised on the likelihood of success if you choose to escalate the dispute to arbitration.
          example: [ "file_jmbfgkjromvcrn9t4qu4", "file_kmbfgkjromvcrn9t4qu5" ]
        arbitration_review_required_text:
          type: string
          maximum: 500
          description: |
            A brief description of the file provided in `arbitration_review_required_files`. 
            
            Alternatively, you can provide a link to an externally-hosted file containing the description.
          example: 'Evidence for arbitration'
        compelling_evidence:
          type: object
          description: Used to resolve friendly fraud with merchant historical transactions.
          allOf:
            - $ref: '#/components/schemas/CompellingEvidence'
        _links:
          type: object
          properties:
            self:
              description: The evidence retrieval endpoint.
              properties:
                href:
                  example: 'https://{prefix}.api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf12/evidence'
            parent:
              description: The dispute retrieval endpoint.
              properties:
                href:
                  example: 'https://{prefix}.api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf12'
    SchemeFileResponse:
      type: object
      properties:
        id:
          type: string
          pattern: "^dsp_(\\w{22,26})$"
          description: The dispute identifier
          example: 'dsp_rbhwd2qrg13uhrp2newfab'
        files:
          type: array
          description: The scheme files of a dispute
          items:
            type: object
            properties:
                dispute_status:
                  type: string
                  description: The dispute status of the scheme file
                  example: 'dispute_lost'
                file:
                  type: string
                  description: The scheme file identifier
                  example: file_6lbss42ezvoufcb2beo76rvwly
        _links:
          type: object
          properties:
            self:
              allOf:
                - $ref: '#/components/schemas/Link'
              description: The dispute scheme files retrieval endpoint
              example:
                href: 'https://{prefix}.api.checkout.com/disputes/dsp_rbhwd2qrg13uhrp2newf/schemefiles'
    SubmittedEvidenceResponse:
      type: object
      properties:
        file_id:
          type: string
          description: The unique identifier for the PDF file containing all of the submitted evidence.
          pattern: "^(file)_(\\w{26})$"
          example: "file_iweu3nxyt6zund3gwhg7wo4fhq"
        _links:
          type: object
          properties:
            self:
              type: object
              description: The endpoint you can use to retrieve the unique identifier of the PDF file containing all of the submitted dispute evidence.
              properties:
                href:
                  type: string
                  example: "https://{prefix}.api.checkout.com/disputes/dsp_f28bcafe073z72ad4a18/evidence/submitted"
    Error:
      type: object
      properties:
        request_id:
          type: string
          example: 0HL80RJLS76I7
        error_type:
          type: string
          example: request_malformed
    FavActiveLink:
      type: object
      required:
        - verification_url
      properties:
        verification_url:
          description: The attempt URL to redirect the applicant to.
          allOf:
            - $ref: '#/components/schemas/IdvHalLink'
    FavApplicantSessionInformation:
      title: ApplicantSessionInformation
      type: object
      description: The details of the attempt.
      properties:
        ip_address:
          type: string
          description: The applicant's IP address during the attempt.
          example: "123.4.5.6"
    FavAttemptAsset:
      type: object
      required:
        - type
        - _links
      properties:
        type:
          type: string
          description: The type of asset.
          enum:
            - face_image
            - face_video
        _links:
          type: object
          required:
            - asset_url
          properties:
            asset_url:
              allOf:
                - $ref: "#/components/schemas/IdvHalLink"
    FavAttemptAssets:
      type: object
      required:
        - total_count
        - skip
        - limit
        - data
        - _links
      properties:
        total_count:
          type: integer
          description: The total number of assets.
        skip:
          type: integer
          description: The number of assets you want to skip. <br/>Example – There are 10 assets. If you provide `6`, the first six assets are skipped.
        limit:
          type: integer
          description: The maximum number of assets you want returned. <br/>Example – There are 10 assets. If you set `limit` to `5`, but skip the first six, four assets are returned.
        data:
          type: array
          description: The list of assets for the current page.
          minItems: 0
          items:
            $ref: "#/components/schemas/FavAttemptAsset"
        _links:
          readOnly: true
          description: The details of links to the previous, current, and next resources.
          allOf:
            - $ref: "#/components/schemas/IdvSelfLink"
            - $ref: "#/components/schemas/IdvNextLink"
            - $ref: "#/components/schemas/IdvPreviousLink"
    FavAttemptId:
      
      type: string
      description: The unique identifier for the face authentication attempt.
      pattern: ^fatp_\w+$
      example: fatp_tkoi5db4hryu5cei5vwoabraio
      readOnly: true
    FavAttemptLinks:
      type: object
      allOf:
        - $ref: '#/components/schemas/IdvSelfLink'
        - $ref: "#/components/schemas/FavActiveLink"
    FavAttemptRequest:
      type: object
      required: [redirect_url]
      properties:
        redirect_url:
          type: string
          description: The URL to redirect the applicant to after the attempt.
          format: uri
        client_information:
          $ref: "#/components/schemas/IdvClientInformation"
    FavAttemptResponse:
      type: object
      required: [redirect_url, id, _links, status, created_on, modified_on, response_codes]
      properties:
        id:
          type: string
          allOf:
            - $ref: '#/components/schemas/FavAttemptId'
        redirect_url:
          type: string
          description: The URL to redirect the applicant to after the attempt.
        status:
          type: string
          allOf:
            - $ref: '#/components/schemas/IdvAttemptStatuses'
        response_codes:
          type: array
          description: One or more [response codes](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Response_codes) that provide more information about the status.
          readOnly: true
          minItems: 0
          items:
            $ref: "#/components/schemas/IdvResponseCode"
        client_information:
          $ref: "#/components/schemas/IdvClientInformation"
        applicant_session_information:
          $ref: "#/components/schemas/FavApplicantSessionInformation"
        _links:
          readOnly: true
          description: The details of links related to the resource.
          allOf:
            - $ref: "#/components/schemas/FavAttemptLinks"
      allOf:  
              - $ref: "#/components/schemas/DatedObject" 
    FavAttemptResponseList:
      type: object
      required: [total_count, skip, limit, _links, data]
      properties:
        total_count:
          type: integer
          description: The total number of attempts.
        skip:
          type: integer
          default: 0
          description: The number of attempts you want to skip, to help you view the relevant attempt. <br/>Example – There are 10 attempts. If you provide `6`, the first six attempts are skipped.
        limit:
          type: integer
          default: 10
          description: The maximum number of attempts you want returned. <br/>Example – There are 10 attempts. If you set `limit` to `5`, but skip the first six, four attempts are returned. 
        data:
          type: array
          description: The details of the attempt.
          minItems: 0
          items:
            $ref: "#/components/schemas/FavAttemptResponse"
        _links:
          readOnly: true
          description: The details of links to the previous, current, and next resources.
          allOf:
            - $ref: "#/components/schemas/IdvSelfLink"
            - $ref: "#/components/schemas/IdvNextLink"
            - $ref: "#/components/schemas/IdvPreviousLink"
    FavFaceAuthentication:
      type: object
      required:
        - id
      properties:
        id:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/FavFaceAuthenticationId'
      allOf:
        - $ref: '#/components/schemas/DatedObject'
        - $ref: '#/components/schemas/FavFaceAuthenticationBase'
    FavFaceAuthenticationBase:
      type: object
      required:
        - applicant_id
        - response_codes
        - risk_labels
        - status
        - user_journey_id
        - _links
      properties:
        applicant_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/ApplicantId'
        user_journey_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/IdvUserJourneyId'
        status:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IdvVerificationStatuses'
        response_codes:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IdvResponseCodes'
        risk_labels:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IdvRiskLabels'
        face:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IdvFace'
        _links:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/FavFaceAuthenticationLinks'
    FavFaceAuthenticationCreateBase:
      type: object
      required:
        - status
        - _links
        - applicant_id
        - response_codes
        - risk_labels
      properties:
        applicant_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/ApplicantId'
        user_journey_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/IdvUserJourneyId'
        status:
          $ref: '#/components/schemas/FavVerificationStatuses'
        face:
          allOf:
            - $ref: '#/components/schemas/IdvFace'
          readOnly: true
        response_codes:
          $ref: '#/components/schemas/IdvResponseCodes'
        risk_labels:
          $ref: '#/components/schemas/IdvRiskLabels'
        _links:
          $ref: '#/components/schemas/FavFaceAuthenticationLinks'
    FavFaceAuthenticationError:
      type: object
      required:
        - error_type
        - error_codes
      properties:
        error_type:
          type: string
          description: The type of error.
          enum:
            - unprocessable_entity
            - request_invalid
        error_codes:
          type: array
          description: The error codes.
          items:
            type: string
    FavFaceAuthenticationId:
      type: string
      description: The face authentication's unique identifier.
      pattern: ^fav_\w+$
      example: fav_mtta050yudd54y5iqb5ijh8jtvz
      readOnly: true
    FavFaceAuthenticationLinks:
      type: object
      description: The details of links related to the resource.
      allOf:
        - $ref: '#/components/schemas/IdvSelfLink'
        - $ref: '#/components/schemas/IdvApplicantLink'
    FavFaceAuthenticationOutput:
      type: object
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/FavFaceAuthenticationId'
      allOf:
        - $ref: '#/components/schemas/DatedObject'
        - $ref: '#/components/schemas/FavFaceAuthenticationCreateBase'
    FavVerificationStatuses:
      type: string
      description: The [face authentication status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Check_statuses).
      readOnly: true
      enum:
        - approved
        - capture_in_progress
        - checks_in_progress
        - created
        - declined
        - inconclusive
        - pending
        - refused
        - retry_required
    FinancialAction:
      type: object
      required:
        - payment_id
        - action_id
        - action_type
        - entity_id
        - currency_account_id
        - processed_on
        - requested_on
      properties:
        payment_id:
          type: string
          description: The unique ID of the payment to which a financial action is associated.
          example: pay_qqufsd3rfnqufngwklghlxrzpm
          pattern: "^(pay)_(\\w{26})$"
        action_id:
          type: string
          description: The unique ID of a given financial action impacting your balances.
          example: act_wsnyzbzmr2huxcekoj7qqhxwuy
          pattern: "^(act)_(\\w{26})$"
        action_type:
          type: string
          description: The type of action processed. For example, authorization, capture, refund, chargeback, pay to card.
          example: Capture
        entity_id:
          type: string
          description: The unique ID of the entity for which the payment was processed.
          example: ent_xozz5q2yvxsetbslrvjxugbsyy
          pattern: "^(ent)_(\\w{26})$"
        sub_entity_id:
          type: string
          description: The unique ID of the sub-entity for which the payment was processed.
          example: ent_6akzb5simnkejihbnw6udjpecq
          pattern: "^(ent)_(\\w{26})$"
        currency_account_id:
          type: string
          description: The unique ID of the currency account to which the financial action amount was charged.
          example: ca_oo5z564in66ujcsxlbhjsar3p4
          pattern: "^(ca)_(\\w{26})$"
        payment_method:
          type: string
          description: The payment method associated with the financial action.
          example: MASTERCARD
        processing_channel_id:
          type: string
          description: The unique ID for processing channel configurations.
          example: pc_y7hikmc5flhuvav47blunjsdui
          pattern: "^(pc)_(\\w{26})$"
        mid:
          type: string
          description: An optional merchant ID used to segment your payments traffic with card schemes.
          example: mid-12345
        response_code:
          type: string
          description: The payment request response code.
          example: '10000'
        response_description:
          type: string
          description: A description of the payment request response code.
          example: Approved
        region:
          type: string
          description: The region where this payment occurred.
          enum:
            - Domestic
            - International
            - Intra
            - IntraEEA
            - IntraEuropean_SEPA
          example: International
        card_type:
          type: string
          description: The card type used to make the payment
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
          example: CREDIT
        card_category:
          type: string
          description: The card category used to make the payment. For example, consumer or commercial.
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        issuer_country:
          type: string
          description: Two-digit ISO country code of the country where the payment is processed.
          example: US
        merchant_category_code:
          type: string
          description: Four-digit code for retail financial services expressed in ISO 18245 format, classifying the types of goods or services you provide.
          example: '5311'
        fx_trade_id:
          type: string
          description: The unique ID of the foreign exchange trade executed in fulfillment of a financial action.
          example: trd_intsaxljgi6uzkxnv6lex3xayu
        acquirer_reference_number:
          type: string
          description: The unique number assigned to a transaction when it moves through the payment flow between the merchant bank and the cardholder's bank.
          example: '01234567890123456789012'
        account_funding_transaction:
          type: boolean
          description: A flag to mark if a transaction debited funds from an account to fund a non-merchant account. For example, to load a prepaid card or top up a wallet.
          example: true
        scheme_fx_adjustment_eligible:
          type: boolean
          description: A flag to mark if the transaction honors the scheme exchange rate applicable at the time of authorization for both authorization and settlement movements.
          example: true
        processed_on:
          type: string
          description: An ISO 8601 timestamp of when the action was processed and impacted your balances, in UTC.
          format: date-time
          example: '2022-02-18T13:00:12.357Z'
        requested_on:
          type: string
          description: An ISO 8601 timestamp of when a gateway request was made for an action, in UTC.
          format: date-time
          example: '2022-02-18T13:00:11.724Z'
        breakdown:
          type: array
          description: The breakdown of amounts within this financial action.
          items:
            $ref: '#/components/schemas/FinancialActionBreakdown'
        bin:
          type: string
          description: Identifier for the financial institution that issued the card.
          example: '444444'
        issuing_bank:
          type: string
          description: The bank that issued the card used to make the payment.
          example: Bank Name
        payment_type:
          type: string
          description: Specifies the type of card payment where the cardholder is not present e.g. recurring or mail order. This could be Regular, Recurring, MOTO, Installment, or Unscheduled.
          example: Regular
      additionalProperties: false
      description: Financial actions response details.
    FinancialActionBreakdown:
      type: object
      required:
        - breakdown_type
        - fx_rate_applied
        - holding_currency
        - holding_currency_amount
        - processing_currency
        - processing_currency_amount
      properties:
        breakdown_type:
          type: string
          description: A description of the type of fee or amount. For example, authorization fee.
          example: Scheme Fixed Fee
        fx_rate_applied:
          type: number
          description: The foreign exchange rate applied to a processed financial action.
          example: 1.24
        holding_currency:
          type: string
          description: Three-digit ISO currency code of the currency a financial action is held and paid out in.
          example: USD
        holding_currency_amount:
          type: number
          description: The associated amount of the financial action in the holding currency.
          example: 0.19526938
        processing_currency:
          type: string
          description: Three-digit ISO currency code of a financial action when processed.
          example: GBP
        processing_currency_amount:
          type: number
          description: The associated amount of the financial action in the processing currency.
          example: 0.15816820
        transaction_currency:
          type: string
          description: The currency of the transaction.
          example: EUR
        transaction_currency_amount:
          type: number
          description: The transaction amount, expressed in the transaction currency.
          example: 0.18031175
        processing_to_transaction_currency_fx_rate:
          type: number
          description: The foreign exchange rate between the processing currency and the transaction currency.
          example: 1.14
        transaction_to_holding_currency_fx_rate:
          type: number
          description: The foreign exchange rate between the transaction currency and the holding currency. This rate is inferred from both the FX Rate and Processing to Transaction Currency FX Rate columns to account for foreign exchange rates from multiple rate ticks.
          example: 1.08
        fee_detail:
          type: string
          description: The additional level of granularity for predicted scheme fees applied.
          example: Visa Fixed Acquirer Network Fee
        reserve_rate:
          type: string
          description: The percentage amount reserved from the payment.
          example: 5%
        reserve_release_date:
          type: string
          description: The date that the reserve is scheduled to be released for a Rolling Reserve Deducted, or the date that the reserve is released for a Rolling Reserve Released financial action.
          format: date-time
          example: '2023-06-21T09:15:34.782Z'
        reserve_deducted_date:
          type: string
          description: The date the reserve was deducted from the payment.
          format: date-time
          example: '2022-02-18T13:00:12.357Z'
        tax_fx_rate:
          type: number
          description: The foreign exchange rate between the holding currency and the tax currency at the point the financial action was processed.
          example: 1.45
        scheme_fx_adjustment_processing_currency:
          type: string
          description: The processing currency of the transactions covered by the scheme FX adjustment.
          example: GBP
        scheme_fx_adjustment_rate_applied:
          type: number
          description: The rate applied to calculate the scheme FX adjustment over eligible transactions.
          example: 1.45
        entity_country_tax_currency:
          type: string
          description: The currency of the country your entity resides in for tax purposes, if applicable.
          example: AUD
        tax_currency_amount:
          type: number
          description: The amount of tax applied, expressed in the tax currency.
          example: 1.10
    FinancialActionErrorResponse:
      type: object
      properties:
        request_id:
          type: string
          description: Request ID
          example: '0HMJGFVAQ35TL:00000117'
        error_type:
          type: string
          description: >
            The type of error. <br/>
            • `invalid_request`: Usually occurs with an HTTP status code `422`. The request payload failed validation. <br/>
            • `not_found`: Usually occurs with an HTTP status code `404`. The requested resource was not found. <br/>
        error_codes:
          type: array
          items:
            type: string
          description: >
            Error response code. Full list of error codes below: <br/>
            • `invalid_some_field`: Usually occurs with an error type `invalid_request` and HTTP status code `422 Unprocessable entity`. The field `some_field` failed validation. Please consult the API spec. <br/>
            • `some_resource_not_found`: Usually occurs with an error type `not_found`. The resource you are trying to retrieve does not exist. <br/>
      additionalProperties: false
      description: Error Response
    FinancialActionListResponse:
      type: object
      properties:
        count:
          type: integer
          description: The total number of financial actions on the current page.
          format: int32
          example: 1
        limit:
          type: integer
          description: The maximum number of results included per page.
          format: int32
          example: 5
          minimum: 1
          maximum: 100
          default: 100
        data:
          type: array
          items:
            type: object
            allOf:
              - $ref: '#/components/schemas/FinancialAction'
            description: The list of financial actions from the current page.
        _links:
          type: object
          description: The `links` object.
          properties:
            self:
              type: object
              description: The `self` object.
              allOf:
                - $ref: '#/components/schemas/FinancialActionsSelfLink'
              example:
                href: https://{prefix}.api.checkout.com/financial-actions?payment_id=pay_qqufsd3rfnqufngwklghlxrzpm&limit=5
            next:
              type: object
              description: The `next` object.
              allOf:
                - $ref: '#/components/schemas/FinancialActionsNextLink'
              example:
                href: 'https://{prefix}.api.checkout.com/financial-actions?payment_id=pay_qqufsd3rfnqufngwklghlxrzpm&limit=5&pagination_token=string'
      additionalProperties: false
      description: The list of financial actions in the response.
    FinancialActionsLink:
      type: object
      properties:
        href:
          type: string
    FinancialActionsNextLink:
      allOf:
        - $ref: '#/components/schemas/FinancialActionsLink'
    FinancialActionsSelfLink:
      allOf:
        - $ref: '#/components/schemas/FinancialActionsLink'
    get-event-response:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: The unique event identifier
          example: evt_az5sblvku4ge3dwpztvyizgcau
        source:
          type: string
          description: The source of the event
          example: gateway
        type:
          type: string
          description: The event type
          example: payment_approved
        timestamp:
          type: string
          format: date-time
          description: The date/time the event occurred
        version:
          type: string
          description: The version of the event
          example: 1.0.0
        data:
          $ref: '#/components/schemas/event-data'
        action_invocations:
          type: array
          description: The list of the actions that trigger this event.
          items:
            type: object
            properties:
              workflow_id:
                type: string
                pattern: ^wf_[a-z0-9]{26}$
                description: The workflow identifier
                example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
              workflow_action_id:
                type: string
                description: The workflow action identifier
                example: wfa_uzkxpffkvpiu5fe3h5ira7sqpa
              status:
                type: string
                description: The status of the workflow action.
                enum:
                  - pending
                  - successful
                  - failed
              _links:
                  type: object
                  description: Links related to the workflow action
                  minItems: 1
                  required:
                    - self
                  properties:
                    self:
                      type: object
                      allOf:
                      - $ref: '#/components/schemas/Link'
                      description: Workflow action results for this event
                  example:
                    self:
                      href: "https://{prefix}.api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/actions/wfa_uzkxpffkvpiu5fe3h5ira7sqpa"
        _links:
          allOf:
            - $ref: '#/components/schemas/event-links'
    get-event-types-response:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            description: The unique identifier of the event source
            example: gateway
          display_name:
            type: string
            description: The display name of the event source
            example: Gateway
          description:
            type: string
            description: A description of the event source
            example: Events from the Checkout.com payment gateway
          events:
            type: array
            description: The events raised by the source
            items:
              type: object
              properties:
                id:
                  type: string
                  description: The event type identifier
                  example: payment_approved
                display_name:
                  type: string
                  description: The display name of the event
                  example: Payment Authorized
                description:
                  type: string
                  description: A description of the event
                  example: Occurs when a payment is successfully authorized by the Checkout.com payment gateway
    event-data:
      type: object
      description: The event data
      example:
        {
          'id': 'pay_mbabizu24mvu3mela5njyhpit4',
          'action_id': 'act_y3oqhf46pyzuxjbcn2giaqnb44',
          'amount': 6540,
          'currency': 'USD',
          'approved': true,
          'status': 'Authorized',
          'auth_code': '643381',
          'payment_type': 'Regular',
          'response_code': '10000',
          'response_summary': 'Approved',
          'scheme_id': '745664329470123',
          '3ds': { 'downgraded': true, 'enrolled': 'N' },
          'flagged': true,
          'source':
            {
              'type': 'card',
              'id': 'src_nwd3m4in3hkuddfpjsaevunhdy',
              'billing_address':
                {
                  'line1': '123 High St',
                  'line2': 'Flat 456',
                  'town_city': 'London',
                  'state': 'GB',
                  'zip': 'SW1A 1AA',
                  'country': 'GB',
                },
              'phone': { 'country_code': '+1', 'number': '415 555 2671' },
              'expiry_month': 12,
              'expiry_year': 2025,
              'scheme': VISA',
              'last_4': '4242',
              'fingerprint': '54710B428R6H190D29087FF265D8F48DF1AD34EDE41C27CBFF9D23C1A14D9876',
              'bin': '424242',
              'card_type': 'CREDIT',
              'card_category': 'CONSUMER',
              'issuer': 'MERCHANT UK',
              'issuer_country': 'GB',
              'product_id': 'F',
              'product_type': 'Visa Classic',
              'avs_check': 'G',
              'cvv_check': 'Y'
            },
            'processing': 
            {
                'acquirer_transaction_id': '501979547418712947435',
                'retrieval_reference_number': '682643929865'
            },
            'balances':
            {
                  'total_authorized': 6540,
                  'total_voided': 0,
                  'available_to_void': 6540,
                  'total_captured': 0,
                  'available_to_capture': 6540,
                  'total_refunded': 0,
                  'available_to_refund': 0
            },
            'event_links': 
            {
                'payment': 'https://{prefix}.api.checkout.com/payments/pay_wlu3wxc26jounofs5iez75qaqa',
                'dispute': 'https://{prefix}.api.checkout.com/disputes/dsp_jfh5iqceqau0qw3ccf3p'
            },
          'customer': { 'id': 'cus_y3oqhf46pyzuxjbcn2giaqnb44', 'email': 'brucewayne@gmail.com', 'name': 'Bruce Wayne' },
          'processed_on': '2020-02-27T11:26:59Z',
          'reference': 'ORD-5023-4E89',
          'metadata': { 'coupon_code': 'NY2018', 'partner_id': 123989 },
        }
    event-links:
      type: object
      description: Links related to the event
      minItems: 1
      required:
        - self
      properties:
        self:
          type: object
          allOf:
            - $ref: '#/components/schemas/Link'
          description: The URI of the event
      example:
        self:
          href: 'https://{prefix}.api.checkout.com/workflows/events/evt_az5sblvku4ge3dwpztvyizgcau'
        payment:
          href: 'https://{prefix}.api.checkout.com/payments/pay_wlu3wxc26jounofs5iez75qaqa'
        dispute:
          href: 'https://{prefix}.api.checkout.com/disputes/dsp_jfh5iqceqau0qw3ccf3p'
    source-events-hashmap:
      type: object
      additionalProperties:
        description: The event source
        type: array
        items:
          type: string
          description: The source event types
          example: payment_approved
      example:
        gateway:
          - card_verified
          - card_verification_declined
          - payment_approved
          - payment_pending
          - payment_declined
          - payment_voided
          - payment_captured
          - payment_refunded
        disputes:
          - dispute_canceled
          - dispute_evidence_required
          - dispute_expired
          - dispute_lost
          - dispute_resolved
          - dispute_won
    subject-events-response:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The unique event identifier
                example: evt_az5sblvku4ge3dwpztvyizgcau
              type:
                type: string
                description: The event type
                example: payment_approved
              timestamp:
                type: string
                format: date-time
                description: The date/time the event occurred
              _links:
                $ref: '#/components/schemas/event-links'
          example:
            - id: evt_zrrgsvsr47ou7fng4shy4mtf64
              type: payment_approved
              timestamp: '2019-05-23T08:25:53Z'
              _links:
                self:
                  href: https://{prefix}.api.checkout.com/events/evt_zrrgsvsr47ou7fng4shy4mtf64
            - id: evt_wgwdfyem4ode5furs5swyy6b2u
              type: payment_captured
              timestamp: '2019-05-24T07:00:53Z'
              _links:
                self:
                  href: https://{prefix}.api.checkout.com/events/evt_zrrgsvsr47ou7fng4shy4mtf64
    ids-validation-error:
      type: object
      properties:
        request_id:
          type: string
          example: 0HL80RJLS76I7
        error_type:
          type: string
          example: request_invalid
        error_codes:
          type: array
          items:
            type: string
            example: event_ids_invalid
          example: [event_ids_invalid, workflow_ids_invalid]
    reflow-events-by-event-and-workflow-ids:
      type: object
      required:
        - events
      properties:
        events:
          type: array
          description: A list of IDs for the events you want reflowed.
          items:
            type: string
            description: The identifiers of the events you want reflowed.
            pattern: ^evt_[a-z0-9]{26}$
            example: evt_hnmnr6hdbslqlc38jd8mn35bk9
          example: [evt_lzmo6p0i3612judj754w1ngtil, evt_05z6xuagtti48ajyfbuekg6a0a]
        workflows:
          type: array
          description: A list of IDs for the workflows whose actions you want to retrigger.
          items:
            type: string
            description: The identifiers of the workflows you want retriggered.
            pattern: ^wf_[a-z0-9]{26}$
            example: wf_iiutwnpb1p8044f2aq2znez9c6
          example: [wf_sq8jnqi9i749hhb470bu308uk2, wf_bz91q7i4ks4sr0kasmas2xhp56]
    reflow-events-by-subject-and-workflow-ids:
      type: object
      required:
        - subjects
      properties:
        subjects:
          type: array
          description: A list of subject IDs (for example, payment IDs and disputes IDs). The events associated with these subjects will be reflowed.
          items:
            type: string
            description: The identifiers of the subjects (for example, payment IDs and dispute IDs) whose events you want reflowed.
            pattern: ^[a-z]{3}_[a-z0-9]{26}$
          example: [pay_lzmo6p0i3612judj754w1ngtil, pay_ol8zt9jviq4mkark1bo5b4i9sk]
        workflows:
          type: array
          description: A list of IDs for the workflows whose actions you want to retrigger.
          items:
            type: string
            description: The identifiers of the workflows you want retriggered.
            pattern: ^wf_[a-z0-9]{26}$
          example: [wf_sq8jnqi9i749hhb470bu308uk2, wf_bz91q7i4ks4sr0kasmas2xhp56]
    get-invocations-response:
      type: object
      properties:
        workflow_id:
          type: string
          pattern: ^wf_[a-z0-9]{26}$
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
        event_id:
          type: string
          description: The unique event identifier.
          example: evt_az5sblvku4ge3dwpztvyizgcau
        workflow_action_id:
          type: string
          description: The worklow action identifier.
          example: wfa_uzkxpffkvpiu5fe3h5ira7sqpa
        action_type:
          type: string
          description: The workflow action type.
          example: webhook
        status:
          type: string
          description: The status of the workflow action. It aggregates the past invocations outcome.
          enum:
            - pending
            - successful
            - failed
          example: successful
        action_invocations:
          example:
            [
              {
                'invocation_id': 'ivc_az5sblvku4ge3dwpztvyizgcau',
                'timestamp': '2019-05-23T08:26:59Z',
                'retry': false,
                'succeeded': true,
                'final': true,
                'result_details':
                  {
                    'status_code': 200,
                    'url': 'https://example.com/webhooks',
                    'headers': { 'Authorization': '<AUTHORIZATION_UUID>' },
                    'response_received_timestamp': '2019-05-23T08:27:01Z',
                  },
              },
              {
                'invocation_id': 'ivc_az5sblvku4ge3dwpztvyizgcau',
                'timestamp': '2019-05-23T08:27:01Z',
                'retry': true,
                'succeeded': false,
                'final': false,
                'result_details':
                  {
                    'status_code': 500,
                    'url': 'https://example.com/webhooks',
                    'headers': { 'Authorization': '<AUTHORIZATION_UUID>' },
                    'response_received_timestamp': '2019-05-23T08:27:01Z',
                  },
              },
            ]
          type: array
          description: The list of the actions that trigger this event.
          items:
            type: object
            properties:
              invocation_id:
                type: string
                description: The invocation identifier.
                example: 'ivc_az5sb1vku4ge3dwpztvy'
              timestamp:
                type: string
                format: date-time
                description: The date/time the action was invoked for the event.
                example: '2019-05-23T08:26:59Z'
              retry:
                type: boolean
                description: Whether the invocation has been retried.
                example: true
              succeeded:
                type: boolean
                description: Whether the invocation completed successfully.
                example: false
              final:
                type: boolean
                description: Indicates whether this is the final attempt.
                example: false
              result_details:
                type: object
                description: The result details returned from the action.
        _links:
          type: object
          description: Links related to the workflow action
          minItems: 1
          required:
            - self
          properties:
            self:
              type: object
              allOf:
              - $ref: '#/components/schemas/Link'
              description: Workflow action results for this event
          example:
            self:
              href: "https://{prefix}.api.checkout.com/events/evt_az5sblvku4ge3dwpztvyizgcau/actions/wfa_uzkxpffkvpiu5fe3h5ira7sqpa"
    get-webhook-action:
      type: object
      description: Action that sends a webhook
      required:
        - url
      allOf:
        - $ref: '#/components/schemas/get-workflow-action'
        - type: object
          required:
            - url
          properties:
            url:
              type: string
              format: uri
              description: Your webhook endpoint URL
              example: 'https://example.com/webhooks/checkout'
            headers:
              type: object
              description: Optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request
              additionalProperties:
                type: string
                description: The HTTP header value
              example:
                Authorization: '<AUTHORIZATION_UUID>'
            signature:
              type: object
              description:
                Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header.
                This value can be computed by you on receipt of a webhook to validate its authenticity.
              required:
                - key
              properties:
                method:
                  type: string
                  description: The signing method, defaults to HMAC SHA256
                  example: HMACSHA256
                key:
                  type: string
                  description: The key used the sign the webhook
                  example: public-signing-key
            _links:
              $ref: '#/components/schemas/workflow-action-links'
    get-workflow-action:
      type: object
      description: The workflow action
      discriminator:
        propertyName: type
        mapping:
          webhook: '#/components/schemas/get-webhook-action'
          #email: '#/components/schemas/email-action'
          #slack: '#/components/schemas/get-slack-action'
          #simulator: '#/components/schemas/get-simulator-action'
      required:
        - id
        - type
      properties:
        id:
          type: string
          description: The workflow action identifier
          example: wfa_tisekcawefze3l27uaai6hz74y
        type:
          type: string
          description: The type of workflow action
          example: webhook
    patch-response-webhook-action:
      type: object
      description: The action that sends a webhook
      required:
        - url
      allOf:
        - $ref: '#/components/schemas/patch-response-workflow-action'
        - type: object
          required:
            - url
          properties:
            url:
              type: string
              format: uri
              description: Your webhook endpoint URL
              example: 'https://example.com/webhooks/checkout'
            headers:
              type: object
              description: The optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request
              additionalProperties:
                type: string
                description: The HTTP header value
              example:
                Authorization: '<AUTHORIZATION_UUID>'
            signature:
              type: object
              description: Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header.
                On receipt of a webhook, you can compute this value to validate its authenticity.
              required:
                - key
              properties:
                method:
                  type: string
                  description: The signing method, defaults to `HMACSHA256`
                  example: HMACSHA256
                key:
                  type: string
                  description: The key used the sign the webhook
                  example: public-signing-key
    patch-response-workflow-action:
      type: object
      description: The workflow patch action
      discriminator:
        propertyName: type
        mapping:
          webhook: '#/components/schemas/patch-response-webhook-action'
          #email: '#/components/schemas/patch-response-email-action'
      required:
        - id
        - type
      properties:
        id:
          type: string
          description: The workflow action identifier
          example: wfa_itja4x7zgzye3andzqq62u4hvq
        type:
          type: string
          description: The type of workflow action
          example: webhook
    patch-webhook-action:
      type: object
      description: The action that sends a webhook
      required:
        - url
      allOf:
        - $ref: '#/components/schemas/patch-workflow-action'
        - type: object
          required:
            - url
          properties:
            url:
              type: string
              format: uri
              description: Your webhook endpoint URL
              example: 'https://example.com/webhooks/checkout'
            headers:
              type: object
              description: The optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request
              additionalProperties:
                type: string
                description: The HTTP header value
              example:
                Authorization: '<AUTHORIZATION_UUID>'
            signature:
              type: object
              description: Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header.
                On receipt of a webhook, you can compute this value to validate its authenticity.
              required:
                - key
              properties:
                method:
                  type: string
                  description: The signing method, defaults to `HMACSHA256`
                  example: HMACSHA256
                key:
                  type: string
                  description: The key used the sign the webhook
                  example: public-signing-key
    patch-workflow-action:
      type: object
      description: The workflow action
      discriminator:
        propertyName: type
        mapping:
          webhook: '#/components/schemas/patch-webhook-action'
          #email: '#/components/schemas/patch-email-action'
      required:
        - type
      properties:
        workflow_action_id:
          type: string
          description: The workflow action identifier needed to update an existing action ID. Do not include this property if you want to add a new action.
          example: wfa_itja4x7zgzye3andzqq62u4hvq
        type:
          type: string
          description: The type of workflow action
          example: webhook
    webhook-action:
      type: object
      description: Action that sends a webhook
      required:
        - url
      allOf:
        - $ref: '#/components/schemas/workflow-action'
        - type: object
          required:
            - url
          properties:
            url:
              type: string
              format: uri
              description: Your webhook endpoint URL
              example: 'https://example.com/webhooks/checkout'
            headers:
              type: object
              description: Optional [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) added to the request
              additionalProperties:
                type: string
                description: The HTTP header value
              example:
                Authorization: '<AUTHORIZATION_UUID>'
            signature:
              type: object
              description:
                Used to produce a signature of the webhook contents that will be included in the `Cko-Signature` header.
                This value can be computed by you on receipt of a webhook to validate its authenticity.
              required:
                - key
              properties:
                method:
                  type: string
                  description: The signing method used to sign the webhook. If no value is specified, the value defaults to `HMAC SHA256`.
                  example: HMACSHA256
                key:
                  type: string
                  description: The key used to sign the webhook
                  example: public-signing-key
    workflow-action:
      type: object
      description: The workflow action
      discriminator:
        propertyName: type
        mapping:
          webhook: '#/components/schemas/webhook-action'
          #email: '#/components/schemas/email-action'
          #simulator: '#/components/schemas/simulator-action'
      required:
        - type
      properties:
        type:
          type: string
          description: The type of workflow action
          example: webhook
    add-update-workflow-action-request:
      type: object
      description: The workflow action
      discriminator:
        propertyName: type
        mapping:
          webhook: '#/components/schemas/webhook-action'
          #email: '#/components/schemas/email-action'
          #simulator: '#/components/schemas/simulator-action'
      required:
        - type
      properties:
        type:
          type: string
          description: The type of workflow action
          example: webhook
      example:
        {
          'type': 'webhook',
          'url': 'https://example.com/webhooks',
          'headers': { 'Authorization': '<AUTHORIZATION_UUID>' },
        }
    add-update-workflow-condition-request:
      type: object
      description: The workflow condition
      discriminator:
        propertyName: type
        mapping:
          event: '#/components/schemas/event-condition'
          entity: '#/components/schemas/entity-condition'
          processing_channel: '#/components/schemas/processing-channel-condition'
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the workflow condition
          example: event
      example:
        {
          "type": "event",
          "events": {
            "gateway": [
              "payment_approved",
              "payment_pending",
              "payment_declined"
            ]
          }
        }
    add-workflow-action-response:
      type: object
      properties:
        id:
          type: string
          description: The workflow action identifier
          example: wfa_wlu3wxc26jounofs5iez75qaqa
        _links:
          $ref: '#/components/schemas/workflow-action-links'
    add-workflow-condition-response:
      type: object
      properties:
        id:
          type: string
          description: The workflow condition identifier
          example: wfc_wlu3wxc26jounofs5iez75qaqa
        _links:
          $ref: '#/components/schemas/workflow-condition-links'
    add-workflow-request:
      type: object
      properties:
        name:
          type: string
          description: A name you can use to describe your workflow
          example: Webhooks workflow
        active:
          type: boolean
          description: Indicates whether the workflow is currently active
          default: true
          example: true
        conditions:
          type: array
          description: Only one condition of the same type is permitted
          minItems: 1
          items:
            $ref: '#/components/schemas/workflow-condition'
        actions:
          type: array
          description: One or more workflow actions
          minItems: 1
          items:
            $ref: '#/components/schemas/workflow-action'
      example:
        {
          'name': 'Webhooks workflow',
          'active': true,
          'conditions':
            [
              {
                'type': 'event',
                'events':
                  {
                    'gateway':
                      [
                          'payment_approved',
                          'payment_declined',
                          'card_verification_declined',
                          'card_verified',
                          'payment_authorization_incremented',
                          'payment_authorization_increment_declined',
                          'payment_capture_declined',
                          'payment_captured',
                          'payment_refund_declined',
                          'payment_refunded',
                          'payment_void_declined',
                          'payment_voided',
                      ],
                    'dispute':
                      [
                          'dispute_canceled',
                          'dispute_evidence_required',
                          'dispute_expired',
                          'dispute_lost',
                          'dispute_resolved',
                          'dispute_won',
                      ],
                  },
              },
              { 'type': 'entity', 'entities': [ 'ent_xyfdshfudosfdshfdiosfds', 'ent_fidjosfjdisofdjsifdosfu' ] },
              { 'type': 'processing_channel', 'processing_channels': [ 'pc_axclravnqf5u5ejkweijnp5zc4' ] },
            ],
          'actions':
            [
              {
                'type': 'webhook',
                'url': 'https://example.com/webhooks',
                'headers': { 'Authorization': '<AUTHORIZATION_UUID>' },
                'signature': { 'method': 'HMACSHA256', 'key': '8V8x0dLK%AyD*DNS8JJr' },
              },
            ],
        }
    add-workflow-response:
      type: object
      properties:
        id:
          type: string
          description: The workflow identifier
          example: wf_wlu3wxc26jounofs5iez75qaqa
        _links:
          $ref: '#/components/schemas/workflow-links'
    entity-condition:
      type: object
      description: The condition that filters, based on the NAS entity. It does not apply to MBC accounts.
      required:
        - entities
      allOf:
        - $ref: '#/components/schemas/workflow-condition'
        - type: object
          required:
            - entities
          properties:
            entities:
              $ref: '#/components/schemas/source-entity-hashmap'
    event-condition:
      type: object
      description: Condition that enables a source
      required:
        - events
      allOf:
        - $ref: '#/components/schemas/workflow-condition'
        - type: object
          required:
            - events
          properties:
            events:
              $ref: '#/components/schemas/source-events-hashmap'
    get-entity-condition:
      type: object
      description: Condition that filters based on the entity
      required:
        - entities
      allOf:
        - $ref: '#/components/schemas/get-workflow-condition'
        - type: object
          required:
            - entities
          properties:
            entities:
              $ref: '#/components/schemas/source-entity-hashmap'
            _links:
              $ref: '#/components/schemas/workflow-condition-links'
    get-event-condition:
      type: object
      description: Condition that enables a source
      required:
        - events
      allOf:
        - $ref: '#/components/schemas/get-workflow-condition'
        - type: object
          required:
            - events
          properties:
            events:
              $ref: '#/components/schemas/source-events-hashmap'
            _links:
              $ref: '#/components/schemas/workflow-condition-links'
    get-processing-channel-condition:
      type: object
      description: Condition that filters based on the processing channel
      required:
        - processing_channels
      allOf:
        - $ref: '#/components/schemas/get-workflow-condition'
        - type: object
          required:
            - processing_channels
          properties:
            processing_channels:
              $ref: '#/components/schemas/source-processing-channel-hashmap'
            _links:
              $ref: '#/components/schemas/workflow-condition-links'
    get-workflow-condition:
      type: object
      description: The get workflow condition
      discriminator:
        propertyName: type
        mapping:
          event: '#/components/schemas/get-event-condition'
          entity: '#/components/schemas/get-entity-condition'
          processing_channel: '#/components/schemas/get-processing-channel-condition'
      required:
        - id
        - type
      properties:
        id:
          type: string
          description: The workflow condition identifier
          example: wfc_tisekcawefze3l27uaai6hz74y
        type:
          type: string
          description: The type of the workflow condition
          example: event
    patch-entity-condition:
      type: object
      description: The condition that filters, based on the NAS entity. It does not apply to MBC accounts.
      required:
        - entities
      allOf:
        - $ref: '#/components/schemas/patch-workflow-condition'
        - type: object
          required:
            - entities
          properties:
            entities:
              $ref: '#/components/schemas/source-entity-hashmap'
    patch-event-condition:
      type: object
      description: The condition that enables a source
      required:
        - events
      allOf:
        - $ref: '#/components/schemas/patch-workflow-condition'
        - type: object
          required:
            - events
          properties:
            events:
              $ref: '#/components/schemas/source-events-hashmap'
    patch-processing-channel-condition:
      type: object
      description: The condition that filters, based on the NAS processing channel. It does not apply to MBC accounts.
      required:
        - processing_channels
      allOf:
        - $ref: '#/components/schemas/patch-workflow-condition'
        - type: object
          required:
            - processing_channels
          properties:
            processing_channels:
              $ref: '#/components/schemas/source-processing-channel-hashmap'
    patch-workflow-condition:
      type: object
      description: The workflow condition
      discriminator:
        propertyName: type
        mapping:
          event: '#/components/schemas/patch-event-condition'
          entity: '#/components/schemas/patch-entity-condition'
          processing_channel: '#/components/schemas/patch-processing-channel-condition'
      required:
        - id
        - type
      properties:
        id: 
          type: string
          description: The workflow condition identifier
          example: wfc_tisekcawefze3l27uaai6hz74e
        type:
          type: string
          description: The type of the workflow condition
          example: event
    processing-channel-condition:
      type: object
      description: Condition that filters based on the NAS processing channel. It's not applicable for MBC accounts
      required:
        - processing_channels
      allOf:
        - $ref: '#/components/schemas/workflow-condition'
        - type: object
          required:
            - processing-channels
          properties:
            processing_channels:
              $ref: '#/components/schemas/source-processing-channel-hashmap'
    source-entity-hashmap:
      type: array
      items:
        type: string
      minItems: 1
      pattern: ^ent_[a-z0-9]{26}$
      description: ent_axclravnqf5u5ejkweijnp5zc4
      example:
        - ent_axclravnqf5u5ejkweijnp5zc4
        - ent_fidjosfjdisofdjsifdosfuzc4
    source-processing-channel-hashmap:
      type: array
      items:
          type: string
      minItems: 1
      pattern: ^pc_[a-z2-7]{26}$
      description: pc_axclravnqf5u5ejkweijnp5zc4
      example:
          - pc_axclravnqf5u5ejkweijnp5zc4
          - pc_aascravnas5u5ejkseijnp9zc2
    workflow-condition:
      type: object
      description: The workflow condition
      discriminator:
        propertyName: type
        mapping:
          event: '#/components/schemas/event-condition'
          entity: '#/components/schemas/entity-condition'
          processing_channel: '#/components/schemas/processing-channel-condition'
      required:
        - type
      properties:
        type:
          type: string
          description: The type of the workflow condition
          example: event
    get-all-workflows-response:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^wf_[a-z0-9]{26}$
                description: The unique identifier of the workflow
                example: wf_wlu3wxc26jounofs5iez75qaqa
              name:
                type: string
                description: The name of your workflow
                example: Webhooks workflow
              active:
                type: boolean
                description: Indicates whether the workflow is currently active
                example: true
              _links:
                $ref: '#/components/schemas/workflow-links'
    get-workflow-response:
      type: object
      properties:
        id:
          type: string
          description: The workflow identifier
          example: wf_34pacj7ae6wexju4avpecxvp6e
        name:
          type: string
          description: A name you can use to describe your workflow
          example: Webhooks workflow
        active:
          type: boolean
          description: Indicates whether the workflow is currently active
          example: true
        conditions:
          type: array
          description: One or more workflow conditions
          minItems: 1
          items:
            $ref: '#/components/schemas/get-workflow-condition'
        actions:
          type: array
          description: One or more workflow actions
          minItems: 1
          items:
            $ref: '#/components/schemas/get-workflow-action'
        _links:
          $ref: '#/components/schemas/workflow-links'
      example:
        {
          'id': 'wf_34pacj7ae6wexju4avpecxvp6e',
          'name': 'Webhooks workflow',
          'active': true,
          'conditions':
            [
              {
                'id': 'wfc_tisekcawefze3l27uaai6hz74e',
                'type': 'event',
                'events': { 'gateway': ['payment_approved', 'payment_pending', 'payment_declined'] },
                '_links':
                  {
                    'self':
                      {
                        'href': 'https://{prefix}.api.checkout.com/workflows/wf_34pacj7ae6wexju4avpecxvp6e/conditions/wfc_tisekcawefze3l27uaai6hz74e',
                      },
                  },
              },
              {
                'id': 'wfc_tisekcawefze3l27uaai6hz74y',
                'type': 'entity',
                'entities': ['ent_xyfdshfudosfdshfdiosfds', 'ent_fidjosfjdisofdjsifdosfu'],
                '_links':
                  {
                    'self':
                      {
                        'href': 'https://{prefix}.api.checkout.com/workflows/wf_34pacj7ae6wexju4avpecxvp6e/conditions/wfc_tisekcawefze3l27uaai6hz74y',
                      },
                  },
              },
              {
                'id': 'wfc_tisekcawefze3l27uaai6hz26y',
                'type': 'processing_channel',
                'processing_channels': ['pc_axclravnqf5u5ejkweijnp5zc4'],
                '_links':
                  {
                    'self':
                      {
                        'href': 'https://{prefix}.api.checkout.com/workflows/wf_34pacj7ae6wexju4avpecxvp6e/conditions/wfc_tisekcawefze3l27uaai6hz26y',
                      },
                  },
              },
            ],
          'actions':
            [
              {
                'id': 'wfa_itja4x7zgzye3andzqq62u4hvq',
                'type': 'webhook',
                'url': 'https://example.com/webhooks',
                'headers': { 'Authorization': '<AUTHORIZATION_UUID>' },
                'signature': { 'method': 'HMACSHA256', 'key': '8V8x0dLK%AyD*DNS8JJr' },
                '_links':
                  {
                    'self':
                      {
                        'href': 'https://{prefix}.api.checkout.com/workflows/wf_34pacj7ae6wexju4avpecxvp6e/actions/wfa_itja4x7zgzye3andzqq62u4hvq',
                      },
                  },
              },
            ],
          '_links': { 'self': { 'href': 'https://{prefix}.api.checkout.com/workflows/wf_wlu3wxc26jounofs5iez75qaqa' } },
        }
    patch-workflow-request:
      type: object
      properties:
        name:
          type: string
          description: A name to describe the workflow
          example: Webhooks workflow
        active:
          type: boolean
          description: Indicates whether the workflow is currently active
          example: true
        conditions:
          type: array
          description: One or more workflow conditions
          minItems: 1
          items:
            $ref: '#/components/schemas/workflow-condition'
        actions:
          type: array
          description: One or more workflow actions
          minItems: 1
          items:
            $ref: '#/components/schemas/patch-workflow-action'
      example:
        {
          "name": "Webhooks workflow",
          "active": true,
          "conditions":
            [
              {
                "type": "event",
                "events":
                  {
                    "gateway":
                      ["payment_approved", "payment_pending", "payment_declined"],
                  }
              },
              {
                "type": "entity",
                "entities":
                  ["ent_xyfdshfudosfdshfdiosfds", "ent_fidjosfjdisofdjsifdosfu"]
              },
              {
                "type": "processing_channel",
                "processing_channels": ["pc_axclravnqf5u5ejkweijnp5zc4"]
              }
            ],
          "actions":
            [
              {
                "workflow_action_id": "wfa_itja4x7zgzye3andzqq62u4hvq",
                "type": "webhook",
                "url": "https://example.com/webhooks",
                "headers":
                  { "Authorization": '<AUTHORIZATION_UUID>' },
                "signature":
                  { "method": "HMACSHA256", "key": "8V8x0dLK%AyD*DNS8JJr" }
              }
            ]
        }
    patch-workflow-response:
      type: object
      properties:
        id:
          type: string
          description: The workflow identifier
          example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
        name:
          type: string
          description: A name you can use to describe your workflow
          example: Webhooks workflow
        active:
          type: boolean
          description: Indicates whether the workflow is currently active
          example: true
        conditions:
          type: array
          description: One or more workflow conditions
          minItems: 1
          items:
            $ref: '#/components/schemas/patch-workflow-condition'
        actions:
          type: array
          description: One or more workflow actions
          minItems: 1
          items:
            $ref: '#/components/schemas/patch-response-workflow-action'
        _links:
          $ref: '#/components/schemas/workflow-links'
      example:
        {
          "id": "wf_c7svxlvo2bbuva4f6s3xu4f7wm",
          "name": "Webhooks workflow",
          "active": true,
          "conditions":
            [
              {
                "id": "wfc_tisekcawefze3l27uaai6hz74e",
                "type": "event",
                "events":
                  {
                    "gateway":
                      ["payment_approved", "payment_pending", "payment_declined"],
                  }
              },
              {
                "id": "wfc_tisekcawefze3l27uaai6hz74y",
                "type": "entity",
                "entities":
                  ["ent_xyfdshfudosfdshfdiosfds", "ent_fidjosfjdisofdjsifdosfu"]
              },
              {
                "id": "wfc_tisekcawefze3l27uaai6hz26y",
                "type": "processing_channel",
                "processing_channels": ["pc_axclravnqf5u5ejkweijnp5zc4"]
              }
            ],
          "actions":
            [
              {
                "id": "wfa_itja4x7zgzye3andzqq62u4hvq",
                "type": "webhook",
                "url": "https://example.com/webhooks",
                "headers":
                  { "Authorization": '<AUTHORIZATION_UUID>' },
                "signature":
                  { "method": "HMACSHA256", "key": "8V8x0dLK%AyD*DNS8JJr" }
              }
            ],
          "_links":
            {
              "self":
                {
                  "href": "http://flow.cko.lon/client/workflows/wf_c7svxlvo2bbuva4f6s3xu4f7wm",
                }
            }
        }
    workflow-action-links:
      type: object
      description: Links related to the workflow action
      minItems: 1
      properties:
        self:
          type: object
          allOf:
            - $ref: '#/components/schemas/Link'
          description: The URI of the workflow action
      example:
        self:
          href: 'https://{prefix}.api.checkout.com/workflows/wf_wlu3wxc26jounofs5iez75qaqa/actions/wfa_wlu3wxc26jounofs5iez75qaqa'
    workflow-condition-links:
      type: object
      description: Links related to the workflow condition
      minItems: 1
      properties:
        self:
          type: object
          allOf:
            - $ref: '#/components/schemas/Link'
          description: The URI of the workflow condition
      example:
        self:
          href: 'https://{prefix}.api.checkout.com/workflows/wf_wlu3wxc26jounofs5iez75qaqa/conditions/wfc_wlu3wxc26jounofs5iez75qaqa'
    workflow-links:
      type: object
      description: Links related to the workflow
      minItems: 1
      required:
        - self
      properties:
        self:
          type: object
          allOf:
            - $ref: '#/components/schemas/Link'
          description: The URI of the workflow
      example:
        self:
          href: 'https://{prefix}.api.checkout.com/workflows/wf_wlu3wxc26jounofs5iez75qaqa'
    test-workflow-request:
      type: object
      properties:
        event_types:
          type: object
          title: Event Types by Source
          additionalProperties:
            type: array
            title: Source
            items:
              type: string
              title: Event Type
            description: List of event types for this source
          description: Map of source names to their corresponding event types (e.g., gateway, issuing, authentication, etc.)
      example:
        event_types:
          gateway:
            - payment_approved
            - payment_captured
          issuing:
            - 3ds_card_enrolled
            - 3ds_card_information_changed
    ForexRate:
      type: object
      properties:
        exchange_rate:
          description: The FX rate with Checkout.com margin applied. Up to eight decimal places provided in response.
          type: number
          format: double
          example: 1.14208777
        currency_pair:
          description: Currency pair
          type: string
          example: 'GBPUSD'
        valid_from:
          description: ISO-8601 timestamp of when the FX rate became available in UTC. This applies to the Scheme Acquiring product only.
          allOf:
            - $ref: '#/components/schemas/Timestamp'
              
    ForexRatesResponse:
      type: object
      properties:
        product:
          $ref: '#/components/schemas/ForexProduct'
        source:
          $ref: '#/components/schemas/ForexSource'
        rates:
          description: List of FX rates with Checkout.com margin applied
          type: array
          items:
            $ref: '#/components/schemas/ForexRate'
        invalid_currency_pairs:
          description: List of currency pairs that Checkout.com was unable to provide rates for
          type: array
          items:
            type: string
            description: Currency pair
          example: 
            - XXX
            - AAA 
            - ZZZ
      example:
        product: card_payouts
        source: visa
        rates:
          - exchange_rate: 1.14208777
            currency_pair: GBPEUR
          - exchange_rate: 0.83708142
            currency_pair: USDGBP
        invalid_currency_pairs:
          - XXXAAA
    ForexProcessingChannelId:
      type: string
      pattern: "^(pc)_(\\w{26})$"
      description: The <a href="https://www.checkout.com/docs/business-operations/use-the-dashboard/manage-processing-channels" target="_blank">processing channel's</a> unique identifier.
      example: pc_vxt6yftthv4e5flqak6w2i7rim
    ForexProduct:
      type: string
      enum: 
        - card_payouts
        - daily_acquiring
        - scheme_acquiring
      description: The Checkout.com Forex product you want to get rates for.
      example: 'card_payouts'
    ForexSource:
      type: string
      enum: 
        - mastercard
        - visa
      description: The scheme that provided the FX rates.<br/>If `product` is `daily_acquiring`, this field is not required.
      example: 'visa'
    ForwardRequest:
      type: object
      description: |
        The request template to forward to the third-party endpoint.
      
        Template values will be replaced before the request is forwarded.
      required:
        - source
        - destination_request
      properties:
        source:
          $ref: '#/components/schemas/ForwardRequestSource'
      
        reference:
          description: The unique reference for the forward request.
          maxLength: 80
          type: string
          example: 'ORD-5023-4E89'
      
        processing_channel_id:
          description: The processing channel ID to associate the billing for the forward request with.
          pattern: '^(pc)_(\w{26})$'
          type: string
          example: 'pc_azsiyswl7bwe2ynjzujy7lcjca'
      
        network_token:
          $ref: '#/components/schemas/ForwardRequestNetworkToken'
      
        destination_request:
          description: The parameters of the forward request.
          allOf:
            - $ref: '#/components/schemas/ForwardDestinationRequest'
    ForwardResponse:
      type: object
      description: The response to the forward request.
      required:
        - request_id
      properties:
        request_id:
          description: The unique identifier for the forward request.
          type: string
          example: fwd_01HK153X00VZ1K15Z3HYC0QGPN
      
        destination_response:
          description: The HTTP response received from the destination, if the forward request completed successfully.
            Sensitive PCI data will be removed from the response.
          allOf:
            - $ref: '#/components/schemas/ForwardBodyResponse'
        source:
          type: object
          description: The metadata of the forwarded card credentials.
          required:
            - bin
            - last4
            - fingerprint
          properties:
            id:
              type: string
              pattern: ^src_[a-z0-9]{26}$
              example: 'src_evls5rkafabudm3x6gejc4bbo4'
              description: |
                The identifier of the payment instrument with the forwarded card credentials.
      
                When `source.type` is `"token"`, only returned if the `source.store_for_future_use` is true.
            bin:
              type: string
              description: The card issuer's Bank Identification Number (BIN)
              maxLength: 8
              example: '45434748'
            last4:
              type: string
              minLength: 4
              maxLength: 4
              description: The last four digits of the card number
              example: '9996'
            fingerprint:
              type: string
              minLength: 64
              maxLength: 64
              description: Uniquely identifies this particular card. You can use this to compare cards across customers.
              example: 'B086A9386241A0BDCBEFAFC1E4FD5C3DD04684AAD21A126CB426C05555AC86A9'
    GetForwardRequestResponse:
      type: object
      description: The response to the forward request.
      required:
        - request_id
        - entity_id
        - destination_request
        - created_on
      properties:
        request_id:
          description: The unique identifier for the forward request.
          type: string
          example: fwd_01HK153X00VZ1K15Z3HYC0QGPN
      
        reference:
          description: The unique reference for the forward request.
          type: string
          example: 'ORD-5023-4E89'
      
        entity_id:
          description: The client entity linked to the forward request.
          type: string
          example: 'ent_lp6h57qskk6ubewfk3pq4f2c2y'
      
        destination_request:
          description: The parameters of the HTTP request forwarded to the destination.
          allOf:
            - $ref: '#/components/schemas/GetForwardRequestDestinationRequest'
      
        destination_response:
          description: |
            The HTTP response received from the destination. 
            
            Sensitive PCI data is not included in the response.
          allOf:
            - $ref: '#/components/schemas/GetForwardRequestDestinationResponse'
      
        created_on:
          type: string
          description: The date and time the forward request was created, in UTC.
          format: date-time
          example: '2024-01-02T15:04:05+00:00'
    ForwardBodyHeadersRequest:
      type: object
      description: The request headers to include in the forward request.
      required:
        - raw
      properties:
        encrypted:
          description: The encrypted headers to include in the forward request, as a JSON object with string values encrypted with JSON Web Encryption (JWE).
          type: string
          maxLength: 8192
          example:
            '<JWE encrypted JSON object with string values>'
      
        raw:
          description: The raw headers to include in the forward request.
          type: object
          maxProperties: 16
          additionalProperties:
            type: string
            maxLength: 5120
            x-additionalPropertiesName: <Header-Name>
            description: The header value.
          example:
            Idempotency-Key: 'xe4fad12367dfgrds'
            Content-Type: 'application/json'
    ForwardBodyResponse:
      type: object
      description: The response returned by the third-party endpoint the forward request was sent to.
      required:
        - status
        - headers
        - body
      properties:
        status:
          description: The HTTP status code of the destination response. 
          type: number
          example: 201
      
        headers:
          description: The destination response's HTTP headers.
          type: object
          additionalProperties:
            x-additionalPropertiesName: <Header-Name>
            description: The header values.
            type: array
            items:
              type: string
          example:
            Cko-Request-Id: ['5fa7ee8c-f82d-4440-a6dc-e8c859b03235']
            Content-Type: ['application/json']
      
        body:
          description: The destination response's HTTP message body. 
          type: string
          example: '{"id": "pay_mbabizu24mvu3mela5njyhpit4", "action_id": "act_mbabizu24mvu3mela5njyhpit4", "amount": 6540, "currency": "USD", "approved": true, "status": "Authorized", "auth_code": "770687", "response_code": "10000", "response_summary": "Approved", "_links": {"self": {"href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4"}, "action": {"href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions"}, "void": {"href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/voids"}, "capture": {"href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/captures"}}}'
    ForwardDestinationRequest:
      type: object
      description: The details of the request to forward.
      required:
        - url
        - method
        - headers
        - body
      properties:
        url:
          description: The URL to forward the request to.
          maxLength: 1024
          type: string
          example: 'https://example.com/payments'
      
        method:
          description: The HTTP method to use for the forward request.
          type: string
          enum:
            - 'GET'
            - 'HEAD'
            - 'POST'
            - 'PUT'
            - 'DELETE'
            - 'OPTIONS'
            - 'TRACE'
            - 'PATCH'
          example: 'POST'
      
        headers:
          description: The HTTP headers to include in the forward request.
          type: object
          allOf:
            - $ref: '#/components/schemas/ForwardBodyHeadersRequest'
      
        body:
          description: |
            The HTTP message body to include in the forward request.
      
            If you provide `source.id` or `source.token`, you can specify <a href="https://www.checkout.com/docs/payments/manage-payments/forward-stored-payment-credentials#Placeholder_values" target="_blank\">placeholder values</a> in the body. The request will be enriched with the respective payment details from the token or payment instrument you specified. For example, `{{card_number}}`.
            
          type: string
          maxLength: 16384
          example: '{"amount": 1000, "currency": "USD", "reference": "some_reference", "source": {"type": "card", "number": "{{card_number}}", "expiry_month": "{{card_expiry_month}}", "expiry_year": "{{card_expiry_year_yyyy}}", "card_pin": "{{card_pin}}", "name": "Ali Farid"}, "payment_type": "Regular", "authorization_type": "Final", "capture": true, "processing_channel_id": "pc_xxxxxxxxxxx", "risk": {"enabled": false}, "merchant_initiated": true}'
      
        signature:
          $ref: '#/components/schemas/ForwardRequestSignature'
      
        variables:
          type: array
          maxItems: 10
          description: |
            The variables used in the forward request body. 
            
            You can provide <a href="https://www.checkout.com/docs/payments/manage-payments/forward-stored-payment-credentials#Placeholder_values" target="_blank\">placeholder values</a> in `destination_request.variables.value`. The request will be enriched with the payment credentials from the token or payment instrument you specified. For example, `{{card_number}}`. To reference variables, use `{{variable_name}}`. 
          items:
            type: object
            properties:
              name:
                type: string
                description: The variable name.
                example: 'card_data'
              value:
                type: string
                description: The variable value.
                example: '{"card_number":"{{card_number}}","expiry":"{{card_expiry_month}}"}'
          example:
            - name: 'card_data'
              value: '{"card_number":"{{card_number}}","expiry":"{{card_expiry_month}}"}'
            - name: 'public_key'
              value: '{"kty":"RSA","e":"AQAB","use":"enc","kid":"key-001"}'
        query:
          type: array
          maxItems: 10
          description: |
            The query parameters used in the forward request. These values are added to the destination URL as query parameters.
            
          items:
            type: object
            properties:
              name:
                type: string
                description: The query parameter name.
                example: 'api_key'
              value:
                type: string
                description: The query parameter value.
                example: '1234567890'
          example:
            - name: 'api_key'
              value: '1234567890'
            - name: 'user_id'
              value: '1234567890'
      
      
    ForwardRequestNetworkToken:
      type: object
      description: Specifies if and how a network token should be used in the forward request.
      properties:
        enabled:
          type: boolean
          description: Specifies whether to use a network token.
          example: true
        request_cryptogram:
          type: boolean
          description: |
            Specifies whether to generate a cryptogram. For example, for customer-initiated transactions (CITs).
      
            If you set `network_token.enabled` to `true`, you must provide this field.
          example: false
    ForwardRequestSignature:
      type: object
      description: |
        Optional configuration to add a signature to the forwarded HTTP request.
      discriminator:
        propertyName: type
        mapping:
          dlocal: '#/components/schemas/ForwardRequestSignatureDLocal'
          mastercard: '#/components/schemas/ForwardRequestSignatureMastercard'
          visa: '#/components/schemas/ForwardRequestSignatureVisa'
      properties:
        type:
          type: string
          description: The identifier of the supported signature generation method or a specific third-party service.
      required:
        - type
      example:
        type: 'dlocal'
        dlocal_parameters:
          secret_key: '9f439fe1a9f96e67b047d3c1a28c33a2e'
    ForwardRequestSignatureDLocal:
      type: object
      allOf:
        - $ref: '#/components/schemas/ForwardRequestSignature'
        - type: object
          required:
            - dlocal_parameters
          properties:
            dlocal_parameters:
              type: object
              description: |
                The parameters required to generate an HMAC signature for the dLocal API. See their [documentation](https://docs.dlocal.com/reference/payins-security) for details.
      
                This method requires you to provide the `X-Login` header value in the destination request headers.
                
                When used, the Forward API appends the `X-Date` and `Authorization` headers to the outgoing HTTP request before forwarding.  
              required:
                - secret_key
              properties:
                secret_key:
                  type: string
                  description: |
                    The secret key used to generate the request signature. This is part of the dLocal API credentials.
    ForwardRequestSignatureMastercard:
      type: object
      allOf:
        - $ref: '#/components/schemas/ForwardRequestSignature'
        - type: object
          required:
            - mastercard_parameters
          properties:
            mastercard_parameters:
              type: object
              description: |
                The parameters required to generate an OAuth 1.0a authentication and request signature header for the Mastercard APIs. For more information, see [Mastercard documentation](https://developer.mastercard.com/platform/documentation/authentication/using-oauth-1a-to-access-mastercard-apis/).
      
                When used, the Forward API appends the `Authorization` header to the outgoing HTTP request before forwarding.
              required:
                - consumer_key
                - signing_key
              properties:
                consumer_key:
                  type: string
                  description: |
                    An identifier of the client application. Part of the Mastercard APIs credentials.
                signing_key:
                  type: string
                  description: |
                    A 2048-bit private RSA key used to generate request signatures and confirming ownership of the consumer key. Part of the Mastercard APIs credentials.
    ForwardRequestSignatureVisa:
      type: object
      allOf:
        - $ref: '#/components/schemas/ForwardRequestSignature'
        - type: object
          required:
            - visa_parameters
          properties:
            visa_parameters:
              type: object
              description: |
                The parameters required to generate an HMAC-based request signature for the Visa APIs. For more information, see [Visa documentation](https://developer.visa.com/pages/working-with-visa-apis/x-pay-token).
      
                This method requires you to provide the `apikey` query parameter value in the destination request.
      
                When used, the Forward API appends the `X-PAY-TOKEN` header to the outgoing HTTP request before forwarding.
              required:
                - shared_secret
              properties:
                shared_secret:
                  type: string
                  description: |
                    The secret key used to generate the request signature; part of the Visa API credentials.
                remove_resource_path_prefix:
                  type: string
                  default: '/'
                  description: |
                    Some Visa APIs require a prefix to be removed from the resource path used to calculate the signature.<br/>
                    By default, only the leading slash is removed. </p>
                    
                    For more information, see [Visa documentation](https://developer.visa.com/pages/working-with-visa-apis/x-pay-token). 
    ForwardRequestSource:
      type: object
      description: |
        The payment source to enrich the forward request with.
      
        You can provide <a href="https://www.checkout.com/docs/payments/manage-payments/forward-stored-payment-credentials#Placeholder_values" target="_blank\">placeholder values</a> in `destination_request.body`. The request will be enriched with the respective payment credentials from the token or payment instrument you specified. For example, `{{card_number}}`.
      discriminator:
        propertyName: type
        mapping:
          id: '#/components/schemas/ForwardRequestIdSource'
          token: '#/components/schemas/ForwardRequestTokenSource'
      properties:
        type:
          type: string
          description: The payment source type.
      required:
        - type
      example:
        id: "src_v5rgkf3gdtpuzjqesyxmyodnya"
        type: "id"
    ForwardValidationError:
      type: object
      required:
        - request_id
        - error_type
        - error_codes
      properties:
        request_id:
          type: string
          example: fwd_01HK153X00VZ1K15Z3HYC0QGPN
        error_type:
          type: string
          example: request_invalid
        error_codes:
          type: array
          items:
            type: string
            example: processing_channel_id_required
        errors:
          type: object
          additionalProperties:
            x-additionalPropertiesName: <field_name>
            description: The field's error messages.
            type: array
            items:
              type: string
          example: {"processing_channel_id": ["The processing_channel_id field is required"]}
    GetForwardRequestDestinationRequest:
      type: object
      description: The details of the request to forward.
      required:
        - url
        - method
        - headers
        - body
      properties:
        url:
          description: The URL of the forward request.
          type: string
          example: 'https://example.com/payments'
      
        method:
          description: The HTTP method of the forward request.
          type: string
          example: 'POST'
      
        headers:
          description: |
            The HTTP headers of the forward request. 
            
            Encrypted and sensitive header values are redacted.
          type: object
          additionalProperties:
            type: string
            x-additionalPropertiesName: <Header-Name>
            description: The header value.
          example:
            Authorization: '***redacted***'
            Idempotency-Key: 'xe4fad12367dfgrds'
            Content-Type: 'application/json'
      
        body:
          description: |
            The HTTP message body of the forward request. 
            
            This is the original value used to initiate the request, with placeholder value text included. For example, `{{card_number}}` is not replaced with an actual card number.
          type: string
          example: '{"amount": 1000, "currency": "USD", "reference": "some_reference", "source": {"type": "card", "number": "{{card_number}}", "expiry_month": "{{card_expiry_month}}", "expiry_year": "{{card_expiry_year_yyyy}}", "card_pin": "{{card_pin}}", "name": "Ali Farid"}, "payment_type": "Regular", "authorization_type": "Final", "capture": true, "processing_channel_id": "pc_xxxxxxxxxxx", "risk": {"enabled": false}, "merchant_initiated": true}'
    GetForwardRequestDestinationResponse:
      type: object
      description: The response returned by the third-party endpoint the forward request was sent to.
      required:
        - status
        - headers
        - body
      properties:
        status:
          description: The HTTP status code returned with the destination response.
          type: number
          example: 201
      
        headers:
          description: The destination response's HTTP headers.
          type: object
          additionalProperties:
            x-additionalPropertiesName: <Header-Name>
            description: The header values.
            type: array
            items:
              type: string
          example:
            Cko-Request-Id: [ '5fa7ee8c-f82d-4440-a6dc-e8c859b03235' ]
            Content-Type: [ 'application/json' ]
      
        body:
          description: The destination response's HTTP message body.
          type: string
          example: '{"id": "pay_mbabizu24mvu3mela5njyhpit4", "action_id": "act_mbabizu24mvu3mela5njyhpit4", "amount": 6540, "currency": "USD", "approved": true, "status": "Authorized", "auth_code": "770687", "response_code": "10000", "response_summary": "Approved", "_links": {"self": {"href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4"}, "action": {"href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions"}, "void": {"href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/voids"}, "capture": {"href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/captures"}}}'
    ForwardRequestIdSource:
      type: object
      description: The payment instrument to enrich the forward request with.
      allOf:
        - $ref: '#/components/schemas/ForwardRequestSource'
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              pattern: "^(src)_(\\w{26})$"
              description: The unique identifier of the payment instrument.
              example: src_wmlfc3zyhqzehihu7giusaaawu
            cvv_token:
              type: string
              pattern: "^(tok)_(\\w{26})$"
              description: |
                The unique token for the card's security code.
      
                Checkout.com does not store a card's Card Verification Value (CVV) with its associated payment instrument. 
                
                To pass a CVV with your forward request, use the Frames SDK for <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-mobile-app/accept-a-payment-on-your-android-app#Tokenize_a_CVV">Android</a> or <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-mobile-app/accept-a-payment-on-your-ios-app#Tokenize_a_security_code">iOS</a> to collect and tokenize the CVV and pass the value in this field.
                
                The token will replace the placeholder `{{card_cvv}}` value in `destination_request.body`.
              example: tok_wnw2grxl4hbufp7q55tw2pb2t4
            pin_token:
              type: string
              pattern: "^(tok)_(\\w{26})$"
              description: |
                The unique token for the first 2 digits of the card's Personal Identification Number (PIN).  
      
                Checkout.com does not store a card's PIN with its associated payment instrument. 
      
                In specific regions, card holders must enter the first two digits of their 4-digit card PIN to confirm card ownership.  
      
                To provide the first 2 digits of the PIN with your forward request:  
      
                1. Collect the PIN from the user.  
                2. tokenize it using the  `/tokens` [endpoint](/#operation/requestAToken) setting `type` to `pin`.  
                3. Pass the resulting  `token` value of the response in this field.  
      
                This token replaces the `{{card_pin}}` placeholder value in `destination_request.body`.  
      
              example: tok_wnw2grxl4hbufp7q55tw2pb2t4
      
    ForwardRequestTokenSource:
      type: object
      description: The token to enrich the forward request with.
      allOf:
        - $ref: '#/components/schemas/ForwardRequestSource'
        - type: object
          required:
            - token
          properties:
            token:
              type: string
              pattern: "^(tok)_(\\w{26})$"
              description: The unique Checkout.com token.
              example: tok_ubfj2q76miwundwlk72vxt2i7q
            store_for_future_use:
              type: boolean
              default: false
              description: Specifies whether to store the tokenized credentials as a payment instrument and return its identifier in the response.
    CreateSecretPlaintextRequest:
      type: object
      description: Request to create a secret with plaintext value
      required:
        - name
        - value
      properties:
        name:
          type: string
          pattern: '^[a-zA-Z0-9_]{1,64}$'
          minLength: 1
          maxLength: 64
          description: | 
            Secret name. <br/>
            Format – 1-64 characters. Alphanumeric and underscore.
          example: secret_name
      
        value:
          type: string
          maxLength: 8192
          description: Plaintext secret value. Max 8KB.
          example: my_secret_value
      
        entity_id:
          type: string
          description: Optional.When provided, the secret is scoped to this entity
          example: ent_svrxgarj6qru5pzx4m4movyney
      
    SecretResponse:
      type: object
      description: Secret response metadata. The secret value is never returned in responses.
      required:
        - name
        - created_at
        - updated_at
        - version
      properties:
        name:
          type: string
          pattern: '^[a-zA-Z0-9_]{1,64}$'
          description: Secret name (1-64 characters, alphanumeric and underscore)
          example: secret_name
      
        created_at:
          type: string
          format: date-time
          description: Timestamp when the secret was created.
          example: '2025-10-14T00:00:00Z'
      
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the secret was last updated.
          example: '2025-10-14T00:00:00Z'
      
        version:
          type: integer
          minimum: 1
          description: Version number.
          example: 1
      
        entity_id:
          type: string
          description: Entity ID if the secret is scoped to a specific entity.
          example: ent_123
      
    UpdateSecretRequest:
      type: object
      description: |
        Request to update an existing secret. At least one of `value` or `entity_id` must be provided.
      properties:
        entity_id:
          type: string
          description: Update the entity scope.
          example: ent_kf3pqe272lqevcpx5xtlndgcii
      
        value:
          type: string
          maxLength: 8192
          description: New plaintext secret value. Max 8KB.
          example: NEW_VALUE_1
      
    GooglePayDomainListResponse:
      type: object
      additionalProperties: false
      required: [domains]
      properties:
        domains:
          type: array
          description: The list of domains registered for the entity.
          items:
            type: string
            format: hostname
    GooglePayEnrollmentRequest:
      type: object
      additionalProperties: false
      required: [entity_id, email_address, accept_terms_of_service]
      properties:
        entity_id:
          type: string
          description: The unique identifier of the entity to enroll.
          example: "ent_uzm3uxtssvmuxnyrfdffcyjxeu"
        email_address:
          type: string
          description: The email address of the user accepting the <a href=https://payments.developers.google.com/terms/sellertos>Google terms of service</a>.
          example: "test@gmail.com"
        accept_terms_of_service:
          type: boolean
          description: Indicates acceptance of the <a href=https://payments.developers.google.com/terms/sellertos>Google terms of service</a>. Must be true to proceed with enrollment.
          example: true
    GooglePayEnrollmentResponse:
      type: object
      additionalProperties: false
      required: [tosAcceptedTime, state]
      properties:
        tosAcceptedTime:
          type: string
          format: date-time
          description: An ISO 8601 timestamp of when the <a href=https://payments.developers.google.com/terms/sellertos>Google terms of service</a> were accepted.
          example: "2014-10-02T15:01:23Z"
        state:
          type: string
          enum: [ACTIVE, INACTIVE]
          description: The current enrollment state of the entity.
    GooglePayEnrollmentStateResponse:
      type: object
      additionalProperties: false
      required: [state]
      properties:
        state:
          type: string
          enum: [ACTIVE, INACTIVE]
          description: The current enrollment state of the entity.
    GooglePayErrorResponse:
      type: object
      properties:
        error_codes:
          type: array
          items:
            type: string
        error_type:
          type: string
          enum: [invalid_request]
        request_id:
          type: string
    GooglePayRegisterDomainRequest:
      type: object
      additionalProperties: false
      required: [web_domain]
      properties:
        web_domain:
          type: string
          format: hostname
          description: The web domain to register for an actively enrolled entity.
          example: "some.example.com"
    GetHostedPaymentsResponse:
      type: object
      discriminator:
        propertyName: status
        mapping:
          Payment Pending: '#/components/schemas/GetHostedPaymentsResponseStatusPaymentPending'
          Payment Received: '#/components/schemas/GetHostedPaymentsResponseStatusPaymentReceived'
          Expired: '#/components/schemas/GetHostedPaymentsResponseStatusExpired'
      
      required:
        - id
        - status
        - amount
        - currency
        - billing
        - success_url
        - cancel_url
        - failure_url
        - _links
      
      properties:
        id:
          example: hpp_xGQBg0AXl3cM
          allOf:
            - $ref: '#/components/schemas/HostedPaymentId'
        status:
          type: string
          enum:
            - Payment Pending
            - Payment Received
            - Expired
          description: |
            The status of the Hosted Payments Page:
              - `Payment Pending`: The Hosted Payments Page can accept a payment from the customer. A payment may have been attempted by the customer but not completed successfully.
              - `Payment Received`: A payment has been received successfully using this Hosted Payments Page.
              - `Expired`: The Hosted Payments Page has expired and can no longer be accessed.
          example: Payment Pending
        payment_id:
          type: string
          description: Unique identifier for an in progress or completed payment for this Payment Link.
          example: 'pay_88cb4e671m1da22e9bbbyx'
        amount:
          type: integer
          description: The original payment amount.
          example: 100
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a> of the payment.<br>
          example: GBP
        reference:
          type: string
          description: Your reference for the payment.
          example: ORD-123A
        description:
          type: string
          description: A description of the payment.
          example: Payment for Gold Necklace
        customer:
          type: object
          description: The customer's details.
          properties:
            email:
              type: string
              format: email
              description: The email address for the customer.
              example: brucewayne@email.com
            name:
              type: string
              description: The customer's name.
              example: Bruce Wayne
        billing:
          type: object
          additionalProperties: false
          description: The billing details.
          required:
            - address
          properties:
            address:
              type: object
              description: The billing address.
              required:
                - country
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              type: object
              description: The customer's phone number.
              required:
                - number
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
        products:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesProducts'
        metadata:
          type: object
          description: Any additional information stored at the point of creation.
          additionalProperties: true
        success_url:
          type: string
          format: uri
          description: The provided URL your customer will be redirected to upon a successful payment.
          example: https://example.com/success
        cancel_url:
          type: string
          format: uri
          description: The provided URL your customer will be redirected to if the payment is cancelled.
          example: https://example.com/cancel
        failure_url:
          type: string
          format: uri
          description: The provided URL your customer will be redirected to upon a failed payment.
          example: https://example.com/failure
        amount_allocations:
          allOf:
            - $ref: '#/components/schemas/AmountAllocations'
    GetHostedPaymentsResponseLinks:
      type: object
      description: The links related to the Hosted Payments Page.
      minItems: 2
      required:
        - self
        - redirect
      properties:
        self:
          type: object
          allOf:
            - $ref: '#/components/schemas/Link'
          description: The URI of the Hosted Payments Page details.
        redirect:
          type: object
          description: The link to visit the Hosted Payments Page.
          allOf:
            - $ref: '#/components/schemas/Link'
        payment:
          type: object
          description: The URI of the in progress or completed payment for this Hosted Payments Page.
          allOf:
            - $ref: '#/components/schemas/Link'
        payment_actions:
          type: object
          description: The URI of the actions associated with the in progress or completed payment for this Hosted Payments Page.
          allOf:
            - $ref: '#/components/schemas/Link'
      example:
        self:
          href: 'https://{prefix}.api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM'
        redirect:
          href: 'https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM'
    GetHostedPaymentsResponseStatusExpired:
      type: object
      description: An expired Hosted Payments Page.
      allOf:
        - $ref: '#/components/schemas/GetHostedPaymentsResponse'
        - type: object
          properties:
            _links:
              allOf:
                - $ref: '#/components/schemas/GetHostedPaymentsResponseLinks'
    GetHostedPaymentsResponseStatusPaymentPending:
      type: object
      description: A Hosted Payments Page that can accept a payment from a customer.
      allOf:
        - $ref: '#/components/schemas/GetHostedPaymentsResponse'
        - type: object
          properties:
            _links:
              allOf:
                - $ref: '#/components/schemas/GetHostedPaymentsResponseLinks'
    GetHostedPaymentsResponseStatusPaymentReceived:
      type: object
      description: A Hosted Payments Page that has received a payment
      required:
        - payment_id
      allOf:
        - $ref: '#/components/schemas/GetHostedPaymentsResponse'
        - type: object
          properties:
            _links:
              required:
                - payment
                - payment_actions
              allOf:
                - $ref: '#/components/schemas/GetHostedPaymentsResponseLinks'
              example:
                self:
                  href: https://{prefix}.api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM
                redirect:
                  href: https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM
                payment:
                  href: https://{prefix}.api.sandbox.checkout.com/payments/pay_m3s3k65cfpl2hd2rv4by4vl4r4
                payment_actions:
                  href: https://{prefix}.api.sandbox.checkout.com/payments/pay_m3s3k65cfpl2hd2rv4by4vl4r4/actions
    HostedPaymentId:
      type: string
      pattern: '^hpp_[A-Za-z0-9_-]{12}$'
      description: The unique identifier for a Hosted Payments Page.
      maxLength: 16
      minLength: 16
    HostedPaymentsRequest:
      type: object
      required:
        - currency
        - billing
        - success_url
        - cancel_url
        - failure_url
      properties:
        amount:
          type: integer
          description: The payment amount. The exact format <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="_blank">depends on the currency</a>
          minimum: 0
          example: 1000
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a> of the payment
          example: GBP
          minLength: 3
          maxLength: 3
        payment_type:
          type: string
          description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order)
          enum:
            - Regular
            - Recurring
          default: Regular
        authorization_type:
          type: string
          description: The authorization type.
          enum:
            - Final
            - Estimated
          default: Final
          example: 'Estimated'
        payment_plan:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionPaymentPlanRecurring'
        payment_ip:
          deprecated: true
          description: The Customers IP address. Only IPv4 and IPv6 addresses are accepted.
          allOf:
            - $ref: '#/components/schemas/IPAddress'
        billing_descriptor:
          type: object
          description: An optional description that is displayed on the customer's statement identifying a purchase
          required:
            - name
            - city
          properties:
            name:
              type: string
              maxLength: 25
              description: A dynamic description of the change
            city:
              type: string
              minLength: 1
              maxLength: 13
              description: The city from which the charge originated
            reference:
              type: string
              maxLength: 50
              description: The reference shown on the statement. Required for payouts to bank accounts.
        reference:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesReference'
        description:
          type: string
          description: A description of the payment
          example: Payment for Gold Necklace
          maxLength: 100
        display_name:
          description: The merchant name to display to customers on the checkout page.
          type: string
          example: The Jewelry Shop
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: The processing channel to be used for the payment
          example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq'
        amount_allocations:
          allOf:
            - $ref: '#/components/schemas/AmountAllocations'
        customer:
          type: object
          description: The customer's details
          properties:
            email:
              type: string
              format: email
              description: The customer's email address.
              example: ali.farid@example.com
              maxLength: 255
            name:
              type: string
              description: | 
                The customer's name.
                
                This will only set the name for new customers.
              example: Ali Farid
              maxLength: 255
            phone:
              description: The customer's phone number.
              allOf:
                - $ref: '#/components/schemas/PaymentInterfacesPhoneNumber'
            summary:
              allOf:
                - $ref: '#/components/schemas/PaymentInterfacesCustomerSummary'
        shipping:
          type: object
          description: The address any products are being sent to.
          required:
            - address
          properties:
            address:
              type: object
              description: The customer's address to ship to.
              required:
                - country
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              type: object
              description: The customer's phone number
              required:
                - number
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
        billing:
          type: object
          additionalProperties: false
          description: The billing details
          required:
            - address
          properties:
            address:
              type: object
              description: The billing address
              required:
                - country
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              type: object
              description: The customer's phone number. This will override the phone number specified during tokenization
              required:
                - number
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
        recipient:
          $ref: '#/components/schemas/PaymentInterfacesRecipient'
        processing:
          $ref: '#/components/schemas/PaymentInterfacesProcessing'
        allow_payment_methods:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPaymentMethods'
          example: ["card", "applepay", "googlepay"]
          description: |
            Specifies which payment method options to present to the customer.
            
            The values in this field override any equivalent values in `disabled_payment_methods`.
      
            Some payment methods have additional field requirements. See the <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-a-hosted-page/manage-your-hosted-payments-page#Payment_method_field_requirements" target="_blank">documentation</a> for more information.
        disabled_payment_methods:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPaymentMethods'
          example: ["eps", "ideal", "knet"]
          description: |
            Specifies which payment method options to not present to the customer.
            
            If you specify the same payment method in this field and in `allow_payment_methods`, the `disabled_payment_methods` value will be overridden.
      
            Any payment method options not explicitly specified in this field will be presented to the customer by default.
        products:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesProducts'
        risk:
          description: Configures the risk assessment performed during payment processing.
          type: object
          properties:
            enabled:
              description: Specifies whether to perform a risk assessment.
              default: true
              example: false
              type: boolean
          required:
            - enabled
        customer_retry:
          description: |
            Configures the parameters for customer retries.
            
            A customer retry is a payment attempt performed by the customer on the checkout page. This differs from [authorization request retries](https://api-reference.checkout.com/#operation/requestAPaymentOrPayout!path=0/retry&t=request) performed in the back end by Checkout.com.
          type: object
          properties:
            max_attempts:
              description: The maximum number of customer retry attempts, excluding the initial payment attempt.
              example: 2
              default: 5
              minimum: 0
              maximum: 5
              type: integer
        sender:
          description: The sender of the payment.
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesSender'
        success_url:
          type: string
          format: uri
          description: For redirect payment methods, this overrides the default success redirect URL configured on your account
          example: https://example.com/payments/success
          maxLength: 255
        cancel_url:
          type: string
          format: uri
          description: The URL to which the customer should be directed if they cancel the payment
          example: https://example.com/payments/cancel
          maxLength: 255
        failure_url:
          type: string
          format: uri
          description: For redirect payment methods, this overrides the default failure redirect URL configured on your account
          example: https://example.com/payments/failure
          maxLength: 255
        metadata:
          type: object
          title: The Metadata Schema
          description: Allows you to store additional information about the transaction. This object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays.
          additionalProperties: true
        locale:
          type: string
          description: Creates a translated version of the page in the specified language
          enum:
            - ar
            - da-DK
            - de-DE
            - el
            - en-GB
            - es-ES
            - fi-FI
            - fil-PH
            - fr-FR
            - hi-IN
            - id-ID
            - it-IT
            - ja-JP
            - ms-MY
            - nb-NO
            - nl-NL
            - pt-PT
            - sv-SE
            - th-TH
            - vi-VN
            - zh-CN
            - zh-HK
            - zh-TW
          default: en-GB
        3ds:
          type: object
          description: Information required for 3D Secure payments
          properties:
            enabled:
              type: boolean
              description: Whether to process this payment as a 3D Secure payment
              default: false
              example: false
            attempt_n3d:
              type: boolean
              description: Applies only when `3ds.enabled` is set to `true`. Set to `true` to attempt the payment without 3DS when the issuer, card, or network doesn’t support 3DS.
              default: false
              example: false
            challenge_indicator:
              type: string
              description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge.
              enum:
                - no_preference
                - no_challenge_requested
                - challenge_requested
                - challenge_requested_mandate
              default: no_preference
            allow_upgrade:
              type: boolean
              default: true
              description: Whether to process this payment as 3D Secure if the authorization was soft declined because 3DS authentication is required.
            exemption:
              type: string
              enum:
                - low_value
                - secure_corporate_payment
                - trusted_listing
                - transaction_risk_assessment
                - 3ds_outage
                - sca_delegation
                - out_of_sca_scope
                - other
                - low_risk_program
                - recurring_operation
              description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://www.checkout.com/docs/payments/regulation-support/sca-compliance-guide#Possible_SCA_exemptions" target="_blank">SCA compliance guide</a>.
        capture:
          type: boolean
          description: Whether to capture the payment (if applicable).
          example: true
        capture_on:
          description: |
            A timestamp (ISO 8601 code) that determines when the payment should be captured.
            Providing this field will automatically set `capture` to true.
          allOf:
            - $ref: '#/components/schemas/Timestamp'
        instruction:     
          type: object
          description: Details about the payment instruction.
          properties:
            purpose:
              allOf:
                - $ref: '#/components/schemas/Purpose'
        payment_method_configuration:
          description: Configuration options for specific payment methods.
          type: object
          properties:
            applepay:
              description: Configuration options specific to Apple Pay payments.
              type: object
              properties:
                account_holder:
                  type: object
                  description: The account holder's details.
                  required:
                    - type
                  discriminator:
                    propertyName: type
                    mapping:
                      individual: '#/components/schemas/01_PaymentSessionRequest_AccountHolderIndividual'
                      corporate: '#/components/schemas/02_PaymentSessionRequest_AccountHolderCorporate'
                      government: '#/components/schemas/03_PaymentSessionRequest_AccountHolderGovernment'
                  properties:
                    type:
                      type: string
                      example: 'individual'
                store_payment_details:
                  $ref: '#/components/schemas/PaymentInterfacesStorePaymentDetails'
            card:
              description: Configuration options specific to card payments.
              type: object
              properties:
                store_payment_details:
                  description: |
                    Specifies whether you intend to store the cardholder's payment details.
      
                    If you set this field to `enabled` or `collect_consent`, you must:
      
                    - Have obtained consent from the cardholder to store their payment details
                    - Provide `customer.id` or `customer.email` in the request
      
                    You do not need to provide this field if `payment_type` is set to one of the following values:
      
                     - `Installment`
                     - `Recurring`
                     - `Unscheduled`
                  default: disabled
                  type: string
                  enum:
                    - disabled
                    - enabled
                    - collect_consent
                account_holder:
                  type: object
                  description: The account holder's details.
                  required:
                    - type
                  discriminator:
                    propertyName: type
                    mapping:
                      individual: '#/components/schemas/01_PaymentSessionRequest_AccountHolderIndividual'
                      corporate: '#/components/schemas/02_PaymentSessionRequest_AccountHolderCorporate'
                      government: '#/components/schemas/03_PaymentSessionRequest_AccountHolderGovernment'
                  properties:
                    type:
                      type: string
                      example: 'individual'
            googlepay:
              description: Configuration options specific to Google Pay payments.
              type: object
              properties:
                account_holder:
                  type: object
                  description: The account holder's details.
                  required:
                    - type
                  discriminator:
                    propertyName: type
                    mapping:
                      individual: '#/components/schemas/01_PaymentSessionRequest_AccountHolderIndividual'
                      corporate: '#/components/schemas/02_PaymentSessionRequest_AccountHolderCorporate'
                      government: '#/components/schemas/03_PaymentSessionRequest_AccountHolderGovernment'
                  properties:
                    type:
                      type: string
                      example: 'individual'
                store_payment_details:
                  $ref: '#/components/schemas/PaymentInterfacesStorePaymentDetails'
            stored_card:
              description: Configuration options specific to stored card payments.
              type: object
              properties:
                customer_id:
                  pattern: ^(cus)_(\w{26})$
                  description: |
                    The unique identifier for an existing [customer](https://api-reference.checkout.com/#tag/Customers). Enables the stored card payment method if the associated customer has one or more payment instruments stored.
      
                    This value takes precedence over `payment_method_configuration.stored_card.instrument_ids` when determining the stored cards to present to the customer.
                  type: string
                instrument_ids:
                  description: |
                    The unique identifiers for card Instruments. Enables stored card payment method if any one of them exists.
      
                    The first valid payment instrument in the list will be presented to the customer as the default option. Alternatively, you can explicitly specify a default payment instrument by providing its ID in the `payment_method_configuration.stored_card.default_instrument_id` field.
                  minItems: 1
                  maxItems: 10
                  type: array
                  items:
                    pattern: ^(src)_(\w{26})$
                    type: string
                default_instrument_id:
                  pattern: ^(src)_(\w{26})$
                  description: The unique identifier for the payment instrument to present to the customer as the default option.
                  type: string
    HostedPaymentsResponse:
      type: object
      required:
        - id
        - _links
      properties:
        id:
          example: 'hpp_xGQBg0AXl3cM'
          allOf:
            - $ref: '#/components/schemas/HostedPaymentId'
        reference:
          type: string
          description: A reference you can later use to identify this payment, such as an order number.
          example: ORD-5023-4E89
        warnings:
          type: array
          description: Related to the `allow_payment_methods` object in the request. Included in the response if an alternative payment method is passed through, but no card schemes are configured against the account.
          items:
            type: object
            properties:
              code:
                type: string
                description: The reason for the warning
                example: payment_method_unavailable
              description:
                type: string
                description: The description of the warning code
                example: The card was provided in the `allow_payment_methods` object, but no card schemes are configured.
              value:
                type: string
                description: Payment method for which the warning applies
                enum:
                  - card
                  - sofort
                  - ideal
                  - knet
                  - bancontact
                  - eps
                  - p24
                  - multibanco
        _links:
          type: object
          description: The links related to the hosted payment.
          readOnly: true
          properties:
            self:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: 'https://{prefix}.api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM'
            redirect:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: 'https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM'
      example:
        id: 'hpp_xGQBg0AXl3cM'
        reference: 'ORD-123A'
        _links:
          self:
            href: 'https://{prefix}.api.sandbox.checkout.com/hosted-payments/hpp_xGQBg0AXl3cM'
          redirect:
            href: 'https://pay.sandbox.checkout.com/page/hpp_xGQBg0AXl3cM'
    PaymentInterfacesCustomerSummary:
      type: object
      description: Summary of the customer's transaction history. <br> Used for risk assessment when `source.type` is `Tamara`
      properties:
        registration_date:
          type: string
          format: date
          description: The date the customer registered.
          example: "2023-05-01"
        first_transaction_date:
          type: string
          format: date
          description: The date of the customer's first transaction.
          example: "2023-07-01"
        last_payment_date:
          type: string
          format: date
          description: The date of the customer's last payment.
          example: "2023-08-01"
        total_order_count:
          type: integer
          description: The total number of orders made by the customer.
          example: 15
        last_payment_amount:
          type: number
          format: float
          description: The amount of the customer's last payment.
          example: 500
        is_premium_customer:
          type: boolean
          description: Specifies whether the customer is a premium customer.
          example: true
        is_returning_customer:
          type: boolean
          description: Specifies whether the customer is a returning customer.
          example: true
        lifetime_value:
          type: number
          format: float
          description: |
            The customer's lifetime value. This is the total monetary amount that the customer has ordered, in their local currency, excluding the following:
            
            - canceled orders
            - rejected payments
            - refunded payments
            - Tamara payments
      
            The lifetime value is an indicator of how valuable the relationship with the customer is to your company.
          example: 500
    PaymentInterfacesPaymentMethod:
      type: string
      allOf:
        - $ref: '#/components/schemas/PaymentInterfacesPaymentMethodEnum'
    PaymentInterfacesPaymentMethodEnum:
      type: string
      enum:
        - alipay_cn
        - alipay_hk
        - alma
        - applepay
        - bancontact
        - benefit
        - bizum
        - card
        - dana
        - eps
        - gcash
        - googlepay
        - ideal
        - kakaopay
        - klarna
        - knet
        - mbway
        - mobilepay
        - multibanco
        - octopus
        - p24
        - paynow
        - paypal
        - plaid
        - qpay
        - sepa
        - stcpay
        - stored_card
        - tabby
        - tamara
        - tng
        - truemoney
        - twint
        - vipps
        - wechatpay
    PaymentInterfacesPaymentMethods:
      type: array
      items:
        $ref: '#/components/schemas/PaymentInterfacesPaymentMethodEnum'
    PaymentInterfacesPhoneNumber:
      type: object
      description: A phone number
      properties:
        country_code:
          type: string
          description: The international <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">country calling code</a>.
          minLength: 1
          maxLength: 7
          example: '+1'
        number:
          type: string
          description: The phone number.
          minLength: 6
          maxLength: 25
          example: 415 555 2671
    PaymentInterfacesProcessing:
      type: object
      description: Use the processing object to influence or override the data sent during card processing
      properties:
        aft:
          type: boolean
          description: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions)
        discount_amount:
          type: number
          description: The discount amount applied to the transaction by the merchant.
          minimum: 0
          example: 0
        shipping_amount:
          type: number
          description: The total freight or shipping and handling charges for the transaction.
          minimum: 0
          example: 300
        tax_amount:
          type: number
          description: The customer's value-added tax registration number.
          minimum: 0
          example: 3000
        invoice_id:
          type: string
          description: Invoice ID number.
          maxLength: 127
        brand_name:
          type: string
          description: The label that overrides the business name in the PayPal account on the PayPal pages.
          maxLength: 127
        locale:
          type: string
          pattern: '^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}))?$'
          description: The language and region of the customer in ISO 639-2 language code; value consists of language-country.
          example: en-US
          maxLength: 10
          minLength: 2
        partner_customer_risk_data:
          type: object
          properties:
            key:
              type: string
              description: The key for the pair.
            value:
              type: string
              description: The value for the pair.
          description: An array of key-and-value pairs with merchant-specific data for the transaction.
        custom_payment_method_ids:
          type: array
          description: Promo codes - An array that can be used to define which of the configured payment options within a payment category (pay_later, pay_over_time, etc.) should be shown for this purchase.
          items:
            type: string
        airline_data:
          $ref: '#/components/schemas/PaymentInterfacesProcessingAirlineData'
        accommodation_data:
          $ref: '#/components/schemas/PaymentInterfacesProcessingAccommodationData'
        order_id:
          type: string
          description: The number provided by the cardholder. Purchase order or invoice number may be used.
          maxLength: 17
          example: '123456789'
        surcharge_amount:
          type: integer
          format: int64
          example: 200
          minimum: 0
          description: 'Surcharge amount applied to the transaction in minor units by the merchant.'
        duty_amount:
          type: number
          description: The total charges for any import/export duty included in the transaction.
          minimum: 0
          example: 0
        shipping_tax_amount:
          type: number
          description: The tax amount of the freight or shipping and handling charges for the transaction.
          minimum: 0
          example: 100
        affiliate_id:
          type: string
          pattern: ^[a-zA-Z0-9]{1,15}$
          description: |
            The unique identifier for Visa-registered ramp providers. 
      
            Must only contain alphanumeric characters.
      
            If you're a Visa-registered ramp provider operating with affiliates, this field is required.
          maxLength: 15
        affiliate_url:
          type: string
          description: |
            The affiliate URL.
      
            If you're a Visa-registered ramp provider operating with affiliates, this field is required.
          example: www.mycrypto.com
        purchase_country:
            type: string
            description: The purchase country of the customer. ISO 3166 alpha-2 purchase country.
        merchant_initiated_reason:
          type: string
          enum:
            - 'Delayed_charge'
            - 'Resubmission'
            - 'No_show'
            - 'Reauthorization'
          description: Indicates the reason for a merchant-initiated payment request.
        campaign_id:
          type: integer
          description: Unique number of the campaign this payment will be running in. Only required for Afterpay campaign invoices.
        original_order_amount:
          type: number
          minimum: 0
          description: The payment for a merchant's order may be split, and the original order price indicates the transaction amount of the entire order.
          example: 10
        receipt_id:
          type: string
          maxLength: 32
          description: Merchant receipt ID.
          example: '10'
        merchant_callback_url:
          type: string
          description: A URL which you can use to notify the customer that the order has been created.
        line_of_business:
          type: string
          description: |
            <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
            The line of business that the payment is associated with.
          example: Flights
        pan_preference:
          $ref: '#/components/schemas/PaymentInterfacesProcessingBase/properties/pan_preference'
        provision_network_token:
          $ref: '#/components/schemas/PaymentInterfacesProcessingBase/properties/provision_network_token'
        reconciliation_id:
          type: string
          description: Transaction identifier used to track a payment request
          example: "4123495123"
        aggregator:
          $ref: '#/components/schemas/PaymentInterfacesProcessingAggregator'
    PaymentInterfacesProcessingAccommodationData:
      type: array
      description: Contains information about the accommodation booked by the customer.
      items:
        title: Accommodation Data
        type: object
        properties:
          name:
            type: string
            description: For lodging, contains the lodging name that appears on the storefront/customer receipts. For cruise, contains the ship name booked for the cruise.
            example: The Sea View Hotel
          booking_reference:
            type: string
            description: A unique identifier for the booking.
            example: HOTEL123
          check_in_date:
            type: string
            format: date
            description: For lodging, contains the actual or scheduled date the guest checked-in. For cruise, contains the cruise departure date also known as sail date.
            example: '2023-06-20'
          check_out_date:
            type: string
            format: date
            description: For lodging, contains the actual or scheduled date the guest checked-out. For cruise, contains the cruise return date also known as sail end date.
            example: '2023-06-23'
          address:
            type: object
            description: The address details of the accommodation.
            properties:
              address_line1:
                type: string
                description: The first line of the address.
                example: 123 Beach Road
              zip:
                type: string
                description: The postal code for the address.
                example: '10001'
          state:
            type: string
            description: The state or province of the address country (ISO 3166-2 code of up to two alphanumeric characters).
            example: FL
          country:
            type: string
            description: The ISO country code of the address.
            example: USA
          city:
            type: string
            description: The address city.
            example: Los Angeles
          number_of_rooms:
            type: integer
            description: The total number of rooms booked for the accommodation.
            example: 2
          guests:
            type: array
            description: Contains information about the guests staying at the accommodation.
            items:
              type: object
              properties:
                first_name:
                  type: string
                  description: The first name of the guest.
                  example: Jane
                last_name:
                  type: string
                  description: The last name of the guest.
                  example: Doe
                date_of_birth:
                  type: string
                  format: date
                  description: The date of birth of the guest.
                  example: '1985-07-14'
          room:
            type: array
            description: Contains information about the rooms booked by the customer.
            items:
              type: object
              properties:
                rate:
                  type: string
                  description: For lodging, contains the nightly rate for one room. For cruise, contains the total cost of the cruise.
                  example: '70'
                number_of_nights_at_room_rate:
                  type: string
                  description: For lodging, contains the number of nights charged at the rate provided in the rate field. For cruise, contains the length of the cruise in days.
                  example: '3'
    PaymentInterfacesProcessingAggregator:
      type: object
      description: Contains information about the payment aggregator.
      title: Aggregator
      properties:
        sub_merchant_id:
          type: string
          description: ID that you assigned to the sub-entity.
          example: '9cf70789ba90123'
        aggregator_id_visa:
          type: string
          description: Visa identifier of the payment aggregator.
          example: '10012345'
        aggregator_id_mc:
          type: string
          description: Mastercard identifier of the payment aggregator.
          example: '00000123456'
    PaymentInterfacesProcessingAirlineData:
      type: array
      description: Contains information about the airline ticket and flights booked by the customer.
      items:
        title: Airline Data
        type: object
        properties:
          ticket:
            type: object
            description: Contains information about the airline ticket.
            properties:
              number:
                type: string
                description: The ticket's unique identifier.
                example: 045-21351455613
              issue_date:
                type: string
                format: date
                description: Date the airline ticket was issued.
                example: '2023-05-20'
              issuing_carrier_code:
                type: string
                description: Carrier code of the ticket issuer.
                example: AI
              travel_package_indicator:
                type: string
                description: C = Car rental reservation, A = Airline flight reservation, B = Both car rental and airline flight reservations included, N = Unknown.
                example: B
              travel_agency_name:
                type: string
                description: The name of the travel agency.
                example: World Tours
              travel_agency_code:
                type: string
                description: The unique identifier from IATA or ARC for the travel agency that issues the ticket.
                example: '01'
          passenger:
            oneOf:
              - type: array
                description: Array of passengers on the flight.
                title: Array of Passenger Data
                items:
                  $ref: '#/components/schemas/PaymentInterfacesProcessingAirlinePassengerData'
              - $ref: '#/components/schemas/PaymentInterfacesProcessingAirlinePassengerData'
            description: Contains information about the passenger(s) on the flight. PayPal requires a single object.
          flight_leg_details:
            type: array
            title: Flight Leg Details
            description: Contains information about the flight leg(s) booked by the customer.
            items:
              type: object
              properties:
                flight_number:
                  type: string
                  description: The flight identifier.
                  example: '101'
                carrier_code:
                  type: string
                  description: The IATA 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details.
                  example: BA
                class_of_travelling:
                  type: string
                  description: 'A one-letter travel class identifier. The following are common: F = First class, J = Business class, Y = Economy class, W = Premium economy.'
                  example: J
                departure_airport:
                  type: string
                  description: The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details.
                  example: LHR
                departure_date:
                  type: string
                  format: date
                  description: The date of the scheduled take off.
                  example: '2023-06-19'
                departure_time:
                  type: string
                  description: The time of the scheduled take off.
                  example: '15:30'
                arrival_airport:
                  type: string
                  description: The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
                  example: LAX
                stop_over_code:
                  type: string
                  description: A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not.
                  example: x
                fare_basis_code:
                  type: string
                  description: The fare basis code, alphanumeric.
                  example: SPRSVR
    PaymentInterfacesProcessingAirlinePassengerData:
      title: Single-Object Passenger Data
      type: object
      description: Contains information about a passenger on the flight.
      properties:
        first_name:
          type: string
          description: The passenger's first name.
          example: John
        last_name:
          type: string
          description: The passenger's last name.
          example: White
        date_of_birth:
          type: string
          format: date
          description: The passenger's date of birth.
          example: '1990-05-26'
        address:
          type: object
          description: Contains information about the passenger's address.
          properties:
            country:
              type: string
              description: The two-letter ISO country code of the passenger's country residence.
              example: US
    PaymentInterfacesProcessingBase:
      type: object
      description: Use the processing object to influence or override the data sent during card processing
      properties:
        pan_preference:
          type: string
          enum:
            - 'fpan'
            - 'dpan'
          description: |
            Specifies the preferred type of Primary Account Number (PAN) for the payment:
      
            * DPAN: Uses the Checkout.com Network Token.
            * FPAN: Uses the full card number.
      
            **Note**: This only works when `source.type` is any of:
              - `cards`
              - `instruments`
              - `tokens`
        provision_network_token:
          type: boolean
          description: Indicates whether to provision a network token for the payment.
          default: true
          example: true
    PaymentInterfacesProducts:
      type: array
      description: Contains details about the products in the order.
      minItems: 1
      maxItems: 1000
      items:
        type: object
        additionalProperties: false
        required:
          - name
          - quantity
          - price
        properties:
          reference:
            type: string
            description: The item reference or product stock keeping unit (SKU).
            maxLength: 255
          url:
            type: string
            maxLength: 1024
            description: Link to the line item's product page.
            example: https://example.com/products/gold-necklace
          name:
            description: The descriptive name of the line item.
            example: Gold Necklace
            maxLength: 255
            type: string
          quantity:
            type: integer
            description: The number of line items.
            minimum: 1
            example: 1
          price:
            type: integer
            description: |
              The price per item in minor units, including tax but excluding discounts. The exact format depends on the currency. See  <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="_blank">Calculating the amount</a>.
            minimum: 0
            example: 1000
    PaymentInterfacesRecipient:
      type: object
      description: Information about the recipient of the payment's funds. Applies to <a href="https://www.checkout.com/docs/payments/manage-payments/perform-an-account-funding-transaction">Account Funding Transactions</a>, and VISA or Mastercard <a href="https://www.checkout.com/docs/business-operations/ensure-regulatory-compliance/requirements-for-financial-institutions">domestic UK transactions processed by financial institutions</a>.
      properties:
        dob:
          format: date
          maxLength: 10
          example: 1985-05-15
          description: The recipient's date of birth, in the format `YYYY-MM-DD`.
          type: string
        account_number:
          maxLength: 34
          example: '5555554444'
          description: An identifier related to the primary recipient's account. For example, an IBAN, an internal account number, a phone number, or the first six and last four digits of the PAN.
          type: string
        address:
          description: The recipient's address.
          allOf:
            - $ref: '#/components/schemas/Address'
        first_name:
          maxLength: 50
          example: Jia
          description: The recipient's first name.
          type: string
        last_name:
          maxLength: 50
          example: Tsang
          description: The recipient's last name.
          type: string
    PaymentInterfacesReference:
      type: string
      maxLength: 50
      description: |
        A reference you can use to identify the payment. For example, an order number. 
          - For Amex payments, this must be at most 30 characters.
          - For Benefit payments, the reference must be a unique alphanumeric value.
          - For iDEAL payments, the reference is required and must be an alphanumeric value with a 35-character limit.
      example: ORD-123A
    PaymentInterfacesSender:
      type: object
      description: The sender type. If set to `instrument`, the sender information (name and address) will be retrieved from the payment instrument.
      discriminator:
        propertyName: type
        mapping:
          individual: '#/components/schemas/01_PaymentInterfacesIndividualSender'
          corporate: '#/components/schemas/02_PaymentInterfacesCorporateSender'
          instrument: '#/components/schemas/03_PaymentInterfacesInstrumentSender'
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - individual
            - corporate
            - instrument
          description: The type of sender
          example: instrument
        reference:
          type: string
          description: The sender's reference for the payment
          example: '8285282045818'
    01_PaymentInterfacesIndividualSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PaymentDetailsResponseSender'
      required:
        - type
        - first_name
        - last_name
      properties:
        first_name:
          type: string
          description: The sender's first name
          example: 'John'
          maxLength: 50
        last_name:
          type: string
          description: The sender's last name
          example: 'Jones'
          maxLength: 50
        dob:
          type: string
          format: date
          description: |
            This field is deprecated. Use `date_of_birth` instead.
            
            The sender's date of birth, in the format `yyyy-mm-dd`.
          maxLength: 10
          example: '1985-05-15'
          deprecated: true
        date_of_birth:
          type: string
          format: date
          description: The sender's date of birth, in the format `yyyy-mm-dd`. 
          maxLength: 10
          example: '1985-05-15'
        address:
          description: The sender's address
          allOf:
            - $ref: '#/components/schemas/Address'
        identification:
          type: object
          properties:
            type:
              type: string
              description: The type of identification used to identify the sender
              enum:
                - passport
                - driving_licence
                - national_id
              example: driving_licence
            number:
              type: string
              description: The identification number
              example: '1234'
            issuing_country:
              type: string
              description: The two-letter ISO country code of the country that issued the identification
              example: GT
    02_PaymentInterfacesCorporateSender:
      type: object
      description: Store a previously tokenized instrument.
      allOf:
        - $ref: '#/components/schemas/PaymentDetailsResponseSender'
      required:
        - type
        - company_name
      properties:
        company_name:
          type: string
          description: The corporate sender's company name.
        address:
          description: The sender's registered corporate address.
          allOf:
            - $ref: '#/components/schemas/Address'
    03_PaymentInterfacesInstrumentSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PaymentDetailsResponseSender'
      required:
        - type
    IddvAttemptId:
      type: string
      description: The unique identifier for the ID document verification attempt.
      pattern: ^datp_\w+$
      example: datp_tkoi5db4hryu5cei5vwoabraio
      readOnly: true
    IddvAttemptRequest:
      type: object
      required: [document_front]
      properties:
        document_front:
          type: string
          description: The image of the front of the document to upload.
          format: binary
        document_back:
          type: string
          description: The image of the back of the document to upload.
          format: binary
    IddvAttemptResponse:
      type: object
      required: [id, status, response_codes, _links]
      properties:
        id:
          type: string
          allOf:
            - $ref: '#/components/schemas/IddvAttemptId'
        status:
          type: string
          allOf:
            - $ref: '#/components/schemas/IddvAttemptStates'
        response_codes:
          type: array
          description: One or more [response codes](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Response_codes) that provide more information about the status.
          readOnly: true
          minItems: 0
          items:
            $ref: "#/components/schemas/IdvResponseCode"
        _links:
          $ref: "#/components/schemas/IdvSelfLink"
      allOf:
        - $ref: "#/components/schemas/DatedObject"
    IddvAttemptResponseList:
      type: object
      required: [total_count, skip, limit, _links, data]
      properties:
        total_count:
          type: integer
          description: The total number of attempts.
        skip:
          type: integer
          description: The number of attempts you want to skip, to help you view the relevant attempt. <br/>Example – There are 10 attempts. If you provide `6`, the first six attempts are skipped.
        limit:
          type: integer
          description: The maximum number of attempts you want returned. <br/>Example – There are 10 attempts. If you set `limit` to `5`, but skip the first six, four attempts are returned.
        data:
          type: array
          description: The details of the attempt.
          minItems: 0
          items:
            $ref: "#/components/schemas/IddvAttemptResponse"
        _links:
          $ref: "#/components/schemas/IdvSelfLink"
    IddvAttemptStates:
      type: string
      description: The [status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Attempt_statuses) of the ID document verification attempt.
      enum:
        - checks_in_progress
        - checks_inconclusive
        - completed
        - quality_checks_aborted
        - quality_checks_in_progress
        - terminated
    IddvIdDocumentVerification:
      type: object
      required:
        - id
      properties:
        id:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IddvIdDocumentVerificationId'
      allOf:
        - $ref: '#/components/schemas/DatedObject'
        - $ref: '#/components/schemas/IddvIdDocumentVerificationBase'
      
    IddvIdDocumentVerificationBase:
      type: object
      required:
        - applicant_id
        - user_journey_id
      properties:
        applicant_id:
          readOnly: false
          allOf:
            - $ref: "#/components/schemas/ApplicantId"
        user_journey_id:
          readOnly: false
          allOf:
            - $ref: "#/components/schemas/IdvUserJourneyId"
        declared_data:
          $ref: "#/components/schemas/IdvDeclaredData"
    IddvIdDocumentVerificationCreateBase:
      type: object
      required:
        - status
        - _links
        - applicant_id
        - response_codes
        
      properties:
        applicant_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/ApplicantId'
        user_journey_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/IdvUserJourneyId'
        status:
          $ref: '#/components/schemas/IddvVerificationStatuses'
        declared_data:
          $ref: '#/components/schemas/IdvDeclaredData'
        document:
          $ref: '#/components/schemas/IdvDocument'
        response_codes:
          $ref: '#/components/schemas/IdvResponseCodes'
        _links:
          $ref: '#/components/schemas/IdvIdentityVerificationLinks'
    IddvIdDocumentVerificationId:
      type: string
      description: The ID document verification's unique identifier.
      pattern: ^iddv_\w+$
      example: iddv_tkoi5db4hryu5cei5vwoabr7we
      readOnly: true
    IddvIdDocumentVerificationOutput:
      type: object
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/IddvIdDocumentVerificationId'
      allOf:
        - $ref: '#/components/schemas/DatedObject'
        - $ref: '#/components/schemas/IddvIdDocumentVerificationCreateBase'
    IddvVerificationStatuses:
      type: string
      description: The ID document [verification status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Check_statuses).
      enum:
        - created
        - quality_checks_in_progress
        - checks_in_progress
        - approved
        - declined
        - retry_required
        - inconclusive
    IdvActiveLink:
      type: object
      required:
        - verification_url
      properties:
        verification_url:
          description: The attempt URL.
          allOf:
            - $ref: '#/components/schemas/IdvHalLink'
    IdvApplicant:
      required: [id]
      properties:
        id:
          readOnly: true
          allOf:
            - $ref: "#/components/schemas/ApplicantId"
      allOf:
        - $ref: "#/components/schemas/DatedObject"
        - $ref: "#/components/schemas/IdvBaseApplicant"
        - $ref: "#/components/schemas/IdvApplicantLinks"
    IdvApplicantLink:
      type: object
      description: The URL to the applicant's profile.
      required: [applicant]
      properties:
        applicant:
          $ref: "#/components/schemas/IdvHalLink"
    IdvApplicantLinks:
      type: object
      required: [_links]
      properties:
        _links:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IdvSelfLink'
    IdvApplicantSessionInformation:
      title: ApplicantSessionInformation
      type: object
      description: The details of the attempt.
      properties:
        ip_address:
          type: string
          description: The applicant's IP address during the attempt.
          example: "123:456:789:00"
        selected_documents:
          description: The documents the applicant selected in order.
          type: array
          readOnly: true
          minItems: 0
          items:
            $ref: "#/components/schemas/IdvSelectedDocument"
    IdvAttemptAsset:
      type: object
      required:
        - type
        - _links
      properties:
        type:
          type: string
          description: The type of asset.
          enum:
            - face_image
            - face_video
            - document_front_image
            - document_back_image
            - document_front_video
            - document_back_video
            - document_signature_image
            - secondary_document_front_image
            - secondary_document_back_image
            - secondary_document_front_video
            - secondary_document_back_video
            - secondary_document_signature_image
        _links:
          type: object
          required:
            - asset_url
          properties:
            asset_url:
              allOf:
                - $ref: "#/components/schemas/IdvHalLink"
    IdvAttemptAssets:
      type: object
      required:
        - total_count
        - skip
        - limit
        - data
        - _links
      properties:
        total_count:
          type: integer
          description: The total number of assets.
        skip:
          type: integer
          description: The number of assets you want to skip. <br/>Example – There are 10 assets. If you provide `6`, the first six assets are skipped.
        limit:
          type: integer
          description: The maximum number of assets you want returned. <br/>Example – There are 10 assets. If you set `limit` to `5`, but skip the first six, four assets are returned.
        data:
          type: array
          description: The list of assets for the current page.
          minItems: 0
          items:
            $ref: "#/components/schemas/IdvAttemptAsset"
        _links:
          readOnly: true
          description: The details of links to the previous, current, and next resources.
          allOf:
            - $ref: "#/components/schemas/IdvSelfLink"
            - $ref: "#/components/schemas/IdvNextLink"
            - $ref: "#/components/schemas/IdvPreviousLink"
    IdvAttemptId:
      type: string
      description: The unique identifier for the attempt.
      pattern: ^iatp_\w+$
      example: iatp_tkoi5db4hryu5cei5vwoabraio
      readOnly: true
    IdvAttemptLinks:
      type: object
      allOf:
        - $ref: "#/components/schemas/IdvSelfLink"
        - $ref: "#/components/schemas/IdvActiveLink"
    IdvAttemptRequest:
      type: object
      required: [redirect_url]
      properties:
        redirect_url:
          type: string
          description: The URL to redirect the applicant to after the attempt.
          format: uri
        client_information:
          $ref: "#/components/schemas/IdvClientInformation"
    IdvAttemptResponse:
      type: object
      required: [redirect_url, id, status, created_on, modified_on, response_codes, applicant_session_information]
      properties:
        id:
          type: string
          allOf:
            - $ref: '#/components/schemas/IdvAttemptId'
        redirect_url:
          type: string
          description: The URL to redirect the applicant to after the attempt.
        status:
          type: string
          allOf:
            - $ref: '#/components/schemas/IdvAttemptStatuses'
        response_codes:
          type: array
          description: One or more [response codes](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Response_codes) that provide more information about the status.
          readOnly: true
          minItems: 0
          items:
            $ref: "#/components/schemas/IdvResponseCode"
        client_information:
          $ref: "#/components/schemas/IdvClientInformation"
        applicant_session_information:
          $ref: "#/components/schemas/IdvApplicantSessionInformation"
      allOf:
        - $ref: "#/components/schemas/DatedObject" 
    IdvAttemptResponseList:
      type: object
      required: [total_count, skip, limit, _links, data]
      properties:
        total_count:
          type: integer
          description: The total number of attempts.
        skip:
          type: integer
          description: The number of attempts you want to skip, to help you view the relevant attempt. <br/>Example – There are 10 attempts. If you provide `6`, the first six attempts are skipped.
        limit:
          type: integer
          description: The maximum number of attempts you want returned. <br/>Example – There are 10 attempts. If you set `limit` to `5`, but skip the first six, four attempts are returned.
        data:
          type: array
          description: The details of the attempt.
          minItems: 0
          items:
            $ref: "#/components/schemas/IdvAttemptResponse"
        _links:
          readOnly: true
          description: The details of links to the previous, current, and next resources.
          allOf:
            - $ref: "#/components/schemas/IdvSelfLink"
            - $ref: "#/components/schemas/IdvNextLink"
            - $ref: "#/components/schemas/IdvPreviousLink"
    IdvAttemptStatuses:
      type: string
      description: The [attempt status](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Attempt_statuses).
      readOnly: true
      enum:
        - capture_aborted
        - capture_in_progress
        - checks_inconclusive
        - checks_in_progress
        - completed
        - expired
        - pending_redirection
        - capture_refused
    IdvBaseApplicant:
      type: object
      properties:
        external_applicant_id:
          type: string
          description: Your reference for the applicant.
          pattern: ^ext_\w+$
          example: "ext_osdfdfdb4hryu5cei5vwoabrk5k"
        email:
          type: string
          description: The applicant's email address.
          format: email
          example: hannah.bret@example.com
        external_applicant_name:
          type: string
          description: The applicant's full name.
          maxLength: 255
          example: Hannah Bret
    IdvClientInformation:
      title: ClientInformation
      type: object
      description: The applicant's details.
      properties:
        pre_selected_residence_country:
          pattern: ^[A-Z]{2}
          description: The applicant's residence country. <br/>Standard – [ISO alpha-2 country code](/developer-resources/codes/country-codes) <br/>Example – `FR`
          example: FR
        pre_selected_language:
          type: string
          format: IETF BCP 47 language tag
          description: The language you want to use for the user interface. <br/>Format – IETF BCP 47 language tag
          example: en-US
    IdvCountryCode:
      type: string
      description: The applicant's nationality. <br/>Standard – [ISO alpha-2 country code](https://www.checkout.com/docs/developer-resources/testing/codes/country-codes) <br/>Example – `FR`
      format: ISO 3166-1 alpha-2
      pattern: ^[A-Za-z]{2}$
      example: US
    IdvDeclaredData:
      type: object
      description: The personal details provided by the applicant.
      required:
        - name
      properties:
        name:
          type: string
          description: The applicant's name.
          maxLength: 255
    IdvDocument:
      type: object
      description: The applicant's identity document details.
      required:
        - document_type
        - document_issuing_country
        - front_image_signed_url
      readOnly: true
      allOf:
        - $ref: '#/components/schemas/IdvIdentity'
        - properties:
            personal_number:
              type: string
              description: The applicant's personal number. This depends on the document type.
              maxLength: 255
            tax_identification_number:
              type: string
              description: The tax identification number (TIN) extracted from the document.
              maxLength: 255
            document_type:
              $ref: '#/components/schemas/IdvDocumentTypes'
            document_issuing_country:
              $ref: '#/components/schemas/IdvCountryCode'
            document_number:
              type: string
              description: The document number extracted from the document.
              maxLength: 255
            document_expiry_date:
              type: string
              description: The document expiry date extracted from the document.
              format: date
            document_issue_date:
              type: string
              description: The document issue date extracted from the document.
              format: date
            document_issue_place:
              type: string
              description: The document's place of issue extracted from the document.
              maxLength: 255
            document_mrz:
              type: string
              description: The machine-readable zone (MRZ) data extracted from the document.
              pattern: ^([A-Z0-9<]{2}[A-Z0-9<]{1,38}[\n\r])+([A-Z0-9<]{2}[A-Z0-9<]{1,44}[\n\r])?([A-Z0-9<]{2}[A-Z0-9<]{1,44}[\n\r])?$
            front_image_signed_url:
              $ref: '#/components/schemas/IdvPreSignedUrl'
            back_image_signed_url:
              $ref: '#/components/schemas/IdvPreSignedUrl'
            signature_image_signed_url:
              $ref: '#/components/schemas/IdvPreSignedUrl'
    IdvDocumentList:
      type: array
      description: The details of the applicant's identity documents.
      readOnly: true
      minItems: 0
      maxItems: 2
      items:
        $ref: '#/components/schemas/IdvDocument'
    IdvDocumentTypes:
      type: string
      description: The type of identity document.
      enum:
        - Driving licence
        - ID
        - Passport
        - Residence Permit
    IdvFace:
      type: object
      description: The details of the image of the applicant's face extracted from the video.
      required:
        - image_signed_url
      readOnly: true
      properties:
        image_signed_url:
          description: The URL to the face image.
          allOf:
            - $ref: '#/components/schemas/IdvPreSignedUrl'
    IdvGender:
      type: string
      description: The applicant's gender.
      enum:
        - M
        - F
    IdvHalLink:
      type: object
      description: The URL to the applicant profile resource.
      required:
        - href
      properties:
        href:
          type: string
          format: uri
    IdvIdentity:
      type: object
      description: The details of the applicant's verified identity.
      required:
        - full_name
        - birth_date
      readOnly: true
      properties:
        full_name:
          type: string
          description: The applicant's full name.
          minLength: 2
          maxLength: 510
          readOnly: true
        first_names:
          type: string
          description: The applicant's first names.
          minLength: 1
          maxLength: 255
          readOnly: true
        last_name:
          type: string
          description: The applicant's last name.
          minLength: 1
          maxLength: 255
          readOnly: true
        last_name_at_birth:
          type: string
          description: The applicant's last name at birth.
          minLength: 1
          maxLength: 255
          readOnly: true
        birth_date:
          type: string
          description: The applicant's birth date. <br/>Format `YYYY-MM-DD`
          format: date
          readOnly: true
        birth_place:
          type: string
          description: The applicant's birth place.
          minLength: 1
          maxLength: 255
          readOnly: true
        nationality:
          $ref: '#/components/schemas/IdvCountryCode'
        gender:
          $ref: '#/components/schemas/IdvGender'
    IdvIdentityVerification:
      type: object
      required:
        - id
      properties:
        id:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IdvIdentityVerificationId'
      allOf:
        - $ref: '#/components/schemas/DatedObject'
        - $ref: '#/components/schemas/IdvIdentityVerificationBase'
    IdvIdentityVerificationBase:
      type: object
      required:
        - applicant_id
        - declared_data
        - response_codes
        - risk_labels
        - status
        - _links
      properties:
        applicant_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/ApplicantId'
        user_journey_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/IdvUserJourneyId'
        status:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IdvVerificationStatuses'
        response_codes:
          $ref: '#/components/schemas/IdvResponseCodes'
        risk_labels:
          $ref: '#/components/schemas/IdvRiskLabels'
        verified_identity:
          $ref: '#/components/schemas/IdvVerifiedIdentity'
        declared_data:
          $ref: '#/components/schemas/IdvDeclaredData'
        documents:
          $ref: '#/components/schemas/IdvDocumentList'
        face:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IdvFace'
        _links:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/IdvIdentityVerificationLinks'
    IdvIdentityVerificationCreateBase:
      type: object
      required:
        - declared_data
        - response_codes
        - risk_labels
        - status
        - _links
        - applicant_id
      properties:
        applicant_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/ApplicantId'
        user_journey_id:
          readOnly: false
          allOf:
            - $ref: '#/components/schemas/IdvUserJourneyId'
        status:
          $ref: '#/components/schemas/IdvVerificationStatuses'
        declared_data:
          $ref: '#/components/schemas/IdvDeclaredData'
        documents:
          $ref: '#/components/schemas/IdvDocumentList'
        face:
          allOf:
            - $ref: '#/components/schemas/IdvFace'
          readOnly: true
        response_codes:
          $ref: '#/components/schemas/IdvResponseCodes'
        risk_labels:
          $ref: '#/components/schemas/IdvRiskLabels'
        verified_identity:
          $ref: '#/components/schemas/IdvVerifiedIdentity'
        _links:
          $ref: '#/components/schemas/IdvIdentityVerificationLinks'
    IdvIdentityVerificationError:
      type: object
      required:
        - error_type
        - error_codes
      properties:
        error_type:
          type: string
          description: The type of error.
          enum:
            - unprocessable_entity
            - request_invalid
        error_codes:
          type: array
          description: The error codes.
          items:
            type: string
    IdvIdentityVerificationHelper:
      type: object
      required: [id]
      properties:
        id:
          readOnly: true
          allOf:
            - $ref: "#/components/schemas/IdvIdentityVerificationId"
      allOf:
        - $ref: "#/components/schemas/DatedObject"
        - $ref: "#/components/schemas/IdvIdentityVerificationHelperBase"
        
    IdvIdentityVerificationHelperBase:
      type: object
      required:
        [declared_data, status, redirect_url, response_codes, risk_labels, _links]
      properties:
        user_journey_id:
          readOnly: false
          allOf:
            - $ref: "#/components/schemas/IdvUserJourneyId"
        applicant_id:
          readOnly: false
          allOf:
            - $ref: "#/components/schemas/ApplicantId"
        status:
          readOnly: true
          allOf:
            - $ref: "#/components/schemas/IdvVerificationStatuses"
        response_codes:
          type: array
          description: One or more [response codes](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Response_codes) that provide more information about the status.
          readOnly: true
          minItems: 0
          items:
            $ref: "#/components/schemas/IdvResponseCodes"
        risk_labels:
          $ref: '#/components/schemas/IdvRiskLabels'
        verified_identity:
          readOnly: true
          allOf:
            - $ref: "#/components/schemas/IdvIdentity"
        declared_data:
          $ref: "#/components/schemas/IdvDeclaredData"
        documents:
          type: array
          description: The details of the applicant's identity documents.
          readOnly: true
          minItems: 0
          maxItems: 2
          items:
            $ref: "#/components/schemas/IdvDocument"
        face:
          readOnly: true
          allOf:
            - $ref: "#/components/schemas/IdvFace"
        redirect_url:
          type: string
          description: The URL to redirect the applicant to after the attempt.
          format: uri
        _links:
          readOnly: true
          allOf:
            - $ref: "#/components/schemas/IdvIdentityVerificationHelperLinks"
    IdvIdentityVerificationHelperLinks:
      type: object
      description: The details of links related to the resource.
      allOf:
        - $ref: '#/components/schemas/IdvSelfLink'
        - $ref: '#/components/schemas/IdvActiveLink'
    IdvIdentityVerificationId:
      type: string
      description: The identity verification's unique identifier.
      pattern: ^idv_\w+$
      example: idv_tkoi5db4hryu5cei5vwoabr7we
      readOnly: true
    IdvIdentityVerificationLinks:
      type: object
      description: The details of links related to the resource.
      allOf:
        - $ref: '#/components/schemas/IdvSelfLink'
        - $ref: '#/components/schemas/IdvApplicantLink'
    IdvIdentityVerificationOutput:
      type: object
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/IdvIdentityVerificationId'
      allOf:
        - $ref: '#/components/schemas/DatedObject'
        - $ref: '#/components/schemas/IdvIdentityVerificationCreateBase'
    IdvNextLink:
      type: object
      required: [next]
      readOnly: true
      properties:
        next:
          $ref: "#/components/schemas/IdvHalLink"
    IdvPdf:
      type: object
      required:
        - signed_url
      readOnly: true
      properties:
        signed_url:
          $ref: '#/components/schemas/IdvPreSignedUrl'
    IdvPreSignedUrl:
      type: string
      format: uri
      description: The pre-signed URL to the captured image of the document.
      example: https://storage-b.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/live_face/bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921946714.png?response-content-type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163223Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=2b7d87fec4f11f0df949da7beade2519cf1a51ce70fe9cc1cf0470d73f5340e4
    IdvPreviousLink:
      type: object
      required: [previous]
      readOnly: true
      properties:
        previous:
          $ref: "#/components/schemas/IdvHalLink"
    IdvResponseCode:
      type: object
      description: The [response code](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Response_codes) that provides more information about the identity verification status.
      readOnly: true
      required:
        - code
        - summary
      properties:
        code:
          $ref: '#/components/schemas/IdvResponseCodeCode'
        summary:
          $ref: '#/components/schemas/IdvResponseCodeSummary'
    IdvResponseCodeCode:
      type: integer
      description: The [response code](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Response_codes).
      readOnly: true
      minimum: 10000
      maximum: 69999
    IdvResponseCodes:
      type: array
      description: One or more [response codes](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Response_codes) that provide more information about the status.
      readOnly: true
      minItems: 0
      items:
        $ref: '#/components/schemas/IdvResponseCode'
    IdvResponseCodeSummary:
      type: string
      description: The description of the [response code](https://www.checkout.com/docs/developer-resources/codes/identities-codes#Response_codes).
      readOnly: true
      example: 'document_front_not_captured'
    IdvRiskLabels:
      type: array
      description: One or more codes that provide more information about risks associated with the verification.
      readOnly: true
      minItems: 0
      items:
        type: string
    IdvSelectedDocument:
      type: object
      description: The details of the document the applicant selected.
      readOnly: true
      properties:
        country:
          $ref: "#/components/schemas/IdvCountryCode"
        document_type:
          $ref: "#/components/schemas/IdvDocumentTypes"
    IdvSelfLink:
      type: object
      description: The details of links related to the resource.
      required:
        - self
      readOnly: true
      properties:
        self:
          description: The URL to the resource.
          allOf:
            - $ref: '#/components/schemas/IdvHalLink'
    IdvUserJourneyId:
      type: string
      description: Your configuration ID.
      pattern: ^usj_[a-z2-7]{26}$
      example: usj_tkoi5db4hryu5cei5vwoabr7we
      readOnly: true
    IdvVerificationStatuses:
      type: string
      description: The [verification status](https://www.checkout.com/docs/developer-resources/codes/identities-codes).
      readOnly: true
      enum:
        - approved
        - capture_in_progress
        - checks_in_progress
        - declined
        - inconclusive
        - pending
        - refused
        - retry_required
    IdvVerifiedIdentity:
      description: The details of the applicant's verified identity.
      allOf:
        - $ref: '#/components/schemas/IdvIdentity'
      readOnly: true
    AccountHolder:
      type: object
      description: The bank account holder details. Having accurate and complete data improves payout performance (increases success rate and the prevents delays).
      discriminator:
        propertyName: type
        mapping:
          individual: '#/components/schemas/01_PayoutRequestIndividualAccountHolder'
          government: '#/components/schemas/03_PayoutRequestGovernmentAccountHolder'
          corporate: '#/components/schemas/02_PayoutRequestCorporateAccountHolder'
      properties:
        type:
          description: The type of the legal account holder.
          type: string
          enum:
            - individual
            - corporate
            - government
          example: individual
    AccountHolderAch:
      type: object
      description: The account holder details
      required:
        - type
        - first_name
        - last_name
      properties:
        type:
          description: The type of account holder
          type: string
          enum:
            - individual
            - corporate
            - government
          example: individual
      
        first_name:
          description: |
            The first name of the account holder
          type: string
          example: 'John'
      
        last_name:
          description: |
            The last name of the account holder
          type: string
          example: 'Smith'
      
        company_name:
          description: |
            The legal name of a registered company that holds the account
          type: string
          example: Test company
      
        billing_address:
          description: The account holder's billing address.
          allOf:
            - $ref: '#/components/schemas/Address'
      
        date_of_birth:
          type: string
          description: The account holder's date of birth.
      
        identification:
          type: object
          description: The account holder's government document identification. For example, the social security number (SSN).
          properties:
            type:
              type: string
              description: The document type
              example: SSN
            issuing_country:
              type: string
              description: The country where the document was issued
            number:
              type: string
              description: The document number
    AccountHolderEps:
      type: object
      description: The account holder details
      required:
        - first_name
        - last_name
      properties:
        first_name:
          description: The first name of the account holder
          type: string
          example: 'John'
        last_name:
          description: The last name of the account holder
          type: string
          example: 'Smith'
    AccountHolderIdentification:
      type: object
      description: Bank account holder's proof of identification
      properties:
        type:
          description: The type of identification used to identify the account holder
          type: string
          enum:
            - passport
            - driving_licence
            - national_id
            - company_registration
            - tax_id
          example: passport
        number:
          description: The identification number
          type: string
          example: '09876'
        issuing_country:
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the country that issued the identification
          type: string
          example: US
    AccountHolderResponse:
      type: object
      description: The account holder details
      properties:
        first_name:
          description: |
            The account holder's first name.
          type: string
          example: 'Hannah'
      
        last_name:
          description: |
            The account holder's last name.
          type: string
          example: 'Bret'
      
        billing_address:
          description: The account holder's billing address.
          allOf:
            - $ref: '#/components/schemas/Address'
      
        phone:
          description: The account holder's phone number.
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
    BankDetails:
      type: object
      description: Details of the bank
      properties:
        name:
          description: The bank's name
          type: string
          example: Lloyds TSB
          maxLength: 128
      
        branch:
          description: The bank branch's name
          type: string
          example: Bournemouth
          maxLength: 128
      
        address:
          allOf:
            - $ref: '#/components/schemas/Address'
          description: The bank's contact address
    NetworkToken:
      type: object
      description: Network token details
      required:
        - id
      properties:
        id:
          type: string
          pattern: "^(nt)_(\\w{26})$"
          description: The network token's unique identifier.
          example: 'nt_y3oqhf46pyzuxjbcn2giaqnb44'
        state:
          type: string
          description: The token status
          enum:
            - active
            - suspended
            - inactive
          example: active
    ProvisionNetworkToken:
      type: object
      description: Provision network token details
      properties:
        provision:
          description: Indicates whether a network token should be provisioned or not. If you do not pass the provision field, the default value will be set as false.
          type: boolean
          example: true
    RetrieveInstrumentCustomerResponse:
      type: object
      description: Stored customer details
      required:
        - id
      properties:
        id:
          type: string
          pattern: "^(cus)_(\\w{26})$"
          description: The customer's unique identifier. This can be passed as a source when making a payment.
          example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44'
        email:
          type: string
          description: The customer's email address
          example: 'brucewayne@gmail.com'
        name:
          type: string
          description: The customer's name
          example: 'Bruce Wayne'
        default:
          description: This will be true if this instrument is set as the default for the customer
          type: boolean
          example: true
    StoreAccountHolderTokenRequest:
      type: object
      description: The account holder details
      properties:
        first_name:
          description: |
            The first name of the account holder
          type: string
          example: 'John'
      
        last_name:
          description: |
            The last name of the account holder
          type: string
          example: 'Smith'
      
        billing_address:
          description: The billing address of the account holder
          allOf:
            - $ref: '#/components/schemas/Address'
      
        phone:
          description: The phone number of the account holder
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
    UpdateCardAccountHolder:
      type: object
      description: The account holder details
      properties:
        first_name:
          description: |
            The first name of the account holder
          type: string
          example: 'John'
      
        last_name:
          description: |
            The last name of the account holder
          type: string
          example: 'Smith'
      
        billing_address:
          description: The billing address of the account holder
          allOf:
            - $ref: '#/components/schemas/Address'
      
        phone:
          description: The phone number of the account holder
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
    RetrieveAchInstrumentResponse:
      type: object
      description: ach instrument response
      allOf:
        - $ref: '#/components/schemas/RetrieveInstrumentResponse'
      required:
        - type
        - id
        - fingerprint
        - created_on
        - modified_on
        - vault_id
        - instrument_data
        - account_holder
      properties:
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers.
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
        created_on:
          type: string
          format: date-time
          description: The date and time the instrument was created.
          example: '2021-01-01T00:00:00Z'
        modified_on:
          type: string
          format: date-time
          description: The date and time the instrument was last modified.
          example: '2021-01-01T00:00:00Z'
        vault_id:
          type: string
          description: The Vault ID currently attached to the instrument.
          example: 'vid_wmlfc3zyhqzehihu7giusaaawu' 
        instrument_data:
          type: object
          description: The details of the bank account
          required:
            - account_type
            - account_number
            - bank_code
            - currency
            - country
          properties:
            account_type:
              type: string
              description: The type of Direct Debit account
              enum:
                - savings
                - checking
              example: savings
            account_number:
              type: string
              description: The account number of the Direct Debit account
              minLength: 4
              maxLength: 17
              example: '4099999992'
            bank_code:
              type: string
              description: The bank code of the Direct Debit account
              minLength: 8
              maxLength: 9
              example: '211370545'
            currency:
              type: string
              description: The currency of the account 
              minLength: 3
              maxLength: 3
              example: "USD"
            country:
              type: string
              description: The country of the account
              minLength: 2
              maxLength: 2
              example: "US"
        account_holder:
          type: object
          description: >-
            The account holder details
          required:
            - first_name
            - last_name
            - company_name
            - type
          properties:
            first_name:
              type: string
              description: First name. Required for individual account holder type
              example: John
            last_name:
              type: string
              description: Last name. Required for individual account holder type
              example: Smith
            company_name:
              type: string
              description: Company name. Required for corporate account holder type
              example: Smith Enterprises
            type:
              type: string
              description: Account holder type
              enum:
                - individual
                - corporate
        customer:
          $ref: '#/components/schemas/RetrieveInstrumentCustomerResponse'
    RetrieveBankAccountInstrumentResponse:
      type: object
      description: Bank account details
      required:
        - type
        - id
        - fingerprint
        - country
        - currency
      properties:
        type:
          description: The type of instrument
          type: string
        id:
          description: The unique identifier of the payment source or destination that can be used later for payments
          type: string
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
      
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
      
        account_type:
          description: The type of account
          type: string
          enum:
            - savings
            - current
            - cash
          example: savings
      
        account_number:
          description: Number (which can contain letters) that identifies the account
          type: string
          example: '13654567455'
      
        bank_code:
          description: Code that identifies the bank
          type: string
          example: 123-456
      
        branch_code:
          description: Code that identifies the bank branch
          type: string
          example: '6443'
      
        iban:
          description: Internationally agreed standard for identifying bank account
          type: string
          example: HU93116000060000000012345676
      
        bban:
          description: The combination of bank code and/or branch code and account number
          type: string
          example: 3704 0044 0532 0130 00
      
        swift_bic:
          description: 8 or 11 character code which identifies the bank or bank branch
          type: string
          example: '37040044'
      
        currency:
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a> of the account's currency
          type: string
          example: GBP
      
        country:
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of where the account is based
          type: string
          example: GB
      
        account_holder:
          $ref: '#/components/schemas/AccountHolder'
      
        bank:
          $ref: '#/components/schemas/BankDetails'
      
        customer:
          $ref: '#/components/schemas/RetrieveInstrumentCustomerResponse'
    RetrieveCardInstrumentResponse:
      type: object
      description: card instrument response
      allOf:
        - $ref: '#/components/schemas/RetrieveInstrumentResponse'
      required:
        - fingerprint
        - expiry_month
        - expiry_year
        - last4
        - regulated_indicator
      properties:
        encrypted_card_number:
          type: string
          description: The JWE-encrypted full card number. This is only present if your level of PCI compliance is SAQ-D.
          example: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUz...'
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
        expiry_month:
          type: integer
          description: The expiry month
          minimum: 1
          example: 6
          maxLength: 2
        expiry_year:
          type: integer
          description: The expiry year
          example: 2025
          minLength: 4
          maxLength: 4
        name:
          type: string
          description: The name of the cardholder
          example: 'John Test'
        scheme:
          type: string
          description: The card scheme
          example: 'VISA'
        scheme_local:
          type: string
          description: The local co-branded card scheme
          enum:
            - cartes_bancaires
          example: 'cartes_bancaires'
        last4:
          type: string
          description: The last four digits of the card number
          example: '9996'
          minLength: 4
          maxLength: 4
        bin:
          type: string
          description: The card issuer's bank identification number (BIN)
          example: '454347'
        card_type:
          type: string
          description: The card type
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
          example: CREDIT
        card_category:
          type: string
          description: The card category
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        issuer:
          type: string
          description: The name of the card issuer
          example: 'GOTHAM STATE BANK'
        issuer_country:
          type: string
          maxLength: 2
          minLength: 2
          description: The card issuer's country (<a href="https://www.checkout.com/docs/resources/codes/country-codes" target="blank">two-letter ISO code</a>)
          example: 'US'
        product_id:
          type: string
          description: The issuer/card scheme product identifier
          example: 'F'
        product_type:
          type: string
          description: The issuer/card scheme product type
          example: CLASSIC
        customer:
          $ref: '#/components/schemas/RetrieveInstrumentCustomerResponse'
        account_holder:
          type: object
          description: The account holder details
          properties:
            first_name:
              description: The first name of the account holder
              type: string
              example: 'John'
            last_name:
              description: The last name of the account holder
              type: string
              example: 'Smith'
            billing_address:
              description: The billing address of the account holder
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              description: The phone number of the account holder
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
        network_token:
          $ref: '#/components/schemas/NetworkToken'
        card_wallet_type:
          type: string
          description: The type of digital wallet used for the card.
          enum:
            - googlepay
            - applepay
        regulated_indicator:
          type: boolean
          description: Indicates whether the instrument is regulated debit.
    RetrieveInstrumentResponse:
      type: object
      description: The response for type of instrument stored
      required:
        - type
        - id
      discriminator:
        propertyName: type
        mapping:
          bank_account: '#/components/schemas/RetrieveBankAccountInstrumentResponse'
          card: '#/components/schemas/RetrieveCardInstrumentResponse'
          sepa: '#/components/schemas/RetrieveSepaInstrumentResponse'
          ach: '#/components/schemas/RetrieveAchInstrumentResponse'
      properties:
        type:
          description: The underlying instrument type
          type: string
        id:
          description: The unique identifier of the payment source or destination that can be used later for payments
          type: string
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
    RetrieveSepaInstrumentResponse:
      type: object
      description: card instrument response
      allOf:
        - $ref: '#/components/schemas/RetrieveInstrumentResponse'
      required:
        - type
        - id
        - fingerprint
        - created_on
        - modified_on
        - vault_id
      properties:
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers.
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
        created_on:
          type: string
          format: date-time
          description: The date and time the instrument was created.
          example: '2021-01-01T00:00:00Z'
        modified_on:
          type: string
          format: date-time
          description: The date and time the instrument was last modified.
          example: '2021-01-01T00:00:00Z'
        vault_id:
          type: string
          description: The Vault ID currently attached to the instrument.
          example: 'vid_wmlfc3zyhqzehihu7giusaaawu' 
        instrument_data:
          type: object
          description: The details of the SEPA mandate.
          required:
            - country
            - account_number
            - currency
            - payment_type
            - mandate_id
            - date_of_signature
          properties:
            type: 
              type: string
              description: The type of mandate.
              enum:
                - Core
                - B2B
              example: "B2B"
            account_number:
              type: string
              description: The International Bank Account Number (IBAN) of the account.
              example: 'FR2810096000509685512959O86'
              maxLength: 34
              minLength: 15
            country:
              type: string
              description: The country of the account.
              example: 'GB'
              maxLength: 2
              minLength: 2
            currency:
              type: string
              description: The currency of the account.
              example: 'GBP'
              maxLength: 3
              minLength: 3
            payment_type:
              type: string
              description: The type of payment.
              example: 'recurring'
              enum:
                - recurring
                - regular
            mandate_id:
              type: string
              description: |
                The mandate ID.
      
                If this value was not provided when the instrument was created, it may take up to five seconds for the generated mandate ID to be available.
              example: '1234567890'
              maxLength: 35
              minLength: 1
            date_of_signature:
              type: string
              format: date
              description: | 
                The date the mandate was signed.
      
                If `mandate_id` was not provided when the instrument was created, it may take up to five seconds for the generated date of signature to be available.
              example: '2021-01-01'
              maxLength: 10
              minLength: 10
        account_holder:
          type: object
          description: The account holder's details.
          required:
            - first_name
            - last_name
            - billing_address
          properties:
            first_name:
              description: The first name of the account holder.
              type: string
              example: 'Hannah'
            last_name:
              description: The last name of the account holder.
              type: string
              example: 'Bret'
            billing_address:
              type: object
              description: The billing address of the account holder.
              required:
                - address_line1
                - address_line2
                - city
                - zip
                - country
              properties:
                address_line1:
                  description: The first line of the address.
                  type: string
                  example: '123 High St.'
                address_line2:
                  description: The second line of the address.
                  type: string
                  example: 'Flat 456'
                city:
                  description: The address city.
                  type: string
                  example: 'London'
                zip:
                  description: The address ZIP or postal code.
                  type: string
                  example: 'SW1A 1AA'
                country:
                  description: The address country.
                  type: string
                  example: 'GB'
                  maxLength: 2
                  minLength: 2
            company_name:
              type: string
              description: The legal name of a registered company that holds the account.
              maxLength: 50
            type:
              type: string
              description: The type of account holder.
              example: 'corporate'
              enum:
                - individual
                - corporate          
        customer:
          $ref: '#/components/schemas/RetrieveInstrumentCustomerResponse'
               
    StoreAchInstrumentRequest:
      type: object
      description: Store bank account details
      required:
        - instrument_data
        - account_holder
      properties:
        type:
          description: The type of instrument. `ach` payment instruments.
          allOf:
            - $ref: '#/components/schemas/StoreInstrumentRequestType'
            - type: string
              enum:
                - ach
        instrument_data:
          type: object
          description: The details of the bank account
          required:
            - account_type
            - account_number
            - bank_code
            - currency
            - country
          properties:
            account_type:
              type: string
              description: The type of Direct Debit account
              enum:
                - savings
                - checking
              example: savings
            account_number:
              type: string
              description: The account number of the Direct Debit account
              minLength: 4
              maxLength: 17
              example: '4099999992'
            bank_code:
              type: string
              description: The bank code of the Direct Debit account
              minLength: 8
              maxLength: 9
              example: '211370545'
            currency:
              type: string
              description: The currency of the account 
              minLength: 3
              maxLength: 3
              example: "USD"
            country:
              type: string
              description: The country of the account
              minLength: 2
              maxLength: 2
              example: "US"
        account_holder:
          type: object
          description: >-
            The account holder details
          required:
            - first_name
            - last_name
            - company_name
            - type
          properties:
            first_name:
              type: string
              description: First name. Required for individual account holder type
              example: John
            last_name:
              type: string
              description: Last name. Required for individual account holder type
              example: Smith
            company_name:
              type: string
              description: Company name. Required for corporate account holder type
              example: Smith Enterprises
            type:
              type: string
              description: Account holder type
              enum:
                - individual
                - corporate
        customer:
          $ref: '#/components/schemas/StoreCustomerInstrumentRequest'
    StoreAchInstrumentResponse:
      type: object
      description: Store bank account instrument response
      allOf:
        - $ref: '#/components/schemas/StoreInstrumentResponse'
      required:
        - type
        - id
        - fingerprint
      properties:
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
    StoreBankAccountInstrumentRequest:
      type: object
      description: Store bank account details
      required:
        - currency
        - country
      properties:
        type:
          description: The type of instrument. `bank_account` payment instruments only support payouts.
          allOf:
            - $ref: '#/components/schemas/StoreInstrumentRequestType'
            - type: string
              enum:
                - bank_account
        account_type:
          description: The type of account
          type: string
          enum:
            - savings
            - current
            - cash
          example: savings
        account_number:
          description: Number (which can contain letters) that identifies the account
          type: string
          example: '13654567455'
        bank_code:
          description: Code that identifies the bank
          type: string
          example: 123-456
        branch_code:
          description: Code that identifies the bank branch
          type: string
          example: '6443'
        iban:
          description: Internationally agreed standard for identifying bank account
          type: string
          example: HU93116000060000000012345676
        bban:
          description: The combination of bank code and/or branch code and account number
          type: string
          example: 3704 0044 0532 0130 00
        swift_bic:
          description: 8 or 11 character code which identifies the bank or bank branch
          type: string
          example: '37040044'
        currency:
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a> of the account's currency
          type: string
          example: GBP
        country:
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of where the account is based
          type: string
          example: GB
        processing_channel_id:
          description: The ID of the primary processing channel this instrument is intended to be used for
          type: string
          example: pc_u2l6xz5joigedmk7g5vxzt7rqy
        account_holder:
          $ref: '#/components/schemas/AccountHolder'
        bank:
          $ref: '#/components/schemas/BankDetails'
        customer:
          $ref: '#/components/schemas/StoreCustomerInstrumentRequest'
    StoreBankAccountInstrumentResponse:
      type: object
      description: Store bank account instrument response
      allOf:
        - $ref: '#/components/schemas/StoreInstrumentResponse'
      required:
        - fingerprint
      properties:
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
        customer:
          $ref: '#/components/schemas/CustomerResponse'
        bank:
          $ref: '#/components/schemas/BankDetails'
        swift_bic:
          description: 8 or 11 character code which identifies the bank or bank branch
          type: string
          example: '37040044'
        account_number:
          description: Number (which can contain letters) that identifies the account
          type: string
          example: '13654567455'
        bank_code:
          description: Code that identifies the bank
          type: string
          example: 123-456
        iban:
          description: Internationally agreed standard for identifying bank account
          type: string
          example: HU93116000060000000012345676
    StoreCardInstrumentRequest:
      type: object
      description: Details of the token to store.
      required:
        - number
        - expiry_month
        - expiry_year
      properties:
        type:
          description: The type of instrument.
          allOf:
            - $ref: '#/components/schemas/StoreInstrumentRequestType'
            - type: string
              enum:
                - card
        number:
          type: string
          description: The card number.
          format: pan
          pattern: ^[0-9]{16}$
          minLength: 16
          maxLength: 16
          example: '4242424242424242'
      
        expiry_month:
          type: integer
          format: int32
          description: The card's expiration month.
          minimum: 1
          maximum: 12
          example: 5
      
        expiry_year:
          type: integer
          format: int32
          description: The card's expiration year.
          example: 2025
          maxLength: 4
          minLength: 4
      
        name:
          description: |
            The cardholder's name.
          type: string
          example: 'Mr. J Smith'
      
        account_holder:
          $ref: '#/components/schemas/StoreAccountHolderTokenRequest'
      
        customer:
          $ref: '#/components/schemas/StoreCustomerInstrumentRequest'
      
        entity_id:
          type: string
          description: |
            The client entity, used for billing purposes. 
            
            If you do not provide an `entity_id`, you must provide a `processing_channel_id` instead.
          example: 'ent_wxglze3wwywujg4nna5fb7ldli'
      
        processing_channel_id:
          type: string
          description: |
            The processing channel, used for billing purposes. 
            
            If you do not provide a `processing_channel_id`, you must provide an `entity_id`  instead.
          example: 'pc_u2l6xz5joigedmk7g5vxzt7rqy'
      
        network_token:
          $ref: '#/components/schemas/ProvisionNetworkToken'
    StoreCustomerInstrumentRequest:
      type: object
      description: The customer's details
      properties:
        id:
          type: string
          pattern: "^(cus)_(\\w{26})$"
          description: The identifier of an existing customer
          example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44'
        email:
          type: string
          format: email
          description: An optional email address to associate with the customer
          maxLength: 255
          example: 'brucewayne@gmail.com'
        name:
          type: string
          description: The customer's name. This will only set the name for *new* customers.
          maxLength: 255
          example: 'Bruce Wayne'
        phone:
          description: The customer's phone number. This will only set the phone number for *new* customers.
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        default:
          type: boolean
          description: If true, this instrument will become the default for the customer. If a *new* customer is created as a result of this request, the instrument will automatically be the default.
          example: true
    StoreInstrumentRequest:
      type: object
      description: The type of instrument to be stored
      discriminator:
        propertyName: type
        mapping:
          bank_account: '#/components/schemas/StoreBankAccountInstrumentRequest'
          card: '#/components/schemas/StoreCardInstrumentRequest'
          token: '#/components/schemas/StoreTokenInstrumentRequest'
          sepa: '#/components/schemas/StoreSepaInstrumentRequest'
          ach: '#/components/schemas/StoreAchInstrumentRequest'
      oneOf:
        - $ref: '#/components/schemas/StoreBankAccountInstrumentRequest'
        - $ref: '#/components/schemas/StoreCardInstrumentRequest'
        - $ref: '#/components/schemas/StoreTokenInstrumentRequest'
        - $ref: '#/components/schemas/StoreSepaInstrumentRequest'
        - $ref: '#/components/schemas/StoreAchInstrumentRequest'
      required:
        - type
      properties:
        type:
          type: string
          description: The type of instrument
    StoreInstrumentRequestType:
      type: string
      description: Ordered list of store instrument request types used for discriminators
      enum:
        - bank_account
        - card
        - token
        - sepa
        - ach
    StoreInstrumentResponse:
      type: object
      description: The response for type of instrument stored
      required:
        - type
        - id
      discriminator:
        propertyName: type
        mapping:
          bank_account: '#/components/schemas/StoreBankAccountInstrumentResponse'
          card: '#/components/schemas/StoreTokenInstrumentResponse'
          sepa: '#/components/schemas/StoreSepaInstrumentResponse'
          ach: '#/components/schemas/StoreAchInstrumentResponse'
      properties:
        type:
          description: The type of instrument
          type: string
        id:
          description: The unique identifier of the payment source or destination that can be used later for payments
          type: string
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
    StoreSepaInstrumentRequest:
      type: object
      description: Store bank account details
      required:
        - instrument_data
        - account_holder
      properties:
        type:
          description: The type of instrument. `sepa` payment instruments.
          allOf:
            - $ref: '#/components/schemas/StoreInstrumentRequestType'
            - type: string
              enum:
                - sepa
      
        instrument_data:
          type: object
          description: The details of the mandate
          required:
            - country
            - account_number
            - currency
            - payment_type
          properties:
            type: 
              type: string
              description: The type of mandate.
              enum:
                - Core
                - B2B
              example: "B2B"
            account_number:
              type: string
              description: The International Bank Account Number (IBAN) of the account.
              example: 'FR2810096000509685512959O86'
              maxLength: 34
              minLength: 15
      
            country:
              type: string
              description: The country of the account.
              example: 'GB'
              maxLength: 2
              minLength: 2
      
            currency:
              type: string
              description: The currency of the account.
              example: 'GBP'
              maxLength: 3
              minLength: 3
      
            payment_type:
              type: string
              description: The type of payment. `recurring` or `regular`.
              example: 'recurring'
              enum:
                - recurring
                - regular
            
            mandate_id:
              type: string
              description: The mandate ID. If a mandate ID is not provided, a new, random mandate ID will be generated.
              example: '1234567890'
              maxLength: 35
              minLength: 1
            
            date_of_signature:
              type: string
              format: date
              description: | 
                The date on which the mandate was signed, in the format 'yyyy-MM-dd'.
                Required if `mandate_id` is provided.
                Ignored and set as the current date if `mandate_id` is not provided. 
              example: '2020-01-01'
      
        account_holder:
          type: object
          description: The account holder details
          required:
            - first_name
            - last_name
            - billing_address
          properties:
            first_name:
              description: |
                The first name of the account holder
              type: string
              example: 'John'
      
            last_name:
              description: |
                The last name of the account holder
              type: string
              example: 'Smith'
      
            billing_address:
              description: The billing address of the account holder
              type: object
              required:
                - address_line1
                - address_line2
                - city
                - zip
                - country
              properties:
                address_line1:
                  type: string
                  description: The first line of the address.
                  maxLength: 200
                  example: Cloverfield St.
                address_line2:
                  type: string
                  description: The street number. If no number, pass "w/n".
                  maxLength: 10
                  example: 23A
                city:
                  type: string
                  description: The address city.
                  maxLength: 35
                  example: London
                zip:
                  type: string
                  description: The address zip/postal code.
                  maxLength: 16
                  example: SW1A 1AA
                country:
                  type: string
                  description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the address.
                  example: GB
                  maxLength: 2
                  minLength: 2
            company_name:
              type: string
              description: The legal name of a registered company that holds the account.
              maxLength: 50
            type:
              type: string
              description: The type of account holder.
              example: 'corporate'
              enum:
                - individual
                - corporate
        customer:
          $ref: '#/components/schemas/StoreCustomerInstrumentRequest'
    StoreSepaInstrumentResponse:
      type: object
      description: Store bank account instrument response
      allOf:
        - $ref: '#/components/schemas/StoreInstrumentResponse'
      required:
        - type
        - id
        - fingerprint
      properties:
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
    StoreTokenInstrumentRequest:
      type: object
      description: Store token details
      required:
        - type
        - token
      properties:
        type:
          description: The type of instrument
          allOf:
            - $ref: '#/components/schemas/StoreInstrumentRequestType'
            - type: string
              enum:
                - token
        token:
          type: string
          description: The Checkout.com token
          pattern: ^(tok)_(\w{26})$|^(card_tok)_(\w{12})$
          example: tok_asoto22g2fsu7prwomy12sgfsa
      
        account_holder:
          $ref: '#/components/schemas/StoreAccountHolderTokenRequest'
      
        customer:
          $ref: '#/components/schemas/StoreCustomerInstrumentRequest'
    StoreTokenInstrumentResponse:
      type: object
      description: card instrument response
      allOf:
        - $ref: '#/components/schemas/StoreInstrumentResponse'
      required:
        - fingerprint
        - expiry_month
        - expiry_year
        - last4
        - bin
      properties:
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
        expiry_month:
          type: integer
          description: The expiry month
          minimum: 1
          example: 6
          maxLength: 2
        expiry_year:
          type: integer
          description: The expiry year
          example: 2025
          minLength: 4
          maxLength: 4
        scheme:
          type: string
          description: The card scheme
          example: 'VISA'
        scheme_local:
          type: string
          description: The local co-branded card scheme
          enum:
            - cartes_bancaires
          example: 'cartes_bancaires'
        last4:
          type: string
          description: The last four digits of the card number
          example: '9996'
          minLength: 4
          maxLength: 4
        bin:
          type: string
          description: The card issuer's bank identification number (BIN)
          example: '454347'
        card_type:
          type: string
          description: The card type
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
          example: CREDIT
        card_category:
          type: string
          description: The card category
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        issuer:
          type: string
          description: The name of the card issuer
          example: 'GOTHAM STATE BANK'
        issuer_country:
          type: string
          maxLength: 2
          minLength: 2
          description: The card issuer's country (<a href="https://www.checkout.com/docs/resources/codes/country-codes" target="blank">two-letter ISO code</a>)
          example: 'US'
        product_id:
          type: string
          description: The issuer/card scheme product identifier
          example: 'F'
        product_type:
          type: string
          description: The issuer/card scheme product type
          example: CLASSIC
        account_holder:
          $ref: '#/components/schemas/AccountHolderResponse'
        customer:
          $ref: '#/components/schemas/CustomerResponse'
        network_token:
          $ref: '#/components/schemas/NetworkToken'
    UpdateAchInstrumentRequest:
      type: object
      description: Update bank account details
      allOf:
        - $ref: '#/components/schemas/UpdateInstrumentRequest'
        - type: object
      properties:
        type:
          description: The type of instrument. `ach` payment instruments.
          type: string
      
        instrument_data:
          type: object
          description: The details of the bank account
          properties:
            account_type:
              type: string
              description: The type of Direct Debit account
              enum:
                - savings
                - checking
              example: savings
            account_number:
              type: string
              description: The account number of the Direct Debit account
              minLength: 4
              maxLength: 17
              example: '4099999992'
            bank_code:
              type: string
              description: The bank code of the Direct Debit account
              minLength: 8
              maxLength: 9
              example: '211370545'
            currency:
              type: string
              description: The currency of the account 
              minLength: 3
              maxLength: 3
              example: "USD"
            country:
              type: string
              description: The country of the account
              minLength: 2
              maxLength: 2
              example: "US"
        account_holder:
          type: object
          description: >-
            The account holder details
          required:
            - first_name
            - last_name
            - company_name
            - type
          properties:
            first_name:
              type: string
              description: First name. Required for individual account holder type
              example: John
            last_name:
              type: string
              description: Last name. Required for individual account holder type
              example: Smith
            company_name:
              type: string
              description: Company name. Required for corporate account holder type
              example: Smith Enterprises
            type:
              type: string
              description: Account holder type
              enum:
                - individual
                - corporate
    UpdateAchInstrumentResponse:
      type: object
      description: Update bank account instrument response
      allOf:
        - $ref: '#/components/schemas/UpdateInstrumentResponse'
      required:
        - type
        - id
        - fingerprint
      properties:
        type:
          description: The underlying instrument type. For instruments created from Checkout.com tokens, this will reflect the type of instrument that was tokenized.  
          type: string
          example: 'ach'
        id:
          description: The unique identifier of the payment source or destination that can be used later for payments
          type: string
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
    UpdateBankInstrumentRequest:
      type: object
      description: Update bank account details
      allOf:
        - $ref: '#/components/schemas/UpdateInstrumentRequest'
        - type: object
      properties:
        type:
          description: The type of instrument. `bank_account` payment instruments.
          type: string
      
        account_type:
          description: The type of account
          type: string
          enum:
            - savings
            - current
            - cash
          example: savings
      
        account_number:
          description: Number (which can contain letters) that identifies the account
          type: string
          example: '13654567455'
      
        bank_code:
          description: Code that identifies the bank
          type: string
          example: 123-456
      
        branch_code:
          description: Code that identifies the bank branch
          type: string
          example: '6443'
      
        iban:
          description: Internationally agreed standard for identifying bank account
          type: string
          example: HU93116000060000000012345676
      
        bban:
          description: The combination of bank code and/or branch code and account number
          type: string
          example: 3704 0044 0532 0130 00
      
        swift_bic:
          description: 8 or 11 character code which identifies the bank or bank branch
          type: string
          example: '37040044'
      
        currency:
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a> of the account's currency
          type: string
          example: GBP
      
        country:
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of where the account is based
          type: string
          example: GB
      
        processing_channel_id:
          description: The ID of the primary processing channel this instrument is intended to be used for
          type: string
          example: pc_u2l6xz5joigedmk7g5vxzt7rqy
      
        account_holder:
          $ref: '#/components/schemas/AccountHolder'
      
        bank:
          $ref: '#/components/schemas/BankDetails'
      
        customer:
          $ref: '#/components/schemas/UpdateCustomerRequest'
    UpdateBankInstrumentResponse:
      type: object
      description: The response for type of instrument stored
      required:
        - type
        - fingerprint
      discriminator:
        propertyName: type
        mapping:
          bank_account: '#/components/schemas/UpdateBankInstrumentResponse'
      properties:
        type:
          description: The type of instrument
          type: string
        fingerprint:
          description: A token that can uniquely identify this instrument across all customers
          pattern: '^([a-z0-9]{26})$'
          type: string
          example: 'smoua2sbuqhupeofwbe77n5nsm'
    UpdateCardInstrumentRequest:
      type: object
      description: Update bank account details
      allOf:
        - $ref: '#/components/schemas/UpdateInstrumentRequest'
        - type: object
      properties:
        type:
          description: The type of instrument. `card` payment instruments.
          type: string
      
        expiry_month:
          type: integer
          description: The expiry month of the card
          minimum: 1
          example: 6
          minLength: 1
          maxLength: 2
      
        expiry_year:
          type: integer
          description: The expiry year of the card
          example: 2025
          minLength: 4
          maxLength: 4
      
        name:
          description: |
            Name of the cardholder
          type: string
          example: 'Mr. J Smith'
      
        account_holder:
          $ref: '#/components/schemas/UpdateCardAccountHolder'
      
        customer:
          $ref: '#/components/schemas/UpdateCustomerRequest'
    UpdateCardInstrumentResponse:
      type: object
      description: The response for type of instrument stored
      required:
        - type
        - fingerprint
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/UpdateCardInstrumentResponse'
      properties:
        type:
          description: The type of instrument
          type: string
        fingerprint:
          description: A token that can uniquely identify this instrument across all customers
          pattern: '^([a-z0-9]{26})$'
          type: string
          example: 'smoua2sbuqhupeofwbe77n5nsm'
    UpdateInstrumentRequest:
      type: object
      description: The type of instrument to be updated
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/UpdateCardInstrumentRequest'
          bank_account: '#/components/schemas/UpdateBankInstrumentRequest'
          sepa: '#/components/schemas/UpdateSepaInstrumentRequest'
          ach: '#/components/schemas/UpdateAchInstrumentRequest'
    UpdateInstrumentResponse:
      type: object
      description: The response for type of instrument stored
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/UpdateCardInstrumentResponse'
          bank_account: '#/components/schemas/UpdateBankInstrumentResponse'
          sepa: '#/components/schemas/UpdateSepaInstrumentResponse'
          ach: '#/components/schemas/UpdateAchInstrumentResponse'
    UpdateSepaInstrumentRequest:
      type: object
      description: Update bank account details
      allOf:
        - $ref: '#/components/schemas/UpdateInstrumentRequest'
        - type: object
      properties:
        type:
          description: The type of instrument. `sepa` payment instruments.
          type: string
      
        instrument_data:
          type: object
          description: The details of the mandate
          required:
            - country
            - account_number
            - currency
            - payment_type
          properties:
            type: 
              type: string
              description: The type of mandate.
              enum:
                - Core
                - B2B
              example: "B2B"
            account_number:
              type: string
              description: The International Bank Account Number (IBAN) of the account.
              example: 'FR2810096000509685512959O86'
              maxLength: 34
              minLength: 15
      
            country:
              type: string
              description: The country of the account.
              example: 'GB'
              maxLength: 2
              minLength: 2
      
            currency:
              type: string
              description: The currency of the account.
              example: 'GBP'
              maxLength: 3
              minLength: 3
      
            payment_type:
              type: string
              description: The type of payment. `recurring` or `regular`.
              example: 'recurring'
              enum:
                - recurring
                - regular
            
            mandate_id:
              type: string
              description: The mandate ID. If a mandate ID is not provided, a new, random mandate ID will be generated.
              example: '1234567890'
              maxLength: 35
              minLength: 1
            
            date_of_signature:
              type: string
              format: date
              description: | 
                The date on which the mandate was signed, in the format 'yyyy-MM-dd'.
                Required if `mandate_id` is provided.
                Ignored and set as the current date if `mandate_id` is not provided. 
              example: '2020-01-01'
      
        account_holder:
          type: object
          description: The account holder details
          required:
            - first_name
            - last_name
            - billing_address
          properties:
            first_name:
              description: |
                The first name of the account holder
              type: string
              example: 'John'
      
            last_name:
              description: |
                The last name of the account holder
              type: string
              example: 'Smith'
      
            billing_address:
              description: The billing address of the account holder
              type: object
              required:
                - address_line1
                - address_line2
                - city
                - zip
                - country
              properties:
                address_line1:
                  type: string
                  description: The first line of the address.
                  maxLength: 200
                  example: Cloverfield St.
                address_line2:
                  type: string
                  description: The street number. If no number, pass "w/n".
                  maxLength: 10
                  example: 23A
                city:
                  type: string
                  description: The address city.
                  maxLength: 50
                  example: London
                zip:
                  type: string
                  description: The address zip/postal code.
                  maxLength: 50
                  example: SW1A 1AA
                country:
                  type: string
                  description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the address.
                  example: GB
                  maxLength: 2
                  minLength: 2
            company_name:
              type: string
              description: The legal name of a registered company that holds the account.
              maxLength: 50
            type:
              type: string
              description: The type of account holder.
              example: 'corporate'
              enum:
                - individual
                - corporate    
    UpdateSepaInstrumentResponse:
      type: object
      description: Update bank account instrument response
      allOf:
        - $ref: '#/components/schemas/UpdateInstrumentResponse'
      required:
        - type
        - id
        - fingerprint
      properties:
        type:
          description: The underlying instrument type. For instruments created from Checkout.com tokens, this will reflect the type of instrument that was tokenized.  
          type: string
          example: 'sepa'
        id:
          description: The unique identifier of the payment source or destination that can be used later for payments
          type: string
          example: 'src_wmlfc3zyhqzehihu7giusaaawu'
        fingerprint:
          type: string
          description: A token that can uniquely identify this instrument across all customers
          pattern: ^([a-z0-9]{26})$
          example: vnsdrvikkvre3dtrjjvlm5du4q
    IPAddress:
      type: string
      format: ipv4
      maxLength: 45
      example: '90.197.169.245'
    add-cardholder-request:
      type: object
      description: The cardholder to create.
      discriminator:
        propertyName: type
        mapping:
          individual: '#/components/schemas/add-individual-cardholder-request'
      required:
        - type
        - entity_id
      properties:
        type:
          type: string
          description: The type of cardholder to create.
          example: individual
        reference:
          $ref: '#/components/schemas/IssuingReference'
        entity_id:
          $ref: '#/components/schemas/IssuingEntityId'
    add-cardholder-response:
      type: object
      required:
        - id
        - client_id
        - entity_id
        - type
        - status
        - _links
      properties:
        id:
          $ref: '#/components/schemas/IssuingCardholderId'
        client_id:
          $ref: '#/components/schemas/IssuingClientId'
        entity_id:
          $ref: '#/components/schemas/IssuingEntityId'
        type:
          type: string
          description: The cardholder's type.
          enum:
            - individual
        status:
          type: string
          description: The cardholder's status, after creation.
          enum:
            - active
            - pending
            - restricted
            - requirements_due
            - inactive
            - rejected
        reference:
          $ref: '#/components/schemas/IssuingReference'
        created_date:
          type: string
          format: date-time
        last_modified_date:
          type: string
          format: date-time
          example: "2019-09-10T10:11:12Z"
        _links:
          allOf:
            - $ref: '#/components/schemas/IssuingCardholderLinks'
    add-individual-cardholder-request:
      type: object
      required:
      - first_name
      - last_name
      - billing_address
      allOf:
      - $ref: '#/components/schemas/add-cardholder-request'
      - type: object
        properties:
          first_name:
            type: string
            description: The cardholder's first name.
            example: John
            minLength: 1
            maxLength: 40
          middle_name:
            type: string
            description: The cardholder's middle name.
            example: Fitzgerald
            minLength: 1
            maxLength: 40
          last_name:
            type: string
            description: The cardholder's last name.
            example: Kennedy
            minLength: 1
            maxLength: 40
          email:
            allOf:
            - $ref: '#/components/schemas/IssuingEmail'
            description: The cardholder's email address.
          phone_number:
            allOf:
            - $ref: '#/components/schemas/IssuingPhoneNumber'
          date_of_birth:
            type: string
            format: date
            description: The cardholder's date of birth. <br/>Format – `YYYY-MM-DD`
            example: '1985-05-15'
          billing_address:
            allOf:
            - $ref: '#/components/schemas/IssuingAddress'
            description: The cardholder's billing address.
          residency_address:
            allOf:
            - $ref: '#/components/schemas/IssuingAddress'
            description: The cardholder's residential address. If this value is not provided,
              the cardholder's billing address is used instead, by default.
    get-cardholder-response:
      allOf:
        - $ref: '#/components/schemas/IssuingCardholder'
    IssuingCardholder:
      type: object
      required:
        - id
        - client_id
        - entity_id
        - type
        - first_name
        - last_name
        - billing_address
      properties:
        id:
          $ref: '#/components/schemas/IssuingCardholderId'
        type:
          type: string
          description: The cardholder type. Currently `individual` is the only supported value.
          example: individual
        first_name:
          type: string
          description: The cardholder's first name.
          example: John
          pattern: ^[a-zA-Z'\- ]{1,40}$
          minLength: 1
          maxLength: 40
        middle_name:
          type: string
          description: The cardholder's middle name.
          example: Fitzgerald
          pattern: ^[a-zA-Z'\- ]{1,40}$
          minLength: 1
          maxLength: 40
        last_name:
          type: string
          description: The cardholder's last name.
          example: Kennedy
          pattern: ^[a-zA-Z'\- ]{1,40}$
          minLength: 1
          maxLength: 40
        email:
          allOf:
            - $ref: '#/components/schemas/IssuingEmail'
          description: The cardholder's email address.
        phone_number:
          allOf:
            - $ref: '#/components/schemas/IssuingPhoneNumber'
        date_of_birth:
          type: string
          format: date
          description: The cardholder's date of birth. <br/>Format – `YYYY-MM-DD`
          example: "1985-05-28"
        billing_address:
          allOf:
            - $ref: '#/components/schemas/IssuingAddress'
          description: The cardholder's billing address.
        residency_address:
          allOf:
            - $ref: '#/components/schemas/IssuingAddress'
          description: The cardholder's residential address. If this value is not provided, the cardholder's billing address is used instead, by default.
        reference:
          $ref: '#/components/schemas/IssuingReference'
        client_id:
          $ref: '#/components/schemas/IssuingClientId'
        account_entity_id:
          description: The unique identifier of the entity that holds the cardholder's currency account.
          allOf: # This is a workaround to support ref sibling, we should remove it once Microsoft.OpenApi support Open API 3.1.0 (https://github.com/microsoft/OpenAPI.NET/issues/795)
            - $ref: '#/components/schemas/IssuingEntityId'
        parent_sub_entity_id:
          description: The unique identifier of the cardholder's parent sub-entity, if they have one.
          allOf:
            - $ref: '#/components/schemas/IssuingEntityId'
        entity_id:
          description: The unique identifier of the cardholder's root client entity. 
          allOf:
            - $ref: '#/components/schemas/IssuingEntityId'
        status:
          type: string
          description: The cardholder's status.
          enum:
            - active
            - pending
            - restricted
            - requirements_due
            - inactive
            - rejected
            - draft
            - suspended
          example: 'active'
        created_date:
          type: string
          format: date-time
          example: "2019-09-10T10:11:12Z"
        last_modified_date:
          type: string
          format: date-time
          example: "2019-09-11T10:11:12Z"
        _links:
          $ref: '#/components/schemas/IssuingCardholderLinks'
    IssuingCardholderLinks:
      type: object
      description: The links related to the current cardholder.
      minItems: 1
      required:
        - self
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the cardholder
        cards:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to add or retrieve the cards issued to the cardholder
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/cardholders/crh_d3ozhf43pcq2xbldn2g45qnb44"
          actions:
            - GET
          types:
            - application/json
        cards:
          href: "https://{prefix}.api.checkout.com/issuing/cards"
          actions:
            - POST
          types:
            - application/json
    IssuingUpdateCardholderLinks:
      type: object
      description: The links related to the current cardholder.
      required:
        - self
      properties:
        self:
          $ref: '#/components/schemas/IssuingLink'
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/cardholders/crh_d3ozhf43pcq2xbldn2g45qnb44"
          actions:
            - GET
          types:
            - application/json
    update-cardholder-request:
      type: object
      description: The cardholder's fields to update.
      properties:
        first_name:
          type: string
          description: The cardholder's first name.
          example: John
          minLength: 1
          maxLength: 40
        middle_name:
          type: string
          description: The cardholder's middle name. To set this field to null, pass `null` in your request.
          example: Fitzgerald
          minLength: 1
          maxLength: 40
        last_name:
          type: string
          description: The cardholder's last name.
          example: Kennedy
          minLength: 1
          maxLength: 40
        date_of_birth:
          type: string
          format: date
          description: The cardholder's date of birth in the YYYY-MM-DD format. To set this field to null, pass `null` in your request.
          example: "1985-05-15"
        phone_number:
          allOf:
            - $ref: '#/components/schemas/IssuingPhoneNumber'
        email:
          allOf:
            - $ref: '#/components/schemas/IssuingEmail'
          description: The cardholder's email address. To set this field to null, pass `null` in your request.
        billing_address:
          allOf:
            - $ref: '#/components/schemas/IssuingAddress'
          description: The  cardholder's billing address.
        residency_address:
          allOf:
            - $ref: '#/components/schemas/IssuingAddress'
          description: The cardholder's residency address. To set this field to null, pass `null` in your request.
    update-cardholder-response:
      type: object
      required:
        - last_modified_date
        - _links
      properties:
        last_modified_date:
          type: string
          format: date-time
          example: "2019-09-10T10:11:12Z"
        _links:
          allOf:
            - $ref: '#/components/schemas/IssuingUpdateCardholderLinks'
    3ds-enrollment-get-response:
      type: object
      description: The card's 3DS enrollment details.
      required:
        - locale
        - phone_number
        - created_date
        - last_modified_date
      properties:
        locale:
          $ref: '#/components/schemas/3dsLocale'
        phone_number:
          $ref: '#/components/schemas/3dsPhoneNumber'
        security_question:
          type: object
          description: |
            Obfuscated security question and answer, indicating that this card was enrolled using this method.
          properties:
            question:
              type: string
              example: "****"
            answer:
              type: string
              example: "****"
        password:
          type: string
          description: |
            Obfuscated password, indicating that this card was enrolled using this method.
        created_date:
          type: string
          format: date-time
          example: "2019-09-10T10:11:12Z"
        last_modified_date:
          type: string
          format: date-time
          example: "2019-09-11T10:11:12Z"
        _links:
          allOf:
            - $ref: '#/components/schemas/3dsLink'
    3ds-enrollment-patch-response:
      type: object
      description: The card's 3DS authentication details.
      properties:
        _links:
          allOf:
            - $ref: '#/components/schemas/3dsLink'
    3ds-enrollment-post-response:
      type: object
      description: The card's 3DS authentication details.
      properties:
        _links:
          allOf:
            - $ref: '#/components/schemas/3dsLink'
    3dsLink:
      type: object
      description: The link to the card's 3DS enrollment details.
      minItems: 1
      required:
        - self
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's 3DS enrollment details.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/3ds-enrollment"
          actions:
            - GET
          types:
            - application/json
    3dsLocale:
      type: string
      enum: [en-US, fr-FR]
      description: |
        The card's locale, as one of the possible BCP 47 formatted enum values. 
        
        The locale determines the language that text messages and 3DS challenge prompts are displayed to the user in, as well as the format used for amounts and dates.
        
        When not provided, the locale of the card product is used. 
      format: language-COUNTRY
      example: en-US
      pattern: ^[a-z]{2}-[A-Z]{2}$
      maxLength: 5
      minLength: 5
    3dsPassword:
      type: string
      description: |
        The case-sensitive password used to support knowledge-based 3DS authentication. 
        
        Leading and trailing white spaces will be ignored.
      maxLength: 30
      minLength: 4
      pattern: ^[a-zA-Z0-9àÀáÁâÂäÄçÇèÈéÉêÊëËìÌíÍîÎïÏñÑòÒóÓôÔõÕöÖùÙúÚûÛüÜýÝ+\-*/%()=?!~#'",;:$&\s.]{4,30}$
      example: "Xtui43FvfiZ"
      
      
    3dsPhoneNumber:
      type: object
      required:
        - country_code
        - number
      description: |
        The phone number to send the one-time password (OTP) for 3DS authentication to.
        
        This phone number is independent of the cardholder's mobile phone number on file.
        The number is used for authorizations that require a <a href="https://www.checkout.com/docs/payments/authenticate-payments/3d-secure">3DS challenge</a>.
      properties:
        country_code: 
          type: string
          description: The phone number's <a href="https://docs.checkout.com/resources/codes/country-codes" target="blank">international country calling code</a>.
          minLength: 1
          maxLength: 7
          example: "+1"
        number:
          type: string
          description: A valid phone number without leading zeros.
          minLength: 6
          maxLength: 25
          example: 415 555 2671
    3dsSecurityPair:
      type: object
      description: |
        The question and answer security pair used to support knowledge-based 3DS authentication.
        
        Security pairs are set per-card, not per-cardholder.
      required:
        - question
        - answer
      properties:
        question: 
          type: string
          description: The cardholder’s security question. 
          pattern: ^[a-zA-Z0-9àÀáÁâÂäÄçÇèÈéÉêÊëËìÌíÍîÎïÏñÑòÒóÓôÔõÕöÖùÙúÚûÛüÜýÝ+\-*/%()=?!~#'",;:$&\s.]{4,45}$
          maxLength: 45
          minLength: 4
          example: "Who are you?"
        answer:
          type: string
          description: |
            The cardholder’s answer to the security question.
          
            The answer is not case-sensitive. Leading and trailing white spaces will be ignored.
          pattern: ^[a-zA-Z0-9àÀáÁâÂäÄçÇèÈéÉêÊëËìÌíÍîÎïÏñÑòÒóÓôÔõÕöÖùÙúÚûÛüÜýÝ+\-*/%()=?!~#'",;:$&\s.]{4,30}$
          maxLength: 30
          minLength: 4
          example: "Bond. James Bond."
    Password:
      type: object
      required:
        - password
        - phone_number
      properties:
        password:
          $ref: '#/components/schemas/3dsPassword'
        locale:
          $ref: '#/components/schemas/3dsLocale'
        phone_number:
          $ref: '#/components/schemas/3dsPhoneNumber'
    security_question:
      type: object
      required:
        - security_pair
        - phone_number
      properties:
        security_pair:
          $ref: '#/components/schemas/3dsSecurityPair'
        locale:
          $ref: '#/components/schemas/3dsLocale'
        phone_number:
          $ref: '#/components/schemas/3dsPhoneNumber'
    activate-card-response:
      type: object
      properties:
        _links:
          allOf:
            - $ref: '#/components/schemas/ActivatedCardLinks'
    add-card-request:
      type: object
      discriminator:
        propertyName: type
        mapping:
          virtual: '#/components/schemas/add-virtual-card-request'
          physical: '#/components/schemas/add-physical-card-request'
      required:
      - type
      - cardholder_id
      - card_product_id
      properties:
        type:
          type: string
          description: The card type.
          example: virtual
        cardholder_id:
          $ref: '#/components/schemas/IssuingCardholderId'
        lifetime:
          $ref: '#/components/schemas/CardLifetime'
        reference:
          $ref: '#/components/schemas/IssuingReference'
        metadata:
          allOf:
          - $ref: '#/components/schemas/IssuingCardMetadata'
          description: User's metadata
        revocation_date:
          $ref: '#/components/schemas/IssuingRevocationDate'
        activation_date:
          $ref: '#/components/schemas/IssuingActivationDate'
        card_product_id:
          description: The card product's unique identifier. This field is required if there
            are multiple card products associated with the entity.
          allOf:
          - $ref: '#/components/schemas/IssuingCardProductId'
    add-card-response:
      type: object
      discriminator:
        propertyName: type
        mapping:
          virtual: '#/components/schemas/add-virtual-card-response'
          physical: '#/components/schemas/add-physical-card-response'
      required:
      - id
      - client_id
      - entity_id
      - last_four
      - expiry_month
      - expiry_year
      - billing_currency
      - issuing_country
      - created_date
      - status
      - type
      - scheme
      properties:
        id:
          $ref: '#/components/schemas/IssuingCardId'
        client_id:
          $ref: '#/components/schemas/IssuingClientId'
        entity_id:
          $ref: '#/components/schemas/IssuingEntityId'
        display_name:
          $ref: '#/components/schemas/DisplayName'
        last_four:
          $ref: '#/components/schemas/LastFour'
        expiry_month:
          $ref: '#/components/schemas/ExpiryMonth'
        expiry_year:
          $ref: '#/components/schemas/ExpiryYear'
        billing_currency:
          $ref: '#/components/schemas/IssuingCurrency'
        issuing_country:
          $ref: '#/components/schemas/IssuingCountry'
        status:
          allOf:
          - $ref: '#/components/schemas/IssuingStatus'
        type:
          $ref: '#/components/schemas/IssuingType'
        reference:
          $ref: '#/components/schemas/IssuingReference'
        scheme:
          $ref: '#/components/schemas/Scheme'
        created_date:
          type: string
          format: date-time
          example: '2019-09-10T10:11:12Z'
        _links:
          allOf:
          - $ref: '#/components/schemas/CardLinks'
    add-physical-card-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-card-request'
        - type: object
          properties:
            display_name:
              $ref: '#/components/schemas/DisplayName'
            shipping_instructions:
              $ref: '#/components/schemas/IssuingShippingInstruction'
            activate_card:
              type: boolean
              default: false
              description: |
                Sets whether to activate the newly created card upon creation. 
                
                If set to `false`, the cardholder will not be able to process transactions until you activate the card.   
      required:
        - shipping_instructions
        - display_name
    add-physical-card-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-card-response'
    add-virtual-card-control-mcc-limit-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-virtual-card-control-request'
        - type: object
          properties:
            mcc_limit:
              $ref: '#/components/schemas/MccLimit'
      required:
        - mcc_limit
    add-virtual-card-control-mid-limit-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-virtual-card-control-request'
        - type: object
          properties:
            mid_limit:
              $ref: '#/components/schemas/MidLimit'
      required:
        - mid_limit
    add-virtual-card-control-request:
      type: object
      description: The control to create.
      discriminator:
        propertyName: control_type
        mapping:
          velocity_limit: '#/components/schemas/add-virtual-card-control-velocity-limit-request'
          mcc_limit: '#/components/schemas/add-virtual-card-control-mcc-limit-request'
          mid_limit: '#/components/schemas/add-virtual-card-control-mid-limit-request'
      required:
        - control_type
      properties:
        description:
          type: string
          maxLength: 256
          description: A description for the control.
        control_type:
          $ref: '#/components/schemas/IssuingControlType'
    add-virtual-card-control-velocity-limit-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-virtual-card-control-request'
        - type: object
          properties:
            velocity_limit:
              $ref: '#/components/schemas/VelocityLimit'
      required:
        - velocity_limit
    add-virtual-card-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-card-request'
        - type: object
          properties:
            display_name:
              $ref: '#/components/schemas/DisplayName'
            is_single_use:
              type: boolean
              description: Sets whether the virtual card should expire after a single use.
              default: false
            activate_card:
              type: boolean
              default: true
              description: |
                Sets whether to activate the newly created card upon creation.
              
                If set to `false`, the cardholder will not be able to process transactions until you activate the card.
            return_credentials:
              type: array
              items:
                type: string
                enum:
                  - number
                  - cvc2
              description: |
                  The credentials to retrieve on card creation.
              example: ["number","cvc2"]
            control_profiles:
              type: array
              items:
                $ref: '#/components/schemas/IssuingControlProfileId'
              description: The control profiles you want to add the card to as a target.
              example: ["cpr_53mkhdc4jjlu5jcryx76bjbrgm"]
            controls:
              type: array
              description: The controls that will be set on the card.
              items:
                $ref: '#/components/schemas/add-virtual-card-control-request'
              example:
                [
                  {
                      "description": "50 euros daily",
                      "control_type": "velocity_limit",
                      "velocity_limit": {
                          "amount_limit": 5000,
                          "velocity_window": {
                              "type": "daily"
                          }
                      }
                  },
                  {
                    "description": "Block gambling",
                    "control_type": "mcc_limit",
                    "mcc_limit": {
                        "type": "block",
                        "mcc_list": [
                            "7995"
                        ]
                    }
                  }
                ]
    add-virtual-card-response-control-mcc-limit-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-virtual-card-response-control-response'
        - type: object
          properties:
            mcc_limit:
              $ref: '#/components/schemas/MccLimit'
    add-virtual-card-response-control-mid-limit-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-virtual-card-response-control-response'
        - type: object
          properties:
            mid_limit:
              $ref: '#/components/schemas/MidLimit'
    add-virtual-card-response-control-response:
      type: object
      description: The card control's details.
      discriminator:
        propertyName: control_type
        mapping:
          velocity_limit: '#/components/schemas/add-virtual-card-response-control-velocity-limit-response'
          mcc_limit: '#/components/schemas/add-virtual-card-response-control-mcc-limit-response'
          mid_limit: '#/components/schemas/add-virtual-card-response-control-mid-limit-response'
      required:
        - id
        - description
        - control_type
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlId'
        description:
          type: string
          maxLength: 256
          description: A description for the control.
          example: Maximum spend of 500€ per week for restaurants
        control_type:
          $ref: '#/components/schemas/IssuingControlType'
    add-virtual-card-response-control-velocity-limit-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-virtual-card-response-control-response'
        - type: object
          properties:
            velocity_limit:
              $ref: '#/components/schemas/VelocityLimit'
    add-virtual-card-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-card-response'
        - type : object
          properties:
            credentials:
              $ref: '#/components/schemas/Credentials'
            controls:
              type: array
              description: The controls that were set on the card.
              items:
                $ref: '#/components/schemas/add-virtual-card-response-control-response'
              example:
                [
                  {
                    "id": "ctr_s6tfwc6jpieexgcet2pljss6tu",
                    "description": "Maximum spend of 500€ per week for restaurants",
                    "control_type": "velocity_limit",
                    "velocity_limit": {
                      "amount_limit": 50000,
                      "velocity_window": {
                        "type": "weekly"
                      },
                      "mcc_list": [
                        "4121",
                        "4582"
                      ]
                    }
                  },
                  {
                    "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
                    "description": "Allow the card to be used only in restaurants and supermarkets",
                    "control_type": "mcc_limit",
                    "mcc_limit": {
                      "type": "allow",
                      "mcc_list": [
                        "5932",
                        "5411"
                      ]
                    }
                  },
                  {
                    "id": "ctr_fa6psq42dcdd6fdn5gifcq1491",
                    "description": "Allow the card to be used only in AZ Pizza",
                    "control_type": "mid_limit",
                    "mid_limit": {
                      "type": "allow",
                      "mid_list": [
                        "593278",
                        "541114"
                      ]
                    }
                  }
                ]
    DisplayName:
      type: string
      pattern: ^[0-9a-zA-Z.\- ]{2,26}$
      minLength: 2
      maxLength: 26
      example: JOHN KENNEDY
      description: The name to display on the card.
    get-card-response:
      type: object
      discriminator:
        propertyName: type
        mapping:
          virtual: '#/components/schemas/get-virtual-card-response'
          physical: '#/components/schemas/get-physical-card-response'
      required:
      - id
      - client_id
      - entity_id
      - cardholder_id
      - card_product_id
      - last_four
      - expiry_month
      - expiry_year
      - status
      - type
      - billing_currency
      - issuing_country
      - scheme
      properties:
        id:
          $ref: '#/components/schemas/IssuingCardId'
        client_id:
          $ref: '#/components/schemas/IssuingClientId'
        entity_id:
          $ref: '#/components/schemas/IssuingEntityId'
        cardholder_id:
          $ref: '#/components/schemas/IssuingCardholderId'
        card_product_id:
          $ref: '#/components/schemas/IssuingCardProductId'
        user_id:
          $ref: '#/components/schemas/IssuingUserId'
        last_four:
          $ref: '#/components/schemas/LastFour'
        expiry_month:
          $ref: '#/components/schemas/ExpiryMonth'
        expiry_year:
          $ref: '#/components/schemas/ExpiryYear'
        status:
          $ref: '#/components/schemas/IssuingStatus'
        display_name:
          $ref: '#/components/schemas/DisplayName'
        type:
          $ref: '#/components/schemas/IssuingType'
        billing_currency:
          $ref: '#/components/schemas/IssuingCurrency'
        issuing_country:
          $ref: '#/components/schemas/IssuingCountry'
        reference:
          $ref: '#/components/schemas/IssuingReference'
        metadata:
          $ref: '#/components/schemas/IssuingCardMetadata'
        revocation_date:
          $ref: '#/components/schemas/IssuingRevocationDate'
        activation_date:
          type: string
          description: ISO 8601 date scheduling the card's activation.
          example: 2026-06-01T10:00Z
        root_card_id:
          $ref: '#/components/schemas/IssuingRootCardId'
        parent_card_id:
          $ref: '#/components/schemas/IssuingParentCardId'
        scheme:
          $ref: '#/components/schemas/Scheme'
        created_date:
          $ref: '#/components/schemas/Datetime'
        last_modified_date:
          $ref: '#/components/schemas/Datetime'
        _links:
          allOf:
          - $ref: '#/components/schemas/CardLinks'
    get-physical-card-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/get-card-response'
        - type: object
    get-virtual-card-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/get-card-response'
        - type: object
          properties:
            is_single_use:
              type: boolean
              description: Specifies whether the virtual card is set to expire after a single use.
              default: false
    get-cardholder-cards-response:
      type: object
      required:
        - cards
      properties:
        cards:
          type: array
          description: The list of cards associated with the specified cardholder.
          items:
            $ref: '#/components/schemas/get-card-response'
    ActivatedCardLinks:
      type: object
      description: The links related to the card.
      minItems: 1
      required:
        - self
        - revoke
        - suspend
        - controls
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's details.
        revoke:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to revoke the card.
        suspend:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to suspend the card.
        controls:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's controls.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:
            - application/json
        revoke:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/revoke"
          actions:
            - POST
          types:
            - application/json
        suspend:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/suspend"
          actions:
            - POST
          types:  
            - application/json
        controls:
          href: "https://{prefix}.api.checkout.com/issuing/controls?target_id=crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:
            - application/json
    CardLifetime:
      type: object
      description: |
        The duration of time during which the card will accept incoming authorizations. 
        
        The `unit` and `value` combination you supply will determine the card's expiry date from the date of issue. For example, to set the card to expire in a year and a half, pass the following:
        ```
        {
          "lifetime": {
            "unit": "Months",
            "value": "18"
          }
        }
        ```
      required:
        - value
      properties:
        unit:
          type: string
          enum: [Months, Years]
          description: The unit of time to specify the card lifetime's in.
          example: Months
          default: Years
        value:
          type: integer
          description: The length of time before the card will expire, in the `unit` of time specified.
          example: 6
    CardLink:
      type: object
      description: The links related to the card.
      minItems: 1
      required:
        - self
        - controls
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's details.
        controls:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's controls.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:
            - application/json
        controls:
          href: "https://{prefix}.api.checkout.com/issuing/controls?target_id=crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:
            - application/json
    CardLinks:
      type: object
      description: The links related to the card.
      minItems: 1
      required:
        - self
        - credentials
        - revoke
        - controls
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's details.
        credentials:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's credentials.
        revoke:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to revoke the card.
        controls:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's controls.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:
            - application/json
        credentials:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/credentials"
          actions:
            - GET
          types:
            - application/json
        revoke:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/revoke"
          actions:
            - POST
          types:
            - application/json
        controls:
          href: "https://{prefix}.api.checkout.com/issuing/controls?target_id=crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET 
          types:
            - application/json
    CardNumber:
      type: string
      format: pan
      description: The unencrypted card number.
      pattern: ^[0-9]{16}$
      minLength: 16
      maxLength: 16
      example: "4242424242424242"
    Credentials:
      type: object
      properties:
        number:
          $ref: '#/components/schemas/CardNumber'
        cvc2:
          $ref: '#/components/schemas/CVC2'
        
    CVC2:
      type: string
      minimum: 3
      maximum: 3
      pattern: ^[0-9]{3}$
      description: The card's verification code, also known as the CVV or CVC2.
      example: "604"
    DigitalCardLinks:
      type: object
      description: The links related to the digital card.
      minItems: 1
      required:
        - self
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the digital card's details.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/digital-cards/dcr_5ngxzsynm2me3oxf73esbhda6q"
          actions:
            - GET
          types:
            - application/json
    DigitalCardType:
      description: |
        The type of digital card
      type: string
      enum:
        - secure_element
        - host_card_emulation
        - card_on_file
        - e_commerce
        - qr_code
      example: secure_element
    ExpiryMonth:
      type: integer
      format: int32
      description: The card's expiration month.
      minimum: 1
      maximum: 12
      example: 5
    ExpiryYear:
      type: integer
      format: int32
      description: The card's expiration year.
      example: 2025
      maxLength: 4
      minLength: 4
    IssuingActivationDate:
      type: string
      description: |
        ISO 8601 date scheduling the card's activation. Two formats are supported:
      
        - Date only: `YYYY-MM-DD` (treated as midnight UTC)
        - Date with round hour: `YYYY-MM-DDTHH:mmZ` (UTC) or `YYYY-MM-DDTHH:mm±HH:mm` (offset)
      
        Only round hours are allowed when a time is provided (`HH:00`). The value must be at least the next round hour after the request time.
      example: "2026-06-01T10:00Z"
    IssuingCardMetadata:
      type: object
      description: |
        User's metadata.
      properties:
        udf1:
          type: string
          description: User defined field 1
          pattern: ^.{0,255}$
          example: "metadata1"
        udf2:
          type: string
          description: User defined field 2
          pattern: ^.{0,255}$
          example: "metadata2"
        udf3:
          type: string
          description: User defined field 3
          pattern: ^.{0,255}$
          example: "metadata3"
        udf4:
          type: string
          description: User defined field 4
          pattern: ^.{0,255}$
          example: "metadata4"
        udf5:
          type: string
          description: User defined field 5
          pattern: ^.{0,255}$
          example: "metadata5"
    IssuingDevice:
      type: object
      properties:
        id: 
          type: string
          description: The device ID.
          example: 04431C7B514E80018306224737548585F11415F67C4E2EB6
        type:
          type: string
          description: The device type.
          enum:
            - host_card_emulation
            - samsung_phone
            - samsung_tablet
            - samsung_watch
            - samsung_tv
            - iphone
            - iwatch
            - ipad
            - mac_book
            - android_phone
            - android_tablet
            - android_watch
            - mobile_phone
            - tablet
            - watch
            - mobile_phone_or_tablet
            - bracelet
            - unknown
          example: iphone
        manufacturer:
          type: string
          description: The device manufacturer.
          example: ios
        brand:
          type: string
          description: The device brand.
        model:
          type: string
          description: The device model.
        os_version:
          type: string
          description: The device operating system version.
          example: "13"
        firmware_version:
          type: string
          description: The device firmware version.
        phone_number:
          type: string
          description: The device phone number.
          example: "447505551234"
        device_name:
          type: string
          description: The device name.
          example: John's iPhone
        device_parent_id:
          type: string
          description: The device parent ID.
        language:
          type: string
          description: The device language.
        serial_number:
          type: string
          description: The device serial number.
        time_zone:
          type: string
          description: The device time zone.
        time_zone_setting:
          type: string
          description: The device time zone setting.
          enum:
            - network_set
            - consumer_set
          example: network_set
        sim_serial_number:
          type: string
          description: The device SIM serial number.
        imei:
          type: string
          description: The device International Mobile Equipment Identity (IMEI) number.
          example: "000000000000024"
        network_operator:
          type: string
          description: The device network operator.
        network_type:
          type: string
          description: The device network type.
          enum:
            - cellular
            - wifi
          example: wifi
    IssuingDigitalStatus:
      description: |
        The digital card's current status, which determines whether it can approve incoming authorizations:
        
        - `inactive`: the default state - authorizations will be declined until the card is activated
        - `active`: authorization requests can be approved
        - `deleted`: incoming authorization requests will be declined, permanently — the card cannot be reactivated from this state
      type: string
      enum:
        - active
        - inactive
        - deleted
      example: active
    IssuingRequestor:
      type: object
      properties:
        id: 
          type: string
          description: The requestor ID.
          example: "501103353211"
        name:
          type: string
          description: The requestor name.
          example: APPLE PAY
    IssuingRevocationDate:
      type: string
      description: Date for the card to be automatically revoked. Must be after the current date and date only in the form `yyyy-mm-dd`.
      example: "2027-03-12"
    IssuingStatus:
      description: |
        The card's status, which determines whether it can approve incoming authorizations:
        
        - `inactive`: the default state - authorizations will be declined until the card is activated
        - `active`: authorization requests can be approved
        - `suspended`: incoming authorization requests will be declined - the card can be reactivated to accept new authorizations
        - `revoked`: incoming authorization requests will be permanently declined - the card cannot be reactivated from this state
      type: string
      enum:
        - active
        - inactive
        - revoked
        - suspended
      example: active
    IssuingType:
      type: string
      description: The card type.
      enum:
        - virtual
        - physical
      example: virtual
    LastFour:
      type: string
      minimum: 4
      maximum: 4
      pattern: ^[0-9]{4}$
      description: The last four digits of the card number, also known as the PAN.
      example: "1234"
    RenewedCardLinks:
      type: object
      description: The links related to the card.
      minItems: 1
      required:
        - self
        - credentials
        - activate
        - controls
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card details.
        credentials:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's credentials.
        activate:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to activate the card.
        controls:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's controls.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:
            - application/json
        credentials:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/credentials"
          actions:
            - GET
          types:
            - application/json
        activate:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/activate"
          actions:
            - POST
          types:
            - application/json
        controls:
          href: "https://{prefix}.api.checkout.com/issuing/controls?target_id=crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:
            - application/json
    Scheme:
      type: string
      description: the card scheme.
      enum:
        - mastercard
        - visa
      example: mastercard
    SuspendedCardLinks:
      type: object
      description: The links related to the card.
      minItems: 1
      required:
        - self
        - activate
        - revoke
        - controls
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card details.
        activate:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to activate the card.
        revoke:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to revoke the card.
        controls:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's controls.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:  
            - application/json
        activate:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/activate"
          actions:
            - POST
          types:
            - application/json
        revoke:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/revoke"
          actions:
            - POST
          types:
            - application/json
        controls:
          href: "https://{prefix}.api.checkout.com/issuing/controls?target_id=crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:
            - application/json
    physical_card:
      properties:
        display_name:
          $ref: '#/components/schemas/DisplayName'
        shipping_instructions:
              $ref: '#/components/schemas/IssuingShippingInstruction'
        reference:
          $ref: '#/components/schemas/IssuingReference'
        metadata:
          allOf:
            - $ref: '#/components/schemas/IssuingCardMetadata'
          description: User's metadata  
    virtual_card:
      properties:
        display_name:
          $ref: '#/components/schemas/DisplayName'
        reference:
          $ref: '#/components/schemas/IssuingReference'
        metadata:
          allOf:
            - $ref: '#/components/schemas/IssuingCardMetadata'
          description: User's metadata  
    renew-card-response:
      type: object
      properties:
        parent_card_id:
          description: The unique identifier of the card that was renewed.
          allOf:
           - $ref: '#/components/schemas/IssuingCardId'
        cardholder_id:
          $ref: '#/components/schemas/IssuingCardholderId'
        status:
          example: inactive
          allOf:
           - $ref: '#/components/schemas/IssuingStatus'
        type:
          $ref: '#/components/schemas/IssuingType'
        id:
          description: The unique identifier of the new card.
          example: crd_zdihd7452165pk5lgywaa52147
          allOf:
           - $ref: '#/components/schemas/IssuingCardId'
        client_id:
          $ref: '#/components/schemas/IssuingClientId'
        entity_id:
          $ref: '#/components/schemas/IssuingEntityId'
        last_four:
          $ref: '#/components/schemas/LastFour'
        expiry_year:
          $ref: '#/components/schemas/ExpiryYear'
        expiry_month:
          $ref: '#/components/schemas/ExpiryMonth'
        display_name:
          $ref: '#/components/schemas/DisplayName'
        reference:
          $ref: '#/components/schemas/IssuingReference'
        created_date:
          $ref: '#/components/schemas/Datetime'
        billing_currency:
          $ref: '#/components/schemas/IssuingCurrency'
        issuing_country:
          $ref: '#/components/schemas/IssuingCountry'
        _links:
          allOf:
            - $ref: '#/components/schemas/RenewedCardLinks'
    revoke-card-request:
      type: object
      properties:
        reason:
          description: The reason why the card is being revoked.
          type: string
          enum:
            - expired
            - reported_lost
            - reported_stolen
          example: reported_lost
    revoke-card-response:
      type: object
      properties:
        _links:
          allOf:
            - $ref: '#/components/schemas/CardLink'
    suspend-card-request:
      type: object
      properties:
        reason:
          description: The reason why the card is being suspended.
          type: string
          enum:
            - suspected_lost
            - suspected_stolen
          example: suspected_lost
    suspend-card-response:
      type: object
      properties:
        _links:
          allOf:
            - $ref: '#/components/schemas/SuspendedCardLinks'
    update-card-request:
      type: object
      description: The card fields to update.
      properties:
        reference:
          $ref: '#/components/schemas/IssuingReference'
        metadata:
          $ref: '#/components/schemas/IssuingCardMetadata'
        expiry_month:
          $ref: '#/components/schemas/ExpiryMonth'
        expiry_year:
          $ref: '#/components/schemas/ExpiryYear'
        revocation_date:
          $ref: '#/components/schemas/IssuingRevocationDate'
        activation_date:
          $ref: '#/components/schemas/IssuingActivationDate'
      
    update-card-response:
      type: object
      required:
        - last_modified_date
      properties:
        last_modified_date:
            $ref: '#/components/schemas/Datetime'
        _links:
          allOf:
            - $ref: '#/components/schemas/CardSelfLink' 
    get-digital-card-response:
      type: object
      required:
        - id
        - card_id
        - client_id
        - entity_id
        - last_four
        - status
      properties:
        id:
          $ref: '#/components/schemas/IssuingDigitalCardId'
        card_id:
          $ref: '#/components/schemas/IssuingCardId'
        client_id:
          $ref: '#/components/schemas/IssuingClientId'
        entity_id:
          $ref: '#/components/schemas/IssuingEntityId'
        last_four:
          $ref: '#/components/schemas/LastFour'
        status:
          $ref: '#/components/schemas/IssuingDigitalStatus'
        type:
          $ref: '#/components/schemas/DigitalCardType'
        scheme_card_id:
          $ref: '#/components/schemas/IssuingSchemeCardId'
        requestor:
          $ref: '#/components/schemas/IssuingRequestor'
        device:
          $ref: '#/components/schemas/IssuingDevice'
        provisioned_on:
          $ref: '#/components/schemas/Datetime'
        _links:
          allOf:
            - $ref: '#/components/schemas/DigitalCardLinks' 
    BusinessType:
      type: string
      description: The type of business.
      enum:
        - issuing
        - business_account
      example: business_account
    CardSelfLink:
      type: object
      description: The links related to the card.
      minItems: 1
      required:
        - self
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the card's details.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491"
          actions:
            - GET
          types:
            - application/json
    Datetime:
      type: string
      format: UTC
      example: "2021-09-09T19:41:39Z"
    IssuingAddress:
      type: object
      required:
        - address_line1
        - city
        - zip
        - country
      properties:
        address_line1: 
          type: string
          description: The first line of the address.
          example: Checkout.com
          pattern: ^[a-zA-Z0-9/àáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð \-,.'_#:]{1,45}$
          maxLength: 45
          minLength: 1
        address_line2:
          type: string
          description: The second line of the address.
          example: 90 Tottenham Court Road
          pattern: ^[a-zA-Z0-9/àáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð \-,.'_#:]{1,45}$
          maxLength: 45
          minLength: 1
        city:
          type: string
          description: The address city.
          example: London
          pattern: ^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'\-]{1,128}$
          maxLength: 128
          minLength: 1
        state:
          type: string
          description: The address state.
          example: London
          pattern: ^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'\-]{1,128}$
          maxLength: 128
          minLength: 1
        zip:
          type: string
          description: The address zip code, or postal code.
          example: W1T 4TJ
          pattern: ^[0-9a-zA-Z ]{1,10}$
          maxLength: 10
          minLength: 1
        country:
          type: string
          description: The address country, as an <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="blank">ISO country code</a>.
          example: GB
          pattern: ^[A-Z]{2}$
          maxLength: 2
          minLength: 2
    IssuingCardholderId:
      type: string
      pattern: "^crh_[a-z0-9]{26}$"
      description: The cardholder's unique identifier.
      maxLength: 30
      minLength: 30
      example: crh_d3ozhf43pcq2xbldn2g45qnb44
    IssuingCardId:
      type: string
      pattern: "^crd_[a-z0-9]{26}$"
      description: The card's unique identifier.
      maxLength: 30
      minLength: 30
      example: crd_fa6psq242dcd6fdn5gifcq1491
    IssuingCardProductId:
      type: string
      pattern: "^pro_[a-z0-9]{26}$"
      description: The card product's unique identifier.
      maxLength: 30
      minLength: 30
      example: pro_7syjig3jq3mezlc3vjrdpfitl4
    IssuingClientId:
      type: string
      pattern: "^cli_[a-z0-9]{26}$"
      description: The client's unique identifier.
      maxLength: 30
      minLength: 30
      example: cli_vkuhvk4vjn2edkps7dfsq6emqm
    IssuingCountry:
      type: string
      description: The issuing country, as a two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="blank" >ISO country code</a>.
      example: US
      maxLength: 2
      minLength: 2
    IssuingCurrency:
      type: string
      description: The issuing currency, as a three-letter <a href="https://docs.checkout.com/docs/currency-codes" target="blank">ISO currency code</a>.
      format: ISO4217
      example: USD
      pattern: ^[a-zA-Z]{3}$
      maxLength: 3
      minLength: 3
    IssuingDigitalCardId:
      type: string
      pattern: "^dcr_[a-z0-9]{26}$"
      description: The digital card's unique identifier.
      maxLength: 30
      minLength: 30
      example: dcr_5ngxzsynm2me3oxf73esbhda6q
    IssuingEmail:
      type: string
      format: email
      description: |
        The cardholder's email address. 
        
        Emails are validated against the <a href="https://datatracker.ietf.org/doc/html/rfc6530">rfc6530</a> standard.
      example: john.kennedy@myemaildomain.com
      minLength: 3
      maxLength: 254
    IssuingEntityId:
      type: string
      pattern: "^ent_[a-z0-9]{26}$"
      description: The entity's unique identifier.
      maxLength: 30
      minLength: 30
      example: ent_fa6psq242dcd6fdn5gifcq1491
    IssuingFileId:
      type: string
      pattern: "^file_[a-z0-9]{26}$"
      description: The unique Checkout.com identifier for the uploaded file.
      minLength: 31
      maxLength: 31
      example: "file_6lbss42ezvoufcb2beo76rvwly"
    IssuingLink:
      type: object
      additionalProperties: false
      required:
        - href
        - actions
        - types
      properties:
        href:
          description: The link URL.
          type: string
          pattern: '^https:\/.*$'
          maxLength: 100
        actions:
          description: The HTTP Methods that can be performed on the link.
          type: array
          additionalProperties: false
          maxItems: 20
          items:
            type: string
            pattern: "^(GET|POST|PUT|DELETE|PATCH)$"
            maxLength: 100
            enum:
              - GET
              - POST
              - PUT
              - DELETE
              - PATCH
        types:
          description: The Content Types for the link to the resource
          type: array
          additionalProperties: false
          items:
            type: string
            maxLength: 100
            pattern: '^application\/.*$'
    IssuingNotFoundError:
      type: object
      properties:
        request_id:
          type: string
          example: 0HLHPN8802NUF:00000003
        error_type:
          type: string
          example: not_found
        error_codes:
          type: array
          items:
            type: string
            example: card_not_found
    IssuingParentCardId:
      type: string
      pattern: "^crd_[a-z0-9]{26}$"
      description: When a card is renewed, the unique identifier of the previous card in the renewal history.
      maxLength: 30
      minLength: 30
      example: crd_qm26t52qz3yejjo2t4btqvxtzi
    IssuingPhoneNumber:
      type: object
      description: The cardholder's mobile phone number. This is used in the card tokenization one-time passcode (OTP) challenge flow and in delivery details for physical cards.
      properties:
        country_code: 
          type: string
          description: The international <a href="https://docs.checkout.com/resources/codes/country-codes" target="blank">country calling code</a>.
          minLength: 1
          maxLength: 7
          example: "+1"
        number:
          type: string
          description: A valid phone number without leading zeros.
          minLength: 6
          maxLength: 25
          example: 415 555 2671
    IssuingReference:
      type: string
      description: Your reference.
      example: X-123456-N11
      maxLength: 256
    IssuingRootCardId:
      type: string
      pattern: "^crd_[a-z0-9]{26}$"
      description: When a card is renewed, the unique identifier of the first card in the renewal history.
      maxLength: 30
      minLength: 30
      example: crd_fa6psq242dcd6fdn5gifcq1491
    IssuingSchemeCardId:
      type: string
      description: The ID that the card scheme’s token service provider (TSP) assigns to the PAN at the first tokenization.
      example: FAPLMC00002572060f2b2213c3964c44b218665ef9dd0d72
      maxLength: 128
    IssuingShippingContact:
      type: object
      required:
        - first_name
        - last_name
        - phone_number
      properties:
        first_name:
          type: string
          description: The cardholder's first name.
          example: John
          pattern: ^[a-zA-Z'\- ]{1,40}$
          minLength: 1
          maxLength: 40
        last_name:
          type: string
          description: The cardholder's last name.
          example: Kennedy
          pattern: ^[a-zA-Z'\- ]{1,40}$
          minLength: 1
          maxLength: 40
        phone_number:
          allOf:
            - $ref: '#/components/schemas/IssuingPhoneNumber'
    IssuingShippingInstruction:
      type: object
      required:
      - shipping_address
      properties:
        shipping_address:
          allOf:
          - $ref: '#/components/schemas/IssuingAddress'
          description: The address to ship the physical card to.
        shipping_recipient:
          type: string
          description: The name of the person the card will be shipped to.
          deprecated: true
          minLength: 1
          maxLength: 256
          example: john kennedy
        additional_comment:
          description: Any additional comment on shipping.
          deprecated: true
          type: string
          maxLength: 256
          minLength: 1
    IssuingUserId:
      type: string
      pattern: "^usr_[a-z0-9]{26}$"
      description: The Dashboard user's unique identifier.
      maxLength: 30
      minLength: 30
      example: usr_fa6psq242dcd6fdn5gifcq1491
    IssuingValidationError:
      type: object
      additionalProperties: false
      properties:
        request_id:
          type: string
          example: 0HLHPN8802NUF:00000003
        error_type:
          type: string
          example: request_invalid
        error_codes:
          type: array
          maxItems: 20
          items:
            type: string
            example: request_body_malformed
    cko-request-id:
      type: string
      description: ID to correlate requests.
      example: 3729b06b-5a63-4425-bc34-23dfc158ddfe
    add-control-group-mcc-limit-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-control-group-request-control'
        - type: object
          properties:
            mcc_limit:
              $ref: '#/components/schemas/MccLimit'
      required:
        - mcc_limit
    add-control-group-mid-limit-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-control-group-request-control'
        - type: object
          properties:
            mid_limit:
              $ref: '#/components/schemas/MidLimit'
      required:
        - mid_limit
    add-control-group-request-control:
      type: object
      description: The control to create.
      discriminator:
        propertyName: control_type
        mapping:
          velocity_limit: '#/components/schemas/add-control-group-velocity-limit-request'
          mcc_limit: '#/components/schemas/add-control-group-mcc-limit-request'
          mid_limit: '#/components/schemas/add-control-group-mid-limit-request'
      required:
        - control_type
      properties:
        description:
          type: string
          maxLength: 256
          description: A description for the control.
        control_type:
          $ref: '#/components/schemas/IssuingControlType'
    add-control-group-request:
      type: object
      description: The control group to create.
      required:
      - target_id
      - fail_if
      - controls
      properties:
        description:
          type: string
          maxLength: 256
          description: A description for the control group.
        target_id:
          $ref: '#/components/schemas/IssuingTargetIdForAdd'
        fail_if:
          $ref: '#/components/schemas/ControlGroupCondition'
        controls:
          type: array
          description: The controls that belong to the group.
          items:
            $ref: '#/components/schemas/add-control-group-request-control'
      example:
        description: Block grocery shopping except Walmart
        fail_if: all_fail
        target_id: crd_fa6psq42dcdd6fdn5gifcq1491
        controls:
        - description: Block the card being used for groceries
          control_type: mcc_limit
          mcc_limit:
            type: block
            mcc_list:
            - '5422'
        - description: Allow the card to be used at Walmart
          control_type: mid_limit
          mid_limit:
            type: allow
            mid_list:
            - '1234'
    add-control-group-response:
      type: object
      description: The control group's details.
      required:
      - id
      - target_id
      - fail_if
      - controls
      - is_editable
      - created_date
      - last_modified_date
      - _links
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlGroupId'
        description:
          type: string
          maxLength: 256
          description: A description for the control group.
        target_id:
          $ref: '#/components/schemas/IssuingTargetId'
        fail_if:
          $ref: '#/components/schemas/ControlGroupCondition'
        controls:
          type: array
          description: The controls that belong to the group.
          items:
            $ref: '#/components/schemas/add-control-group-request-control'
        is_editable:
          $ref: '#/components/schemas/ControlGroupIsEditable'
        created_date:
          type: string
          format: date-time
        last_modified_date:
          type: string
          format: date-time
        _links:
          allOf:
          - $ref: '#/components/schemas/ControlGroupLinks'
      example:
        id: cgr_oemoyd3otivelkhf4zcnimwdva
        description: Block grocery shopping except Walmart
        target_id: crd_dba7tjsh7utufgid7yety4gnxq
        fail_if: all_fail
        controls:
        - mcc_limit:
            type: block
            mcc_list:
            - '5422'
          description: Block the card being used for groceries
          control_type: mcc_limit
        - mid_limit:
            type: allow
            mid_list:
            - '1234'
          description: Allow the card to be used at Walmart
          control_type: mid_limit
        is_editable: true
        created_date: '2023-12-06T14:01:31.7155085Z'
        last_modified_date: '2023-12-06T14:01:31.7155085Z'
        _links:
          self:
            href: https://{prefix}.api.checkout.com/issuing/controls/control-groups/cgr_oemoyd3otivelkhf4zcnimwdva
            actions:
            - GET
            types:
            - application/json
    add-control-group-velocity-limit-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-control-group-request-control'
        - type: object
          properties:
            velocity_limit:
              $ref: '#/components/schemas/VelocityLimit'
      required:
        - velocity_limit
    add-control-profile-request:
      type: object
      description: The control profile to create
      required:
        - name
      properties:
        name:
         type: string
         description: Control profile name.  
      example:
        {
          "name": "Low Risk MCC Profile"
        }
    add-control-profile-target-response:
      type: object
      properties:
        _links:
          allOf:
            - $ref: '#/components/schemas/ControlProfileLinks'
    add-update-control-profile-response:
      type: object
      description: The control profile's details.
      required:
        - id
        - name
        - created_date
        - last_modified_date
        - _links
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlProfileId'
        name:
          type: string
          maxLength: 256
          description: Control profile name.
        created_date:
          type: string
          format: date-time
          description: Creation date of the control profile.
        last_modified_date:
          type: string
          format: date-time
        _links:
          allOf:
            - $ref: '#/components/schemas/ControlProfileLinks'
      example:
        {
            "id": "cpr_j4mvlui5qotufgvaeqwhvlbfna",
            "name": "Low Risk MCC Profile",
            "created_date": "2024-03-12T18:13:45.7155085Z",
            "last_modified_date": "2024-03-12T18:13:45.7155085Z",
            "_links": {
                "self": {
                    "href": "https://{prefix}.api.checkout.com/issuing/controls/control-profiles/cpr_j4mvlui5qotufgvaeqwhvlbfna",
                    "actions": [
                        "GET"
                    ],
                    "types": [
                        "application/json"
                    ]
                }
            }
        }
    add-control-request:
      type: object
      description: The control to create.
      discriminator:
        propertyName: control_type
        mapping:
          velocity_limit: '#/components/schemas/velocity-limit-request'
          mcc_limit: '#/components/schemas/mcc-limit-request'
          mid_limit: '#/components/schemas/mid-limit-request'
      required:
      - control_type
      - target_id
      properties:
        description:
          type: string
          maxLength: 256
          description: A description for the control.
        control_type:
          $ref: '#/components/schemas/IssuingControlType'
        target_id:
          $ref: '#/components/schemas/IssuingTargetIdForAdd'
    add-control-response:
      type: object
      description: The control's details.
      discriminator:
        propertyName: control_type
        mapping:
          velocity_limit: '#/components/schemas/velocity-limit-response'
          mcc_limit: '#/components/schemas/mcc-limit-response'
          mid_limit: '#/components/schemas/mid-limit-response'
      required:
      - id
      - control_type
      - target_id
      - is_editable
      - created_date
      - last_modified_date
      - _links
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlId'
        description:
          type: string
          maxLength: 256
          description: A description for the control.
        control_type:
          $ref: '#/components/schemas/IssuingControlType'
        target_id:
          $ref: '#/components/schemas/IssuingTargetId'
        is_editable:
          $ref: '#/components/schemas/ControlIsEditable'
        created_date:
          type: string
          format: date-time
          example: '2023-03-12T18:20:12Z'
        last_modified_date:
          type: string
          format: date-time
          example: '2023-03-12T18:20:12Z'
        _links:
          allOf:
          - $ref: '#/components/schemas/ControlLinks'
    mcc-limit-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-control-request'
        - type: object
          properties:
            mcc_limit:
              $ref: '#/components/schemas/MccLimit'
      required:
        - mcc_limit
    mcc-limit-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-control-response'
        - type: object
          properties:
            mcc_limit:
              $ref: '#/components/schemas/MccLimit'
      required:
        - mcc_limit
    mid-limit-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-control-request'
        - type: object
          properties:
            mid_limit:
              $ref: '#/components/schemas/MidLimit'
      required:
        - mid_limit
    mid-limit-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-control-response'
        - type: object
          properties:
            mid_limit:
              $ref: '#/components/schemas/MidLimit'
      required:
        - mid_limit
    velocity-limit-request:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-control-request'
        - type: object
          properties:
            velocity_limit:
              $ref: '#/components/schemas/VelocityLimit'
      required:
        - velocity_limit
    velocity-limit-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/add-control-response'
        - type: object
          properties:
            velocity_limit:
              $ref: '#/components/schemas/VelocityLimit'
      required:
        - velocity_limit
    get-control-group-response:
      type: object
      description: The control group's details.
      required:
      - id
      - target_id
      - fail_if
      - controls
      - is_editable
      - created_date
      - last_modified_date
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlGroupId'
        description:
          type: string
          maxLength: 256
          description: A description for the control group.
        target_id:
          $ref: '#/components/schemas/IssuingTargetId'
        fail_if:
          $ref: '#/components/schemas/ControlGroupCondition'
        controls:
          type: array
          description: The controls that belong to the group.
          items:
            $ref: '#/components/schemas/add-control-group-request-control'
        is_editable:
          $ref: '#/components/schemas/ControlGroupIsEditable'
        created_date:
          type: string
          format: date-time
        last_modified_date:
          type: string
          format: date-time
    get-control-groups-array-response:
      type: object
      description: The list of control groups applied to the specified target.
      required:
        - control_groups
      properties:
        control_groups:
          type: array
          description: The list of control groups applied to the specified target.
          items:
            $ref: '#/components/schemas/get-control-group-response'
          example:
            - {
              "id": "cgr_oemoyd3otivelkhf4zcnimwdva",
              "description": "Block grocery shopping except Walmart",
              "target_id": "crd_dba7tjsh7utufgid7yety4gnxq",
              "fail_if": "all_fail",
              "controls": [
                {
                  "mcc_limit": {
                    "type": "block",
                    "mcc_list": [
                      "5422"
                    ]
                  },
                  "description": "Block the card being used for groceries",
                  "control_type": "mcc_limit"
                },
                {
                  "mid_limit": {
                    "type": "allow",
                    "mid_list": [
                      "1234"
                    ]
                  },
                  "description": "Allow the card to be used at Walmart",
                  "control_type": "mid_limit"
                }
              ],
              "is_editable": true,
              "created_date": "2023-12-06T14:01:31.7155085Z",
              "last_modified_date": "2023-12-06T14:01:31.7155085Z"
            }
            - {
              "id": "cgr_xvrszbgkaifuflnslzkt2uimkm",
              "description": "Allow restaurants except McDonalds",
              "target_id": "crd_dba7tjsh7utufgid7yety4gnxq",
              "fail_if": "all_fail",
              "controls": [
                {
                  "mcc_limit": {
                    "type": "allow",
                    "mcc_list": [
                      "6789"
                    ]
                  },
                  "description": "Allow the card being used for restaurants",
                  "control_type": "mcc_limit"
                },
                {
                  "mid_limit": {
                    "type": "block",
                    "mid_list": [
                      "9876"
                    ]
                  },
                  "description": "Block the card to be used at McDonalds",
                  "control_type": "mid_limit"
                }
              ],
              "is_editable": true,
              "created_date": "2023-12-06T14:01:31.7155085Z",
              "last_modified_date": "2023-12-06T14:01:31.7155085Z"
            }
    get-control-profile-response:
      type: object
      description: The control profile's details.
      required:
        - id
        - name
        - created_date
        - last_modified_date
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlProfileId'
        name:
          type: string
          maxLength: 256
          description: Control profile name.
        created_date:
          type: string
          format: date-time
          description: Creation date of the control profile.
        last_modified_date:
          type: string
          format: date-time
          description: Last modified date of the control profile.
    get-control-profiles-client-response:
      type: object
      description: The list of control profiles for the specified client.
      required:
        - control_profiles
      properties:
        control_profiles:
          type: array
          description: The list of control profiles for the specified client.
          items:
            $ref: '#/components/schemas/get-control-profile-response'
          example:
            - {
              "id": "cpr_j4mvlui5qotufgvaeqwhvlbfna",
              "name": "Low Risk MCC Profile",
              "created_date": "2024-03-12T18:13:45.7155085Z",
              "last_modified_date": "2024-03-13T15:44:56.7155085Z",
            }
            - {
              "id": "cpr_53mkhdc4jjlu5jcryx76bjbrgm",
              "name": "Medium Risk MCC Profile",
              "created_date": "2024-05-05T10:43:13.7155085Z",
              "last_modified_date": "2024-06-17T06:32:18.7155085Z",
            }
            - {
              "id": "cpr_j4ma3rclvgcu3pn5tsdgb3e3a4",
              "name": "High Risk MCC Profile",
              "created_date": "2024-02-29T12:55:55.7155085Z",
              "last_modified_date": "2024-03-01T10:12:12.7155085Z",
            }
    get-control-mcc-limit-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/get-control-response'
        - type: object
          properties:
            mcc_limit:
              $ref: '#/components/schemas/MccLimit'
    get-control-mid-limit-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/get-control-response'
        - type: object
          properties:
            mid_limit:
              $ref: '#/components/schemas/MidLimit'
    get-control-response:
      type: object
      description: The control's details.
      discriminator:
        propertyName: control_type
        mapping:
          velocity_limit: '#/components/schemas/get-control-velocity-limit-response'
          mcc_limit: '#/components/schemas/get-control-mcc-limit-response'
          mid_limit: '#/components/schemas/get-control-mid-limit-response'
      required:
      - id
      - target_id
      - description
      - control_type
      - is_editable
      - created_date
      - last_modified_date
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlId'
        target_id:
          $ref: '#/components/schemas/IssuingTargetId'
        description:
          type: string
          maxLength: 256
          description: A description for the control.
          example: Max spend of 500€ per week for restaurants
        control_type:
          $ref: '#/components/schemas/IssuingControlType'
        is_editable:
          $ref: '#/components/schemas/ControlIsEditable'
        created_date:
          $ref: '#/components/schemas/Datetime'
        last_modified_date:
          $ref: '#/components/schemas/Datetime'
    get-control-velocity-limit-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/get-control-response'
        - type: object
          properties:
            velocity_limit:
              $ref: '#/components/schemas/VelocityLimitWithRemainingAmount'
    get-controls-array-response:
      type: object
      description: The list of controls applied to the specified target.
      required:
        - controls
      properties:
        controls:
          type: array
          description: The list of controls applied to the specified target.
          items:
            $ref: '#/components/schemas/get-control-response'
          example:
            - {
                "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
                "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
                "description": "Maximum spend of 500€ per week for restaurants",
                "control_type": "velocity_limit",
                "is_editable": true,
                "created_date": "2021-09-09T19:41:39Z",
                "last_modified_date": "2021-09-09T19:41:39Z",
                "velocity_limit": {
                  "amount_remaining": 45000,
                  "amount_limit": 50000,
                  "velocity_window": {
                    "type": "weekly"
                  },
                  "mcc_list": [
                    "4121",
                    "4582"
                  ]
                }
              }
            - {
                "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
                "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
                "description": "Allow the card to be used only in restaurants and supermarkets",
                "control_type": "mcc_limit",
                "is_editable": true,
                "created_date": "2021-09-09T19:41:39Z",
                "last_modified_date": "2021-09-09T19:41:39Z",
                "mcc_limit": {
                  "type": "allow",
                  "mcc_list": [
                    "5932",
                    "5411"
                  ]
                }
              }
            - {
                "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
                "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
                "description": "Allow the card to be used only in AZ Pizza",
                "control_type": "mid_limit",
                "is_editable": true,
                "created_date": "2021-09-09T19:41:39Z",
                "last_modified_date": "2021-09-09T19:41:39Z",
                "mid_limit": {
                  "type": "allow",
                  "mid_list": [
                    "593278",
                    "541114"
                  ]
                }
              }
    ControlGroupCondition:
      type: string
      enum: [all_fail, any_fail]
      description: Sets how to determine the result of the group.
      example: all_fail
    ControlGroupIsEditable:
      type: boolean
      description: Indicates whether the control group is set to readonly. 
        Control groups marked as non-editable are predefined by Checkout and are not modifiable by clients.
      example: true
    ControlGroupLinks:
      type: object
      description: The links related to the control group.
      minItems: 1
      required:
        - self
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the control group's details.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/controls/control-groups/cgr_oemoyd3otivelkhf4zcnimwdva"
          actions:
            - GET
          types:
            - application/json
    ControlIsEditable:
      type: boolean
      description: Indicates whether you can change this control. <br> `false` This is an immutable control applied by Checkout.com and you cannot change it. <br> `true` You applied this control and can change it. 
      example: true
    ControlLinks:
      type: object
      description: The links related to the control.
      minItems: 1
      required:
        - self
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the control's details.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/controls/ctr_mbvprn5bm27ubh4c5rq5tha2wy"
          actions:
            - GET
          types:
            - application/json
    ControlProfileLinks:
      type: object
      description: The links related to the control profile.
      minItems: 1
      required:
        - self
      properties:
        self:
          allOf:
            - $ref: '#/components/schemas/IssuingLink'
          type: object
          description: The URI to retrieve the control profile's details.
      example:
        self:
          href: "https://{prefix}.api.checkout.com/issuing/controls/control-profiles/cpr_j4mvlui5qotufgvaeqwhvlbfna"
          actions:
            - GET
          types:
            - application/json
    IssuingControlGroupId:
      type: string
      pattern: "^cgr_[a-z0-9]{26}$"
      description: The control group's unique identifier.
      maxLength: 30
      minLength: 30
      example: cgr_oemoyd3otivelkhf4zcnimwdva
    IssuingControlId:
      type: string
      pattern: "^ctr_[a-z0-9]{26}$"
      description: The control's unique identifier.
      maxLength: 30
      minLength: 30
      example: ctr_gp7vkmxayztufjz6top5bjcdra
    IssuingControlProfileId:
      type: string
      pattern: "^cpr_[a-z0-9]{26}$"
      description: The control profile's unique identifier.
      maxLength: 30
      minLength: 30
      example: cpr_j4mvlui5qotufgvaeqwhvlbfna
    IssuingControlType:
      type: string
      enum: [velocity_limit, mcc_limit, mid_limit]
      description: |
        The control's type.
        
        A `velocity_limit` determines how much can be spent over a given period of time. An `mcc_limit` determines the types of businesses from which transactions can be processed. A `mid_limit` specifies the merchants from whom transactions can be processed.
      example: velocity_limit
    IssuingTargetId:
      type: string
      pattern: ^(crd|cpr)_[a-z0-9]{26}$
      description: The ID of the card or control profile.
      maxLength: 30
      minLength: 30
      example: crd_fa6psq42dcdd6fdn5gifcq1491
    IssuingTargetIdForAdd:
      type: string
      pattern: ^(crd|cpr)_[a-z0-9]{26}$
      description: The ID of the card or control profile to apply the control to. Note that control profiles cannot be a target for `velocity_limit` controls.
      maxLength: 30
      minLength: 30
      example: crd_fa6psq42dcdd6fdn5gifcq1491
    IssuingTargetIdToAddToControlProfile:
      type: string
      pattern: ^crd_[a-z0-9]{26}$
      description: The ID of the card to apply the control profile to.
      maxLength: 30
      minLength: 30
      example: crd_fa6psq42dcdd6fdn5gifcq1491
    IssuingTargetIdToRemoveFromControlProfile:
      type: string
      pattern: ^crd_[a-z0-9]{26}$
      description: The ID of the card the control profile should no longer apply to.
      maxLength: 30
      minLength: 30
      example: crd_fa6psq42dcdd6fdn5gifcq1491
    MccLimit:
      type: object
      description: The <a href= "https://www.checkout.com/docs/resources/codes/merchant-category-codes">merchant category code (MCC)</a> rule, which determines the types of businesses transactions can be processed from.
      required:
        - mcc_list
        - type
      properties:
        type:
          type: string
          enum: [allow, block]
          description: Sets whether to allow or block the list of MCCs supplied.
          example: allow
        mcc_list:
          type: array
          description: The list of <a href= "https://www.checkout.com/docs/resources/codes/merchant-category-codes">MCCs</a> to allow or block transactions from, as 4-digit ISO 18245 codes.
          example: ["5932", "5411"]
          items:
            type: string
    MidCode:
      type: string
      pattern: ^[A-Za-z0-9{}\[\] ,+\-=.();'\/&@*]{1,15}$
      minLength: 1
      maxLength: 15
    MidLimit:
      type: object
      description: The merchant identification (MID) code rule, which determines the merchants from whom transactions can be processed.
      required:
        - mid_list
        - type
      properties:
        type:
          type: string
          enum: [allow, block]
          description: Sets whether to allow or block the list of MIDs supplied.
          example: allow
        mid_list:
          type: array
          description: The list of merchant identification (MID) codes to allow or block transactions from.
          example: ["593278", "541114"]
          items:
            $ref: '#/components/schemas/MidCode'
    VelocityLimit:
      type: object
      description: The velocity limit, which determines how much a target card can spend
        over a given timeframe.
      required:
      - velocity_window
      - amount_limit
      properties:
        amount_limit:
          type: integer
          format: int64
          description: The amount the target can spend, in minor units.
          example: 50000
          minimum: 0
        velocity_window:
          $ref: '#/components/schemas/VelocityWindow'
        mcc_list:
          type: array
          description: The list of <a href= "https://www.checkout.com/docs/resources/codes/merchant-category-codes">merchant
            category codes</a> (MCCs) that the velocity limit applies to, as four-digit
            ISO 18245 codes.
          items:
            type: string
        mid_list:
          type: array
          description: The list of merchant identification (MID) codes to allow or block
            transactions from. <br/> You can provide either `mcc_list` or `mid_list`, but
            not both.
          example:
          - '1234567890'
          items:
            $ref: '#/components/schemas/MidCode'
    VelocityLimitWithRemainingAmount:
      type: object
      description: The velocity limit, which determines how much a target card can spend
        over a given timeframe.
      required:
      - velocity_window
      - amount_remaining
      - amount_limit
      properties:
        amount_remaining:
          type: integer
          format: int64
          description: The remaining amount that can be spent, in minor units.
          example: 45000
          minimum: 0
        amount_limit:
          type: integer
          format: int64
          description: The amount that can be spent, in minor units.
          example: 50000
          minimum: 0
        velocity_window:
          $ref: '#/components/schemas/VelocityWindow'
        mcc_list:
          type: array
          description: The list of <a href= "https://www.checkout.com/docs/resources/codes/merchant-category-codes">merchant
            category codes</a> (MCCs) that the velocity limit applies to, as four-digit
            ISO 18245 codes.
          example:
          - '4121'
          - '4582'
          items:
            type: string
        mid_list:
          type: array
          description: The list of merchant identification (MID) codes to allow or block
            transactions from. <br/> You can provide either `mcc_list` or `mid_list`, but
            not both.
          example:
          - '1234567890'
          items:
            type: string
    VelocityWindow:
      type: object
      description: The period of time over which the specified `amount_limit` can be spent.
      required:
        - type
      properties:
        type:
          type: string
          enum: [daily, weekly, monthly, all_time]
          description: The velocity window's unit of time.
          example: weekly
    remove-control-group-response:
      type: object
      description: The control groups's details.
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlGroupId'
    remove-control-profile-target-response:
      type: object
      properties:
        _links:
          allOf:
            - $ref: '#/components/schemas/ControlProfileLinks'
    remove-control-response:
      type: object
      description: The control's details.
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlId'
    update-control-profile-request:
      type: object
      description: |
        The control profile to update.
      properties:
        name:
          type: string
          maxLength: 256
          description: The control profile name.
          example: Low Risk MCC Profile
    update-control-request-mcc-limit:
      type: object
      description: 'The control you want to update.
      
      
        You can update only one control per request.
      
        '
      properties:
        description:
          type: string
          maxLength: 256
          description: A description for the control.
          example: Allow the card to be used only in restaurants and supermarkets
        mcc_limit:
          $ref: '#/components/schemas/MccLimit'
    update-control-request-mid-limit:
      type: object
      description: 'The control you want to update.
      
      
        You can only update one control per request.
      
        '
      properties:
        description:
          type: string
          maxLength: 256
          description: A description for the control.
          example: Allow the card to be used only in AZ Pizza
        mid_limit:
          $ref: '#/components/schemas/MidLimit'
    update-control-request-velocity-limit:
      type: object
      description: 'The control you want to update.
      
      
        You can only update one control per request.
      
        '
      properties:
        description:
          type: string
          maxLength: 256
          description: A description for the control.
          example: Max spend of 500€ per week for restaurants
        velocity_limit:
          type: object
          description: The velocity limit, which determines how much a card can spend over
            a given period of time.
          properties:
            amount_limit:
              type: integer
              format: int64
              description: The amount that can be spent using the card, in minor units.
              example: 50000
              minimum: 0
            mcc_list:
              type: array
              description: The list of <a href= "https://www.checkout.com/docs/resources/codes/merchant-category-codes">merchant
                category codes (MCCs)</a> that the velocity limit applies to, as 4-digit
                ISO 18245 codes.
              example:
              - '4121'
              - '4582'
              items:
                type: string
            mid_list:
              type: array
              description: The list of merchant identification (MID) codes to allow or block
                transactions from. Note that `mcc_list` and `mid_list` cannot be set together.
              example:
              - '1234567890'
              items:
                type: string
    update-control-response:
      type: object
      description: The control's details.
      discriminator:
        propertyName: control_type
        mapping:
          velocity_limit: '#/components/schemas/get-control-velocity-limit-response'
          mcc_limit: '#/components/schemas/get-control-mcc-limit-response'
          mid_limit: '#/components/schemas/get-control-mid-limit-response'
      required:
      - id
      - control_type
      - target_id
      - is_editable
      - created_date
      - last_modified_date
      properties:
        id:
          $ref: '#/components/schemas/IssuingControlId'
        description:
          type: string
          maxLength: 256
          description: The description of the control.
          example: Max spend of 500€ per week for restaurants
        control_type:
          $ref: '#/components/schemas/IssuingControlType'
        target_id:
          $ref: '#/components/schemas/IssuingTargetId'
        is_editable:
          $ref: '#/components/schemas/ControlIsEditable'
        created_date:
          $ref: '#/components/schemas/Datetime'
        last_modified_date:
          $ref: '#/components/schemas/Datetime'
    amend-dispute-request:
      type: object
      description: |
        Submit an amendment to a dispute that is currently blocked from proceeding. This endpoint
        handles both chargeback-stage and escalation-stage amendments using the same flat payload
        as the server determines the context from the dispute's current state.
      
        Refer to the `action_details` returned in the <a target="_blank" href="https://api-reference.checkout.com/tag/Issuing-disputes#operation/getDispute">Get issuing dispute</a> endpoint to view the instructions provided by the Dispute Resolution team and the deadline by which you must submit amendments.
      
        If `reason` specifies a fraud-related dispute, you must provide `fraud_details`.
        If you change the `reason` at the escalation stage,  you must provide `reason_change_justification`.
      properties:
        reason:
          type: string
          description: |
            The updated four-digit scheme-specific [reason code](https://www.checkout.com/docs/developer-resources/codes/chargeback-codes#Mastercard).
            If a value is not provided, the existing reason code is retained.
          example: '4807'
        amount:
          type: number
          description: |
            The updated disputed amount, in the [minor unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount)
            of the transaction currency. If not provided, the existing amount is retained.
          example: 1500
        evidence:
          type: array
          items:
            $ref: '#/components/schemas/IssuingDisputeEvidence'
          description: |
            The updated or additional evidence requested by the Dispute Resolution team.
            Follow the [card scheme's requirements](https://www.checkout.com/docs/card-issuing/manage-cardholder-transactions/manage-issuing-disputes#Evidence_file_requirements).
        fraud_details:
          description: |
            Provides the fraud category, and additional context if available.
            
            This field is required if `reason` specifies a fraud-related dispute.
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeFraudDetails'
        reason_change_justification:
          type: string
          maxLength: 13000
          description: |
            Explains the justification for the reason change. This is shared with the Dispute Resolution review team and may be submitted to the card scheme.
            This field is required if you change the `reason` at the escalation stage.
          example: New evidence confirms this was an unauthorized transaction, making reason 4837 more appropriate.
        action_response:
          type: string
          maxLength: 1000
          description: |
            Free-form text that you can use to explain your choices, provide additional context, or ask questions about the requested changes.
          example: Updated reason as requested. The cardholder confirmed the goods were never delivered.
    create-dispute-request:
      type: object
      required:
        - transaction_id
        - reason
      properties:
        transaction_id:
          $ref: '#/components/schemas/IssuingTransactionId'
        reason:
          description: |
            The four-digit scheme-specific [reason code](https://www.checkout.com/docs/developer-resources/codes/chargeback-codes#Mastercard) for the chargeback.
            Only provide this if Checkout.com is your issuing processor.
            Checkout.com does not validate this value.
          type: string
          example: '4807'
        evidence:
          type: array
          items:
            $ref: '#/components/schemas/IssuingDisputeEvidence'
          description: |
              Your evidence for raising the chargeback, in line with the [card scheme's requirements](https://www.checkout.com/docs/card-issuing/manage-cardholder-transactions/manage-issuing-disputes#Evidence_file_requirements).
        amount:
          description: |
            The chargeback amount, in the [minor unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount) of the transaction currency. <br/>
            If not provided, Checkout.com uses the full amount of the presentment.
          type: number
          example: 100
        presentment_message_id:
          allOf:
            - $ref: '#/components/schemas/IssuingMessageId'
          description: |
            The unique identifier for the disputed presentment message. <br/> <br/>
            If the transaction has multiple presentments, you must provide this field to specify the presentment you want to dispute. <br/><br/>
            If the transaction has only one presentment, you do not need to provide this field because Checkout.com uses that presentment automatically. <br/>
          type: string
        fraud_details:
          description: |
            Contains all fraud-related information to be sent with the chargeback.
            
            This field is required if the dispute has a fraud-related reason code.
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeFraudDetails'
        justification:
          type: string
          maxLength: 100
          description: |
            Short justification for raising this dispute, to be sent to the scheme.
    create-dispute-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/IssuingDispute'
    escalate-dispute-request:
      type: object
      required:
        - justification
      properties:
        additional_evidence:
          type: array
          items:
            $ref: '#/components/schemas/IssuingDisputeEvidence'
          description: |
              Your evidence for escalating the dispute, in line with the [card scheme's requirements](https://www.checkout.com/docs/card-issuing/manage-cardholder-transactions/manage-issuing-disputes#Evidence_file_requirements).
              If the request goes to arbitration, the card scheme ignores any evidence you provide at this stage using this request.
        amount:
          description: The updated disputed amount, in the [minor unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount) of the representment currency.
          type: number
          example: 100
        reason_change:
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeReasonChange'
        fraud_details:
          description: |
            Provides fraud-related details.
            
             This field is required if the dispute has a fraud-related reason code at the escalation stage, or after a requested reason code change to a fraud code.
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeFraudDetails'
        justification:
          type: string
          maxLength: 13000
          description: |
            Justification for escalating the dispute.
    get-dispute-response:
      type: object
      description: The client's dispute response.
      allOf:
        - $ref: '#/components/schemas/IssuingDispute'
    IssuingDispute:
      type: object
      description: The client's dispute view.
      properties:
        id:
          description: The unique identifier for the Issuing dispute.
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeId'
        reason:
          description: The four-digit scheme-specific [reason code](https://www.checkout.com/docs/developer-resources/codes/chargeback-codes#Mastercard) you provide for the chargeback.
          type: string
          example: '4802'
        disputed_amount:
          description: The disputed amount, in the [minor unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount) of the transaction currency.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
        status:
          $ref: '#/components/schemas/IssuingDisputeStatus'
        status_reason:
          $ref: '#/components/schemas/IssuingDisputeStatusReason'
        transaction_id:
          description: The unique Checkout.com identifier for the transaction.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionId'
        presentment_message_id:
          description: The unique identifier for the disputed presentment message.
          allOf:
            - $ref: '#/components/schemas/IssuingMessageId'
        merchant:
          description: The details of the merchant you raised the dispute with.
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeMerchant'
        created_on:
          type: string
          format: date-time
          description: The date and time when the dispute was created, in UTC. <br/>Format – ISO 8601 code <br/>Example – `2025-01-31T10:20:30.456`
        modified_on:
          type: string
          format: date-time
          description: The date and time when the dispute was last modified, in UTC. <br/>Format – ISO 8601 code <br/>Example – `2025-01-31T10:20:30.456`
        action_details:
          $ref: '#/components/schemas/IssuingDisputeActionDetails'
        chargeback:
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeChargeback'
        representment:
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeSecondPresentment'
        pre_arbitration:
          allOf:
            - $ref: '#/components/schemas/IssuingDisputePreArbitration'
        arbitration:
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeArbitration'
        _links:
          type: object
          description: The links related to the dispute.
          properties:
            self:
              description: The URI for the dispute.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
            card:
              description: The URI for the card used for the disputed transaction.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
            cardholder:
              description: The URI for the cardholder who requested the chargeback.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
            transaction:
              description: The URI for the disputed transaction.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
            amend:
              description: |
                The URI to amend and resubmit the dispute, if the dispute `status` is `action_required`.
                
                 Refer to `action_details` for the required amendments.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
            escalate:
              description: The URI for escalating the Issuing dispute.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
            cancel:
              description: The URI to cancel the dispute.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
    IssuingDisputeActionDetails:
      type: object
      description: |
        Provides instructions on the amendments required before the dispute can proceed, if the dispute `status` is `action_required`.
      
        Use the <a target="_blank" href="https://api-reference.checkout.com/tag/Issuing-disputes#operation/amendDispute">Amend an Issuing dispute</a> endpoint to submit your amendments.
        Use the correct endpoint to send your updates as requested.
      properties:
        instructions:
          type: string
          description: |
            The amendments required before the dispute can proceed. For example, if you need to provide a reason code, or update the submitted evidence.
        last_action_response:
          type: string
          description: |
            Specifies whether the dispute was previously amended and an action response was provided.
    IssuingDisputeArbitration:
      type: object
      description: The dispute details during the arbitration stage.
      properties:
        submitted_on:
          type: string
          format: date-time
          description: The date and time when the arbitration was successfully escalated to the card scheme, in UTC. <br/>Format – ISO 8601 code <br/>Example – `2025-01-31T10:20:30.456`
          example: "2025-09-10T10:11:12Z"
        amount:
          description: The disputed amount at the arbitration stage, in the [minor currency unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount).
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
        justification:
          type: string
          description: Your justification for escalating the dispute to arbitration.
        decided_on:
          type: string
          format: date-time
          description: The date and time when the card scheme decided the arbitration case, in UTC. <br/>Format – ISO 8601 code <br/>Example – `2025-01-31T10:20:30.456`
          example: "2025-01-31T10:20:30Z"
    IssuingDisputeChargeback:
      type: object
      description: The dispute details at the chargeback stage.
      properties:
        submitted_on:
          type: string
          format: date-time
          description: The date and time when the chargeback was successfully submitted to the card scheme, in UTC. <br/>Format – ISO 8601 code <br/>Example – `2025-01-31T10:20:30.456`
          example: "2025-09-10T10:11:12Z"
        reason:
          description: The four-digit scheme-specific [reason code](https://www.checkout.com/docs/developer-resources/codes/chargeback-codes#Mastercard) you provide for the chargeback.
          type: string
          example: '4802'
        amount:
          description: The disputed amount, in the [minor unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount) of the transaction currency.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
        evidence:
          type: array
          items:
            type: object
            required:
              - file_id
            properties:
              file_id:
                allOf:
                  - $ref: '#/components/schemas/IssuingFileId'
                description: The unique identifier for an uploaded file.
              description:
                type: string
                description: A brief description of the evidence.
                example: Goods were not received.
          description: Your evidence for the chargeback.
        justification:
          type: string
          description: A brief description of why the dispute is being raised. This is forwarded to the scheme.
    IssuingDisputeEvidence:
      type: object
      required:
        - name
        - content
      properties:
        name:
          description: The complete file name, including the extension.
          example: evidence.pdf
          type: string
        content:
          description: |
              The base64-encoded string that represents a single JPG, PDF, TIFF, or ZIP file.
              ZIP files can contain multiple JPG, PDF, or TIFF files.
          type: string
        description:
          type: string
          description: A brief description of the evidence.
          example: Goods were not received.
    IssuingDisputeFraudDetails:
      type: object
      description: Fraud-related information required when the dispute reason code is fraud-related.
      required:
        - fraud_type
      properties:
        fraud_type:
          type: string
          description: |
            The type of fraud the cardholder is asserting. This can be one of:
              - `card_lost`: The cardholder does not have the physical card and cannot explain how it was lost.
              - `card_stolen`: The cardholder does not have the physical card and provided an explanation as to how it was lost. For example, their wallet was stolen.
              - `card_never_received`: The card was issued and mailed but was not received by the cardholder.
              - `fraudulent_account`: The account was opened fraudulently using a stolen, fake, or synthetic identity.
              - `counterfeit_card`: The cardholder has their physical card but a duplicate or altered card was used in an unauthorized card-present transaction.
              - `account_takeover`: A fraudster gained control of the cardholder's account or credentials. For example, they may have changed the registered address, ordered a new card, or provisioned the card to a digital wallet.
              - `card_not_present_fraud`: The cardholder still has the card but the card details were used in an unauthorized card-not-present transaction. For example, it was used in an ecommerce transaction, or in a mail order/telephone order (MOTO) payment.
              - `merchant_misrepresentation`: The merchant deliberately misled the cardholder. For example, the goods provided were sub-standard, there were hidden charges, or the services advertised were fake.
              - `cardholder_manipulation`: The cardholder was tricked into authorizing the transaction themselves. For example, due to a scam, an impersonation, or authorized push payment (APP) fraud.
              - `incorrect_processing`: A security check failed and made fraudulent activity possible. For example, a card verification value (CVV) check was not performed, or the EMV cryptogram was not validated.
              - `other`: The confirmed fraud does not fit any of the other fraud type categories, or there were multiple fraud types applicable to the same transaction.
          enum:
            - card_lost
            - card_stolen
            - card_never_received
            - fraudulent_account
            - counterfeit_card
            - account_takeover
            - card_not_present_fraud
            - merchant_misrepresentation
            - cardholder_manipulation
            - incorrect_processing
            - other
          example: card_not_present_fraud
        description:
          type: string
          description: A description of the fraud circumstances, for internal reference. This is not forwarded to the scheme.
          example: "Cardholder confirmed they made no online purchases on this date."
    IssuingDisputeId:
      type: string
      pattern: "^idsp_[a-z0-9]{26}$"
      description: The unique identifier for the Issuing dispute.
      maxLength: 31
      minLength: 31
      example: idsp_fa6psq242dcd6fdn5gifcq1491
    IssuingDisputeMerchant:
      type: object
      properties:
        id:
          type: string
          description: The merchant's identifier. This can vary from one acquirer to another.
          example: (*)123456789
        name:
          type: string
          description: The merchant's name.
          example: Software Company
        city:
          type: string
          description: The city where the merchant is located.
          example: Paris
        state:
          type: string
          description: The state where the merchant is located (US only).
          example: ""
        country_code:
          type: string
          description: The two-digit [country code](https://www.checkout.com/docs/developer-resources/codes/country-codes) where the merchant is located.
          example: FR
        category_code:
          type: string
          description: |
            The merchant's [category code](https://www.checkout.com/docs/developer-resources/testing/codes/merchant-category-codes) for the disputed transaction.
          example: "5331"
        evidence:
          type: array
          description: Any evidence submitted by the merchant during the dispute lifecycle.
          items:
            $ref: '#/components/schemas/IssuingFileId'
    IssuingDisputePreArbitration:
      type: object
      description: The dispute details at the pre-arbitration stage.
      properties:
        submitted_on:
          type: string
          format: date-time
          description: The date and time when the pre-arbitration was successfully escalated to the card scheme, in UTC. <br/>Format – ISO 8601 code <br/>Example – `2025-01-31T10:20:30.456`
          example: "2025-09-10T10:11:12Z"
        evidence:
          type: array
          items:
            type: object
            required:
              - file_id
            properties:
              file_id:
                allOf:
                  - $ref: '#/components/schemas/IssuingFileId'
                description: The unique identifier for an uploaded file.
              description:
                type: string
                description: A brief description of the evidence.
                example: Goods were not received.
          description: The evidence relating to the Issuing dispute provided at the pre-arbitration stage.
        amount:
          description: The disputed amount at the pre-arbitration stage, in the [minor currency unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount).
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
        reason_change:
          description: The change to the dispute reason and your justification for changing it.
          allOf:
            - $ref: '#/components/schemas/IssuingDisputeReasonChange'
        justification:
          type: string
          description: Your justification for escalating the dispute to pre-arbitration.
        merchant_responded_on:
          type: string
          format: date-time
          description: The date and time when the merchant provided evidence against the pre-arbitration, in UTC. <br/>Format – ISO 8601 code <br/>Example – `2025-01-31T10:20:30.456`
        merchant_evidence:
          type: array
          items:
            type: object
            required:
              - file_id
            properties:
              file_id:
                allOf:
                  - $ref: '#/components/schemas/IssuingFileId'
                description: The unique identifier for an uploaded file.
              description:
                type: string
                description: A brief description of the evidence.
                example: Goods were not received.
            description: |
              The evidence provided by the merchant against the pre-arbitration case.
    IssuingDisputeReasonChange:
      type: object
      description: The change to the dispute reason and your justification for changing it.
      required:
        - reason
        - justification
      properties:
        reason:
          description: |
            The updated four-digit scheme-specific [reason code](https://www.checkout.com/docs/developer-resources/codes/chargeback-codes) for the chargeback.
          type: string
          example: '4807'
        justification:
          type: string
          maxLength: 13000
          description: Your justification for changing the dispute reason.
      
    IssuingDisputeSecondPresentment:
      type: object
      description: The information provided by the merchant when they reject the chargeback and send a representment.
      properties:
        received_on:
          type: string
          format: date-time
          description: The date and time when you received the representment, in UTC. <br/>Format – ISO 8601 code <br/>Example – `2025-01-31T10:20:30.456`
        amount:
          description: The representment amount, in the [minor currency unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount).
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
        evidence:
          type: array
          items:
            type: object
            required:
              - file_id
            properties:
              file_id:
                allOf:
                  - $ref: '#/components/schemas/IssuingFileId'
                description: The unique identifier for an uploaded file.
              description:
                type: string
                description: A brief description of the evidence.
                example: Goods were not received.
          description: The evidence provided by the merchant against the chargeback.
    IssuingDisputeStatus:
      type: string
      description: The [dispute status](https://www.checkout.com/docs/developer-resources/codes/issuing-dispute-codes) as returned to the client.
      enum:
        - created
        - canceled
        - processing
        - action_required
        - won
        - lost
      example: processing
    IssuingDisputeStatusReason:
      type: string
      description: The status reason as returned to the client. An empty string indicates no status reason currently applies.
      enum:
        - ''
        - expired
        - chargeback_pending
        - chargeback_change_requested
        - chargeback_evidence_invalid_or_insufficient
        - chargeback_processed
        - chargeback_rejected
        - chargeback_reversal_pending
        - chargeback_reversed
        - chargeback_response_accepted
        - prearbitration_pending
        - escalation_change_requested
        - prearbitration_evidence_invalid_or_insufficient
        - prearbitration_processed
        - prearbitration_rejected
        - prearbitration_reversal_pending
        - prearbitration_reversed
        - prearbitration_response_accepted
        - arbitration_pending
        - arbitration_processed
        - presentment_reversed
      example: chargeback_processed
    submit-dispute-request:
      type: object
      properties:
        reason:
          description: |
              The updated four-digit scheme-specific [reason code](https://www.checkout.com/docs/developer-resources/codes/chargeback-codes#Mastercard). 
              If not provided, Checkout.com uses the existing reason code.
          type: string
          example: '4807'
        evidence:
          type: array
          items:
            $ref: '#/components/schemas/IssuingDisputeEvidence'
          description: Your evidence for the chargeback, if updated since you created the dispute.
        amount:
          description: |
            The updated disputed amount, in the [minor unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount) of the transaction or representment currency.
            If not provided, Checkout.com uses the existing disputed amount.
          type: number
          example: 100
    OobSimulateTransactionDetails:
      type: object
      description: Details for the simulated transaction.
      properties:
        last_four:
          $ref: '#/components/schemas/LastFour'
        merchant_name:
          type: string
          description: The merchant's name.
          example: "Acme Ltd"
        purchase_amount:
          type: number
          description: The amount of the simulated transaction.
          example: 100
        purchase_currency:
          $ref: '#/components/schemas/IssuingCurrency'
    simulate-oob-authentication-request:
      type: object
      required:
        - card_id
      properties:
        card_id:
          $ref: '#/components/schemas/IssuingCardId'
        transaction_details:
          $ref: '#/components/schemas/OobSimulateTransactionDetails'
    get-transaction-response:
      type: object
      allOf:
        - $ref: '#/components/schemas/IssuingTransaction'
    get-transactions-response:
      type: object
      properties:
        limit:
          type: integer
          description: The requested maximum number of transactions returned.
          example: 5
        
        skip:
          type: integer
          description: The requested number of transactions to skip.
          example: 10
          
        total_count:
          type: integer
          description: The total count of available transactions.
          example: 100
        
        data:
          type: array
          description: A list of transactions.
          items:
            allOf:
              - $ref: '#/components/schemas/IssuingTransaction'
    IssuingMessageId:
      type: string
      pattern: "^msg_[a-z0-9]{26}$"
      description: The message's unique Checkout.com identifier.
      maxLength: 30
      minLength: 30
      example: msg_fa6psq242dcd6fdn5gifcq1491
    IssuingReferenceTransaction:
      type: object
      properties:
        transaction_id:
          $ref: '#/components/schemas/IssuingTransactionId'
        reference_type:
          type: string    
          enum: [original_mit, original_recurring]
    IssuingTransaction:
      type: object
      properties:
        id:
          description: The transaction's unique Checkout.com identifier.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionId'
        created_on:
          type: string
          format: date-time
          description: The date/time the transaction was created.
        status:
          type: string
          description: The high-level status indicating the stage of the transaction lifecycle.
          enum: [
              authorized,
              declined,
              canceled,
              cleared,
              refunded,
              disputed
          ]
          example: authorized
        transaction_type:
          type: string
          description: The high-level nature of the transaction.
          enum: [
            account_funding,
            account_transfer,
            atm_installment,
            balance_inquiry,
            bill_payment,
            cash_advance,
            cashback,
            credit_adjustment,
            debit_adjustment,
            original_credit,
            payment_account_inquiry,
            payment,
            pin_change,
            pin_unblock,
            purchase_account_inquiry,
            purchase,
            quasi_cash,
            remittance_funding,
            remittance_payment,
            unknown,
            withdrawal,
            refund
          ]
          example: purchase
        client:
          description: Information about Client to which this transaction belongs.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionClient'
        entity:
          description: Information about Entity to which this transaction belongs.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionEntity'
        card:
          description: Basic card information used in this transaction.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionCard'
        digital_card:
          description: Basic digital card information used in this transaction.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionDigitalCard'
        cardholder:
          description: Information about Cardholder to which this transaction belongs.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionCardholder'
        amounts:
          description: The list of aggregated amounts related to the current transaction.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmounts'
        merchant:
          description: |
            The merchant details received in the first applicable message.
            For example, if a transaction starts at the Authorization stage, then it will be the merchant received in the first Authorization.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionMerchant'              
        reference_transaction:
          description: The basic details of a referenced transaction when applicable.
          allOf:
            - $ref: '#/components/schemas/IssuingReferenceTransaction'    
        messages:
          type: array
          description: |
            A summarized list of messages associated to this transaction.
            A message can be initiated by the cardholder, merchant, acquirer, or issuer.
          items:
            $ref: '#/components/schemas/IssuingTransactionMessage'
        _links:
          type: object
          description: The links related to the transaction.
          properties:
            self:
              description: The URI of the current transaction.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
            card:
              description: The URI of the associated card.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
            cardholder:
              description: The URI of the associated cardholder.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
            reference_transaction:
              description: |
                The URI of the reference transaction. 
                For example, the original authorization in case of a refund, the original authenticated MIT or the first authorization in a series of recurring transactions.
              allOf:
                - $ref: '#/components/schemas/IssuingLink'
    IssuingTransactionAmount:
      type: object
      properties:
        amount:
          description: The amount is provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
          type: number
          example: 100
        currency:
          allOf:
            - $ref: '#/components/schemas/IssuingCurrency'
    IssuingTransactionAmounts:
      type: object
      properties:
        total_held:
          description: |
            The amount held internally to cover the transaction, but not yet debited. 
            This value is equal to the Total Authorized - Total Reversed - Total Cleared.<br />
            The amount is represented in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a> of the cardholder's billing currency.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
        total_authorized:
          description: |
            The total amount which has been authorized. 
            This sums the billing amounts from all approved authorizations associated to this transaction.<br />
            The amount is represented in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a> of the cardholder's billing currency.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
        total_reversed:
          description: |
            The total amount which has been reversed by the merchant or by the issuer. 
            This sums the billing amounts from all approved reversals and issuer initiated reversals associated to this transaction.<br />
            The amount is represented in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a> of the cardholder's billing currency.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
        total_cleared:
          description: |
            The total amount which has been cleared by the scheme.
            This sums the billing amounts from all presentments associated to this transaction.<br />
            The amount is represented in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a> of the cardholder's billing currency.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
        total_refunded:
          description: |
            The total amount which has been refunded to the cardholder.
            This sums the billing amounts from all presentments of type "refund" associated to this transaction.<br />
            The amount is represented in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a> of the cardholder's billing currency.
          allOf:
            - $ref: '#/components/schemas/IssuingTransactionAmount'
    IssuingTransactionCard:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/IssuingCardId'
        network:
          type: string
          description: The card network.
          enum: [mastercard]
          example: mastercard
    IssuingTransactionCardholder:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/IssuingCardholderId'
    IssuingTransactionClient:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/IssuingClientId'
    IssuingTransactionDigitalCard:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/IssuingDigitalCardId'
        wallet_type:
          type: string
          description: The wallet type.
          enum: [googlepay, applepay, remote_commerce_programs]
    IssuingTransactionEntity:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/IssuingEntityId'
    IssuingTransactionMerchant:
      type: object
      properties:
        id:
          type: string
          description: The merchant's identifier. The identifier varies from one acquirer to another.
          example: (*)123456789
        name:
          type: string
          description: The merchant's name.
          example: My Merchant
        city:
          type: string
          description: The city where the merchant is located.
          example: Paris
        state:
          type: string  
          description: The state in which the merchant is located (only for US-based merchants).
          example: ""
        country_code:
          type: string
          description: The country code where the merchant is located.
          example: FR
        category_code:
          type: string
          description: |
            The merchant's category codes.
            All category codes are documented <a href="https://www.checkout.com/docs/developer-resources/testing/codes/merchant-category-codes" target="blank">here</a>.
          example: "5331"
    IssuingTransactionMessage:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/IssuingMessageId'
        initiator:
          type: string
          description: Specifies who initiated the message
          # Purchase | Card provisioning  -> initiator = Cardholder
          # Authorization Advice          -> initiator = Card network
          # Authorization Advice AFD      -> initiator = Acquirer
          # Reversal request              -> initiator = Merchant
          # Reversal Advice               -> initiator = Card Network
          # Issuer initiated reversals    -> initiator = Issuer
          # First Presentment             -> initiator = Acquirer
          # Chargeback initiated          -> initiator = Issuer or Cardholder
          # Second Presentment            -> Acquirer
          enum: [
            cardholder, 
            merchant, 
            acquirer,
            card_network,
            issuer
            ]
        type:
          type: string
          description: The message type.
          # No Issuer reversal since it is represented as type = reversal & initiator = issuer
          # Merchant reversal as represented as type = reversal & initiator = merchant
          enum: [
            authorization, 
            reversal, 
            authorization_advice, 
            reversal_advice, 
            presentment, 
            authorization_refund,
            presentment_refund,
            presentment_reversed,
            presentment_reversed_refund
            ]
        result:
          type: string
          description: The outcome after processing this message.
          enum: [approved, declined, processed]
          example: declined
        is_relayed:
          type: boolean
          description: Indicates if this message was relayed through the Auth Relay to the client.
          example: true
        indicator:
          type: string
          description: | 
            Indicates the type of the authorization, reversal, or presentment.<br/>
            For authorization, it can be incremental_preauthorization, deferred_authorization, preauthorization, normal_authorization, final_authorization, or unknown.<br/>
            For reversals, it can be partial_reversal or full_reversal.<br/>
            For presentments, it can be partial_presentment or final_presentment.<br/>
            For other message type, it may be null.
          enum: [
            'incremental_preauthorization', 
            'deferred_authorization', 
            'preauthorization', 
            'normal_authorization', 
            'final_authorization', 
            'partial_reversal', 
            'full_reversal',
            'partial_presentment',
            'final_presentment',
            'unknown'
          ]
        decline_reason:
          type: string
          description: |
            The reason explaining why the message was declined. 
            Refer to our documentation for a list of possible <a href="https://www.checkout.com/docs/developer-resources/testing/codes/issuing-decline-reasons" target="blank">decline reasons</a>.<br/>
            If the message was approved, this will return `Null`. 
          example: expiry_date_invalid
        authorization_code:
          type: string
          description: Your issuer authorization code for when the transaction was approved.
          example: '03C0C0'
        billing_amount:
          type: integer
          format: int64
          description: | 
            The transaction billing amount.<br/>
            The amount is provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
          example: 100
        billing_currency:
          allOf:
            - $ref: '#/components/schemas/IssuingCurrency'
        created_on:
          type: string
          description: The message's creation date/time (UTC).
          format: date-time
          example: "2019-09-10T10:11:12Z"
    SimulateAuthorizationRequest:
      type: object
      properties:
        card:
          $ref: '#/components/schemas/IssuingSimulateCard'
        transaction:
          $ref: '#/components/schemas/IssuingSimulateTransaction'
    SimulateAuthorizationResponse:
      type: object
      description: Authorization Response.
      required:
        - status
      properties:
        id:
          type: string
          description: |
            The transaction's unique identifier. 
            
            This same ID is carried throughout all authorization, reversal, and clearing messages related to the given transaction.
          example: trx_aaqc4uaaybigcaaqc4uaayfiga
        status:
          type: string
          description: The transaction's status.
          enum:
            - Authorized
            - Declined
          example: Authorized
    SimulateIncrementalAuthorizationRequest:
      type: object
      properties:
        amount:
          type: integer
          description: |
            You must provide the amount in the transaction currency's <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a>.
          minimum: 0
          example: 3500
    SimulateIncrementalAuthorizationResponse:
      type: object
      description: Authorization Response.
      required:
        - status
      properties:
        status:
          type: string
          description: The transaction's status.
          enum:
            - Authorized
            - Declined
          example: Authorized
    PresentmentRequest:
      type: object
      properties:
        amount:
          type: integer
          description: |
            The amount to clear. If not specified, the full authorized amount will be cleared.
      
            You must provide the amount in the transaction currency's <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a>.
          minimum: 0
          example: 2500
    IssuingAuthorizationTypes:
      type: string
      enum: 
        - authorization
        - pre_authorization
      default: authorization
      description: Use `authorization` for a known final amount or `pre_authorization` for an estimated amount.
      example: authorization
    IssuingMerchant:
      type: object
      description: The merchant related data to use for the transaction.
      properties:
        category_code:
         type: string
         description: >
          The <a href="https://www.checkout.com/docs/resources/codes/merchant-category-codes" target="blank">merchant category code (MCC)</a>, which determines the types of businesses the card can process the transaction from.
         example: "7399"
         maxLength: 4
         minLength: 4
    IssuingSimulateCard:
      type: object
      description: The card to simulate an authorization with.
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/IssuingCardId'
        expiry_month:
          $ref: '#/components/schemas/ExpiryMonth'
        expiry_year:
          $ref: '#/components/schemas/ExpiryYear'
    IssuingSimulateTransaction:
      type: object
      description: >
        The transaction to simulate with the specified card. For example, a purchase.
      discriminator:
        propertyName: type
        mapping:
          purchase: '#/components/schemas/Purchase'
      required:
        - type
      properties:
        type:
          type: string
          description: >
            The transaction type.
          example: 'purchase'
    IssuingTransactionId:
      type: string
      pattern: "^trx_[a-z0-9]{26}$"
      description: The transaction's unique identifier.
      maxLength: 30
      minLength: 30
      example: trx_aayhhfwbdyxwcaeyhhfwbd4xga
    Purchase:
      type: object
      allOf:
        - $ref: '#/components/schemas/IssuingSimulateTransaction'
        - type: object
          properties:
            amount:
              type: integer
              description: |
                The payment amount, in <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a>.
                
                To perform a card verification, set `amount` to `0`, or omit the field entirely.
              minimum: 0
              example: 6540
            currency:
              type: string
              description: The currency to use for the transaction, as a three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a>. If this currency differs from the cardholder's billing currency, the billing amount will be adjusted according to the applicable conversion rate. If no currency is provided, the transaction will default to the cardholder's billing currency.
              example: GBP
              maxLength: 3
              minLength: 3
            merchant:
              $ref: '#/components/schemas/IssuingMerchant'
            authorization_type:
              $ref: '#/components/schemas/IssuingAuthorizationTypes'
    SimulateRefundRequest:
      type: object
      properties:
        amount:
          type: integer
          description: |
            The amount to refund. If not specified, the full cleared amount will be refunded.
      
            You must provide the amount in the transaction currency's <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a> .
          minimum: 0
          example: 2500
    ReversalRequest:
      type: object
      properties:
        amount:
          type: integer
          description: |
            The amount to reverse. If unspecified, the full transaction amount will be reversed.
      
            You must provide the amount in the transaction currency's <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a>.
          minimum: 0
          example: 2500
    ReversalResponse:
      type: object
      description: Reversal Response.
      required:
        - status
      properties:
        status:
          type: string
          description: The status of the transaction (either Reversed or Declined).
          enum:
            - Reversed
            - Declined
          example: Reversed
    Link:
      type: object
      additionalProperties: false
      properties:
        href:
          description: The link URL
          type: string
      required:
        - href
    RedirectLink:
      type: object
      properties:
        href:
          description: The redirect link URL
          type: string
        mobile:
          type: object
          description: The mobile links for the redirect
          properties:
            android:
              type: object
              properties:
                href:
                  description: The Android link
                  type: string
            ios:
              type: object
              properties:
                href:
                  description: The iOS link
        qr_code:
          type: object
          description: The QR code for the redirect
          properties:
            image:
              description: The QR code image URL
              type: string
            text:
              description: The encoded text for the QR code
              type: string
      
    CardMetadataRequest:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/CardMetadataRequestSource'
        format:
          description: |
            The format to provide the output in.
      
            A `basic` response will only include standard metadata, while a `card_payouts` formatted response will also include fields specific to card payouts.
          type: string
          default: basic
          enum: [basic, card_payouts]
          example: basic
        reference:
          description: |
            A reference you can later use to identify this Payment Context. For example, an order number.
          type: string
          example: ORD-5023-4E89
    CardMetadataRequestSource:
      type: object
      description: The source object
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/CardMetadataRequestSourceCard'
          bin: '#/components/schemas/CardMetadataRequestSourceBin'
          token: '#/components/schemas/CardMetadataRequestSourceToken'
          id: '#/components/schemas/CardMetadataRequestSourceInstrument'
      required:
        - type
      properties:
        type:
          type: string
          description: The source type
          example: 'card'
    CardMetadataRequestSourceBin:
      type: object
      description: An existing payment source
      required:
        - bin
      allOf:
        - $ref: '#/components/schemas/CardMetadataRequestSource'
        - type: object
          properties:
            bin:
              description: The issuer's Bank Identification Number (BIN)
              type: string
              minLength: 6
              maxLength: 8
              pattern: '^[0-9]+$'
              example: '454347'
    CardMetadataRequestSourceCard:
      type: object
      description: An existing payment source
      required:
        - number
      allOf:
        - $ref: '#/components/schemas/CardMetadataRequestSource'
        - type: object
          properties:
            number:
              description: The Primary Account Number (PAN)
              type: string
              minLength: 12
              maxLength: 19
              pattern: '^[0-9]+$'
              example: '4543474002249996'
    CardMetadataRequestSourceInstrument:
      type: object
      description: An existing payment source
      required:
        - id
      allOf:
        - $ref: '#/components/schemas/CardMetadataRequestSource'
        - type: object
          properties:
            id:
              type: string
              pattern: "^(src)_(\\w{26})$"
              description: The unique ID for the payment instrument that was created using the card's details
              example: src_wmlfc3zyhqzehihu7giusaaawu
    CardMetadataRequestSourceToken:
      type: object
      description: An existing payment source
      required:
        - token
      allOf:
        - $ref: '#/components/schemas/CardMetadataRequestSource'
        - type: object
          properties:
            token:
              description: The Checkout.com unique token that was generated when the card's details were tokenized
              type: string
              pattern: '^(tok)_(\w{26})$'
              example: 'tok_ubfj2q76miwundwlk72vxt2i7q'
    CardMetadataResponse:
      type: object
      description: Card Metadata
      properties:
        bin:
          description: The issuer's Bank Identification Number (BIN). Supports 6, 8, or 11 digit BINs.
          type: string
          minLength: 6
          maxLength: 11
          pattern: '^[0-9]{6}$|^[0-9]{8}$|^[0-9]{11}$'
          example: '45434720'
        scheme:
          description: The global card scheme. For example, `"american_express"`, `"cartes_bancaires"`, `"diners_club_international"`, `"discover"`, `"eftpos"`, `"jcb"`, `"mastercard"`, or `"visa"`.
          type: string
          example: 'visa'
        scheme_local:
          deprecated: true
          description: |
            Replaced by `local_schemes`.
            The local card scheme, if the card is co-branded.
          type: string
          enum: [cartes_bancaires, mada, omannet]
          example: 'cartes_bancaires'
        local_schemes:
          description: The local card scheme or schemes, if the card is co-branded.
          type: array
          items:
            type: string
            enum:
              [
                accel,
                cartes_bancaires,
                eftpos,
                mada,
                nyce,
                omannet,
                pulse,
                shazam,
                star,
                upi,
                paypak,
                maestro
              ]
          example: ['cartes_bancaires', 'upi']
        card_type:
          description: The card type
          type: string
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
            - DEFERRED DEBIT
            - NETWORK TOKEN
          example: CREDIT
        card_category:
          description: The card category
          type: string
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        currency:
          description: The card billing currency, as a three-letter ISO-4217 <a href="https://www.checkout.com/docs/developer-resources/testing/codes/currency-codes" target="blank">currency code</a>.
          type: string
          example: 'MUR'
        issuer:
          description: The card issuer
          type: string
          example: 'STATE BANK OF MAURITIUS'
        issuer_country:
          description: The card issuer's country, as an ISO-2 code
          type: string
          example: 'MU'
        issuer_country_name:
          description: The card issuer's country
          type: string
          example: 'Mauritius'
        is_combo_card:
          description: Indicates whether the card is a combo credit and debit card. Applicable to Visa and Mastercard.
          type: boolean
          example: true
        product_id:
          description: The card issuer or scheme's product identifier
          type: string
          example: 'CLASSIC'
        product_type:
          description: The card issuer or scheme's product type
          type: string
          example: 'F'
        subproduct_id:
          description: The card issuer or scheme's sub-product identifier
          type: string
          example: 'VA'
        regulated_indicator:
          description: Specifies whether the card is assigned to an interchange regulated BIN range
          type: boolean
          example: true
        regulated_type:
          description: The type of the interchange regulated card BIN range
          type: string
          enum: [base_regulated, fraud_protected_regulated]
          example: base_regulated
        is_reloadable_prepaid:
          description: Indicates whether the prepaid bank identification number (BIN) is reloadable.
          type: boolean
          example: true
        anonymous_prepaid_description:
          description: The description of the prepaid BIN, specifying if it's an anonymous prepaid card.
          type: string
          example: Anonymous prepaid program and not AMLD5 compliant
          enum:
            - Anonymous prepaid program and not AMLD5 compliant
            - Anonymous prepaid program and AMLD5 compliant
            - Not prepaid or non-anonymous prepaid program/default
        card_payouts:
          description: A card payouts block exists in the response if the format in the request is  "card_payouts".
          type: object
          properties:
            domestic_non_money_transfer:
              description: Describes whether the card is eligible for domestic non-money transfer transactions
              type: string
              enum: [not_supported,standard,fast_funds,unknown]
              example: 'not_supported'
            cross_border_non_money_transfer:
              description: Describes whether the card is eligible for cross-border non-money transfer transactions
              type: string
              enum: [not_supported,standard,fast_funds,unknown]
              example: 'standard'
            domestic_gambling:
              description: Describes whether the card is eligible for domestic gambling transactions
              type: string
              enum: [not_supported,standard,fast_funds,unknown]
              example: 'fast_funds'
            cross_border_gambling:
              description: Describes whether the card is eligible for cross-border gambling transactions
              type: string
              enum: [not_supported,standard,fast_funds,unknown]
              example: 'unknown'
            domestic_money_transfer:
              description: Describes whether the card is eligible for domestic money transfer transactions
              type: string
              enum: [not_supported,standard,fast_funds,unknown]
              example: 'not_supported'
            cross_border_money_transfer:
              description: Describes whether the card is eligible for cross-border money transfer transactions
              type: string
              enum: [not_supported,standard,fast_funds,unknown]
              example: 'not_supported'
        scheme_metadata:
          description: |
            Provides additional information about the scheme or local scheme's capabilities. It is sent if the card is issued in the US and can be used in a PINless debit network. <br/>
            `scheme_metadata` is returned when you provide: 
              - The full card number or 
              -  11 digit bin
          type: object
          properties:
            accel:
              type: array
              items:
                $ref: '#/components/schemas/PinlessDebitSchemeMetadata'
            pulse:
              type: array
              items:
                $ref: '#/components/schemas/PinlessDebitSchemeMetadata'
            nyce:
              type: array
              items:
                $ref: '#/components/schemas/PinlessDebitSchemeMetadata'
            shazam:
              type: array
              items:
                $ref: '#/components/schemas/PinlessDebitSchemeMetadata'
            star:
              type: array
              items:
                $ref: '#/components/schemas/PinlessDebitSchemeMetadata'
        account_funding_transaction:
          $ref: '#/components/schemas/AccountFundingTransaction'
      required:
        - bin
        - scheme
    AccountFundingTransaction:
      description: Account Funding Transaction
      type: object
      properties:
        aft_indicator:
          description: Describes whether the card is eligible for Account Funding Transactions
          type: object
          properties:
            pull_funds:
              $ref: '#/components/schemas/PullFunds'
    PinlessDebitSchemeMetadata:
      type: object
      properties:
        network_id:
          type: string
          description: The PINless debit network identifier
          example: 'aam'
        network_description:
          type: string
          description: The PINless debit network name
          example: 'Accel Money Transfer Advantage'
        bill_pay_indicator:
          type: boolean
          description: Describes whether the card is eligible for bill payment transactions
          example: true
        ecommerce_indicator:
          type: boolean
          description: Describes whether the card is eligible for e-commerce transactions
          example: true
        interchange_fee_indicator:
          type: string
          description: The type of interchange fee used for transactions
          example: '00'
        money_transfer_indicator:
          type: boolean
          description: Describes whether the card is eligible for money transfer transactions
          example: true
        token_indicator:
          type: boolean
          description: True indicates that the card PAN is a DPAN, false indicates that it is a FPAN
          example: false
    PullFunds:
      description: Describes whether the card is eligible to take funds from different accounts to fund other non-merchant accounts
      type: object
      properties:
        cross_border:
          description: Describes whether the card is eligible for Account Funding Transactions between accounts in different countries
          type: boolean
          example: true
        domestic:
          description: Describes whether the card is eligible for Account Funding Transactions between accounts in the same country
          type: boolean
          example: true
    NetworkTokensCard:
      type: object
      description: The card details.
      required:
        - last4
        - expiry_month
        - expiry_year
      properties:
        last4:
          type: string
          pattern: ^[0-9]{4}$
          example: '6378'
          description: The last four digits of the card number.
        expiry_month:
          type: string
          pattern: ^[0-9]{1,2}$
          minimum: 1
          maximum: 12
          example: '5'
          description: The card's expiration month.
        expiry_year:
          type: string
          pattern: ^[0-9]{4}$
          example: '2025'
          description: The card's expiration year.
    NetworkTokensCryptogramRequest:
      type: object
      required:
        - transaction_type
      properties:
        transaction_type:
          type: string
          description: Transaction type the cryptogram is requested for.
          enum:
            - ecom
            - recurring
            - pos
            - aft
          example: ecom
    NetworkTokensCryptogramResponse:
      type: object
      required:
        - cryptogram
      properties:
        cryptogram:
          type: string
          example: AhJ3hnYAoAbVz5zg1e17MAACAAA=
          description: >-
            The cryptogram from the network token. Will only be refreshed for active
            network tokens and returned when the network token isn't declined or
            pending
        eci:
          type: string
          example: '7'
          description: Electronic Commerce Indicator (ECI) from the issuer.
        _links:
          type: object
          properties:
            self:
              type: object
              description: Link to request a new cryptogram
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna/cryptograms
            network-token:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: Link to access network token
              example:
                href: https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna
    NetworkTokensRequest:
      type: object
      required:
        - source
      properties:
        source:
          $ref: "#/components/schemas/NetworkTokensRequestSource"
    NetworkTokensRequestDelete:
      type: object
      required:
        - initiated_by
        - reason
      properties:
        initiated_by:
          type: string
          enum:
            - cardholder
            - token_requestor
          example: token_requestor
          description: Who initiated/requested the deletion of the token.
        reason:
          type: string
          enum:
            - fraud
            - other
          example: other
          description: The reason for deleting the token.
    NetworkTokensRequestSource:
      type: object
      description: The source object
      discriminator:
        propertyName: type
        mapping:
          id: '#/components/schemas/NetworkTokensRequestSourceInstrument'
          card: '#/components/schemas/NetworkTokensRequestSourceCard'
      required:
        - type
      properties:
        type:
          type: string
          description: The source type
          example: 'id'
        
    NetworkTokensRequestSourceCard:
      type: object
      description: Card details
      required:
        - number
        - expiry_month
        - expiry_year
      allOf:
        - $ref: '#/components/schemas/NetworkTokensRequestSource'
        - type: object
          properties:
            number:
              type: string
              pattern: ^[0-9]+$
              minLength: 12
              maxLength: 19
              example: '5436031030606378'
              description: The card number.
            cvv:
              type: string
              example: '123'
              minimum: 1
              maximum: 9999
              description: The CVV number for the card
            expiry_month:
              type: string
              pattern: ^[0-9]{1,2}$
              minimum: 1
              maximum: 12
              example: '5'
              description: The expiry month of the card.
            expiry_year:
              type: string
              pattern: ^[0-9]{4}$
              example: '2025'
              description: The four-digit expiry year of the card.
    NetworkTokensRequestSourceInstrument:
      type: object
      description: An existing payment source
      required:
        - id
      allOf:
        - $ref: '#/components/schemas/NetworkTokensRequestSource'
        - type: object
          properties:
            id:
              type: string
              pattern: "^(src)_(\\w{26})$"
              description: The card instrument
              example: src_wmlfc3zyhqzehihu7giusaaawu
    NetworkTokensResponse:
      type: object
      required:
        - card
        - network_token
      properties:
        card:
          $ref: '#/components/schemas/NetworkTokensCard'
        network_token:
          type: object
          description: Network token details
          required:
            - id
            - state
            - number
            - expiry_month
            - expiry_year
            - type
            - created_on
            - modified_on
          properties:
            id:
              type: string
              example: nt_xgu3isllqfyu7ktpk5z2yxbwna
              description: Unique token ID assigned by Checkout.com for each token
            state:
              type: string
              enum:
                - active
                - suspended
                - inactive
              example: active
              description: Token status
            number:
              type: string
              pattern: ^[0-9]+$
              example: '5436424242424242'
              description: The network token number.
            expiry_month:
              type: string
              pattern: ^[0-9]{1,2}$
              example: '5'
              description: >-
                The network token's expiration month.
            expiry_year:
              type: string
              pattern: ^[0-9]{4}$
              example: '2025'
              description: >-
                The network token's expiration year.
            type:
              type: string
              enum:
                - vts
                - mdes
              example: vts
              description: The type of token
            payment_account_reference:
              type: string
              example: 5001a9f027e5629d11e3949a0800a
              description: >-
                Unique Payment account reference value assigned to payment account.
                All affiliated payment tokens, as well as the underlying PAN, have the
                same PAR.
            created_on:
              description: When the network token was created
              type: string
              format: date-time
              example: '2020-02-11T15:57:32.435+00:00'
            modified_on:
              description: When the network token was modified
              type: string
              format: date-time
              example: '2020-02-11T15:57:32.435+00:00'
        token_requestor_id:
          type: string
          example: "1234567890"
          description: Token requestor ID
        token_scheme_id:
          type: string
          example: 'scheme_visa_001'
          description: |
            The scheme-specific identifier for the network token. 
            
            For Visa, this is equivalent to the `vProvisionedTokenID`. For Mastercard, this is equivalent to the `tokenUniqueReference`.
        _links:
          $ref: '#/components/schemas/NetworkTokensResponseLinks'
    NetworkTokensResponseLinks:
      type: object
      properties:
        self:
          type: object
          allOf:
            - $ref: '#/components/schemas/Link'
          description: Link to access network token
        cryptogram:
          type: object
          allOf:
            - $ref: '#/components/schemas/Link'
          description: Link to request cryptogram
        card-art:
          type: object
          allOf:
            - $ref: '#/components/schemas/Link'
          description: |
            Link to request card art image.
            
            The URL returned contains an image of a non-PCI, digital representation of the cardholder's card.
      example:
        self:
          href: https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna
        cryptogram:
          href: https://{prefix}.api.checkout.com/network-tokens/nt_xgu3isllqfyu7ktpk5z2yxbwna/cryptograms
        card-art:
          href: https://card-art.checkout.com/00340aa7bd3de35cb1048369450d8df4
    NetworkTokensRetrieveResponse:
      type: object
      required:
        - card
        - network_token
      properties:
        card:
          $ref: '#/components/schemas/NetworkTokensCard'
        network_token:
          type: object
          description: Network token details.
          required:
            - id
            - state
            - type
            - created_on
            - modified_on
          properties:
            id:
              type: string
              example: nt_xgu3isllqfyu7ktpk5z2yxbwna
              description: The unique identifier for the network token.
            state:
              type: string
              enum:
                - active
                - suspended
                - inactive
                - declined
                - requested
              example: active
              description: The token's status.
            number:
              type: string
              pattern: ^[0-9]+$
              example: '5436424242424242'
              description: |
                The network token number.
                This field is only returned when the network token `status` is one of the following:
                
                - `active`
                - `suspended`
                - `inactive`
            expiry_month:
              type: string
              pattern: ^[0-9]{1,2}$
              example: '5'
              description: |
                The network token's expiration month.
                
                This field is only returned when the network token `status` is one of the following:
                
                - `active`
                - `suspended`
                - `inactive`
            expiry_year:
              type: string
              pattern: ^[0-9]{4}$
              example: '2025'
              description: |
                The network token's expiration year.
                
                This field is only returned when the network token `status` is one of the following:
                
                - `active`
                - `suspended`
                - `inactive`
            type:
              type: string
              enum:
                - vts
                - mdes
              example: vts
              description: The network token type.
            payment_account_reference:
              type: string
              example: 5001a9f027e5629d11e3949a0800a
              description: |
                The unique reference assigned to the payment account.
                
                All payment tokens and underlying PANs associated with a payment account share the same `payment_account_reference`.
            created_on:
              description: The UTC date and time the network token was created.
              type: string
              format: date-time
              example: '2020-02-11T15:57:32.435+00:00'
            modified_on:
              description: The UTC date and time the network token was modified.
              type: string
              format: date-time
              example: '2020-02-11T15:57:32.435+00:00'
        token_requestor_id:
          type: string
          example: '1234567890'
          description: The unique identifier for the token requestor.
        token_scheme_id:
          type: string
          example: 'scheme_visa_001'
          description: |
            The scheme-specific identifier for the network token. 
      
            For Visa, this is equivalent to the `vProvisionedTokenID`. For Mastercard, this is equivalent to the `tokenUniqueReference`.
        _links:
          $ref: '#/components/schemas/NetworkTokensResponseLinks'
    PagingError:
      type: object
      properties:
        request_id:
          type: string
          example: 0HL80RJLS76I7
        error_type:
          type: string
          example: request_invalid
        error_codes:
          type: array
          items:
            type: string
            example: paging_limit_invalid
    PaymentAuthenticationData:
      type: object
      properties:
        experience:
          type: string
          enum:
            - google_spa
            - 3ds
          description: The authentication experience that was used to authenticate the payment.
          example: 3ds
    PaymentAuthenticationRequest:
      type: object
      properties:
        preferred_experiences:
          type: array
          items:
            type: string
            enum:
              - google_spa
              - 3ds
          uniqueItems: true
          description: An ordered list of preferred authentication experiences to attempt for the payment request.
          example: [google_spa, 3ds]
    AvailablePaymentTypes:
      type: array
      description: Contains information about the available payment type returned by the partner for this purchase.
      items:
        type: object
        properties:
          payment_type:
            type: string
            description: The available payment type returned by the partner for this purchase.
            enum:
              - Regular
              - PayLater
              - Installment
          payment_plan:
            $ref: '#/components/schemas/PaymentPlan'
    PartnerMetadata:
      type: object
      description: Processing object
      properties:
        order_id:
          type: string
          description: Order id
          example: 'test_order_123'
        customer_id:
          type: string
          description: Customer id
          example: 'cus_123'
        session_id:
          type: string
          description: The unique identifier for the session created.
          example: 'feb0096d-8486-400d-89fa-2fa716b4521f'
        client_token:
          type: string
          description: The client token to pass to the client when initializing the JavaScript SDK.
          example: 'eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.eyJzZXNzaW9uX2lkIjoiY2RiNDI0MGQtMTdkYy01MjJkLWJlYjEtYjAyYjRlMzllYTdhIiwiYmFzZV91cmwiOiJodHRwczovL2pzLnBsYXlncm91bmQua2xhcm5hLmNvbS9ldS9rcCIsImRlc2lnbiI6ImtsYXJuYSIsImxhbmd1YWdlIjoiZW4iLCJwdXJjaGFzZV9jb3VudHJ5IjoiREUiLCJlbnZpcm9ubWVudCI6InBsYXlncm91bmQiLCJtZXJjaGFudF9uYW1lIjoiQ2hlY2tvdXQuY29tIiwic2Vzc2lvbl90eXBlIjoiUEFZTUVOVFMiLCJjbGllbnRfZXZlbnRfYmFzZV91cmwiOiJodHRwczovL2V1LnBsYXlncm91bmQua2xhcm5hZXZ0LmNvbSIsInNjaGVtZSI6dHJ1ZSwiZXhwZXJpbWVudHMiOlt7Im5hbWUiOiJrcC1jbGllbnQtb25lLXB1cmNoYXNlLWZsb3ciLCJ2YXJpYXRlIjoidmFyaWF0ZS0xIn0seyJuYW1lIjoia3AtY2xpZW50LXV0b3BpYS1mbG93IiwidmFyaWF0ZSI6InZhcmlhdGUtMSJ9LHsibmFtZSI6ImtwYy0xay1zZXJ2aWNlIiwidmFyaWF0ZSI6InZhcmlhdGUtMSJ9LHsibmFtZSI6ImtwLWNsaWVudC11dG9waWEtc3RhdGljLXdpZGdldCIsInZhcmlhdGUiOiJpbmRleCIsInBhcmFtZXRlcnMiOnsiZHluYW1pYyI6InRydWUifX0seyJuYW1lIjoiaW4tYXBwLXNkay1uZXctaW50ZXJuYWwtYnJvd3NlciIsInBhcmFtZXRlcnMiOnsidmFyaWF0ZV9pZCI6Im5ldy1pbnRlcm5hbC1icm93c2VyLWVuYWJsZSJ9fSx7Im5hbWUiOiJrcC1jbGllbnQtdXRvcGlhLXNkay1mbG93IiwidmFyaWF0ZSI6InZhcmlhdGUtMSJ9LHsibmFtZSI6ImtwLWNsaWVudC11dG9waWEtd2Vidmlldy1mbG93IiwidmFyaWF0ZSI6InZhcmlhdGUtMSJ9LHsibmFtZSI6ImluLWFwcC1zZGstY2FyZC1zY2FubmluZyIsInBhcmFtZXRlcnMiOnsidmFyaWF0ZV9pZCI6ImNhcmQtc2Nhbm5pbmctZW5hYmxlIn19XSwicmVnaW9uIjoiZXUiLCJvcmRlcl9hbW91bnQiOjIwMDAsIm9mZmVyaW5nX29wdHMiOjAsIm9vIjoiY3ciLCJ2ZXJzaW9uIjoidjEuMTAuMC0xNTkwLWczZWJjMzkwNyJ9.ZxThQVo5e0Fck1vwOQ-WWAr7Zw-dsiEhjd3CW-E5p8atUhnBhrzIs6WCBeOOv3ci2VvpykVnDw2qycCTA-7TpTq1wn_kPxxixDQnYJYJzrZMoUhPLZo5pfy2a1S_t2owEQks0THRzu2wRlZwCN4ewDnVqsut60X4r3B92cJENIDtEC4Fs55CjFEmYUtsLXSspNLKvpZe2zg4O_M5yjH7XsBs5YJalZLexf4545G5vJrmVHgiA322mbgWC7BH0IU1A-ql5sFvs190_cjGaLsAvrkh9CVczUPy3X-jr3A5z1YRVfywPpvwKFWL8GZtgrdUZmgiU5_8ZZLkEPzrSucHrQ'
    PaymentContext:
      type: object
      required:
        - source
        - currency
        - amount
      properties:
        source:
          $ref: '#/components/schemas/PaymentContextSource'
        amount:
          type: integer
          description: |
            The Payment Context Payment amount.
            The amount must be provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
          minimum: 0
          example: 6540
        currency:
          type: string
          description: |
            The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a>.
          example: USD
          maxLength: 3
          minLength: 3
        payment_type:
          type: string
          description: | 
            "Recurring" must be specified if the payment is paid in multiple installments.
          enum:
            - Regular
            - Recurring
          default: Regular
          example: Recurring
        capture:
          type: boolean
          description: Whether to capture the later payment (if applicable).
          default: true
          example: true
        customer:
          $ref: '#/components/schemas/PaymentContextDetailsCustomer'
        shipping:
          $ref: '#/components/schemas/Shipping'
        processing:
          description: Use the processing object to influence or override the data during the payment processing.
          allOf:
            - $ref: '#/components/schemas/PaymentContextProcessing'
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: The processing channel to be used for the payment.
          example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq'
        reference:
          type: string
          description: |
            A reference you can later use to identify this Payment Context, such as an order number.<br>Can only be alphanumeric and must be unique for Benefit.<br>For Amex, the string limit is 30 characters.
          maxLength: 50
          example: 'ORD-5023-4E89'
        description:
          type: string
          description: A description of the Payment Context.
          maxLength: 100
          example: 'Set of 3 masks'
        success_url:
          type: string
          format: uri
          description: For redirect payment methods, this overrides the default success redirect URL configured on your account.
          maxLength: 1024
          example: 'https://example.com/payments/success'
        failure_url:
          type: string
          format: uri
          description: For redirect payment methods, this overrides the default failure redirect URL configured on your account.
          maxLength: 1024
          example: 'https://example.com/payments/fail'
        items:
          $ref: '#/components/schemas/PaymentContextItems'
        metadata:
          type: object
          description: |
            A set of key-value pairs store additional information about a transaction. You can send custom fields and up to five user-defined fields, which can be used for reporting purposes. You can supply fields of type 
            
            - `string`
            - `number`
            - `boolean`
       
            Arrays and objects are not supported. 
            
            You can provide up to 20 metadata fields per API call, but the value of each field must not exceed 255 characters in length.
      
            You can also reference [`metadata` properties](https://www.checkout.com/docs/business-operations/prevent-fraud/understand-fraud-detection#Metadata) in your custom rules for Fraud Detection.
          example:
            coupon_code: 'NY2018'
    PaymentContextCustomer:
      type: object
      description: Customer details
      properties:
        email:
          type: string
          description: The customer's email address.
          example: 'johnsmith@example.com'
        name:
          type: string
          description: The customer's name.
          example: 'John Smith'
    PaymentContextDetails:
      type: object
      description: Get Payment Context Details response.
      required:
        - id
        - payment_request
        - partner_metadata
      properties:
        id:
          type: string
          description: The unique identifier of the payment context.
          example: pct_y3oqhf46pyzuxjbcn2giaqnb44
        status:
          type: string
          description: The status of the payment context.
          enum:
            - Created
            - Approved
          default: Created
          example: Approved
        payment_request:
          $ref: '#/components/schemas/PaymentContextDetailsRequest'
        partner_metadata:
          $ref: '#/components/schemas/PartnerMetadata'
    PaymentContextDetailsCustomer:
      type: object
      description: The customer details. <br> Required if `source.type` is `StcPay` or `Tabby`.
      properties:
        phone:
          type: object
          description: The customer's phone number. <br> Required if `source.type` is `StcPay` or `Tabby`.
          properties:
            country_code:
              type: string
              description: The international <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">country calling code</a>. <br> Required if `source.type` is `StcPay`.
              minLength: 1
              maxLength: 7
              example: '+1'
            number:
              type: string
              description: The phone number. <br> Required if `source.type` is `StcPay` or `Tabby`.
              minLength: 6
              maxLength: 25
              example: 415 555 2671
            phone_verified:
              type: boolean
              description: Indicates if the phone number has been verified.
        email:
          type: string
          description: The customer's email address. <br> Required if `source.type` is `Tabby`.
          format: email
          example: "card.success@tabby.ai" 
        name:
          type: string
          description: The customer's full name. <br> Required if `source.type` is `Tabby`.
          minLength: 1
          maxLength: 100
          example: "string" 
        email_verified:
          type: boolean
          description: Indicates if the email address has been verified.
        summary:
          type: object
          description: Summary of the customer's transaction history. <br> Used for risk assessment when `source.type` is `Tabby`
          properties:
            registration_date:
              type: string
              format: date
              description: The date the customer registered.
              example: "2023-05-01"
            first_transaction_date:
              type: string
              format: date
              description: The date of the customer's first transaction.
              example: "2023-07-01"
            last_payment_date:
              type: string
              format: date
              description: The date of the customer's last payment.
              example: "2023-08-01"
            total_order_count:
              type: integer
              description: The total number of orders made by the customer.
              example: 15
            last_payment_amount:
              type: number
              format: float
              description: The amount of the customer's last payment.
              example: 500
    PaymentContextDetailsRequest:
      type: object
      required:
        - source
        - currency
        - amount
        - items
      properties:
        source:
          $ref: '#/components/schemas/PaymentContextSource'
        amount:
          type: integer
          description: |
            The payment context payment amount.
            The amount must be provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
          minimum: 0
          example: 6540
        currency:
          type: string
          description: |
            The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a>.
          example: USD
          maxLength: 3
          minLength: 3
        payment_type:
          type: string
          description: 'Set this value to `Recurring` if the payment is going to be paid in multiple installments.'
          enum:
            - Regular
            - Recurring
          default: Regular
          example: Recurring
        capture:
          type: boolean
          description: Specifies whether to capture the later payment (if applicable).
          default: true
          example: true
        customer:
          $ref: '#/components/schemas/PaymentContextCustomer'
        shipping:
          $ref: '#/components/schemas/Shipping'
        processing:
          description: Use the processing object to influence or override the data during the payment processing.
          allOf:
            - $ref: '#/components/schemas/PaymentContextProcessing'
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: The processing channel to be used for the payment.
          example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq'
        reference:
          type: string
          description: |
            A reference you can later use to identify this payment context, such as an order number.<br>Can only be alphanumeric and must be unique for Benefit.<br>For American Express, the string limit is 30 characters.
          maxLength: 50
          example: 'ORD-5023-4E89'
        description:
          type: string
          description: A description of the payment context.
          maxLength: 100
          example: 'Set of 3 masks'
        success_url:
          type: string
          format: uri
          description: For redirect payment methods, this overrides the default success redirect URL configured on your account.
          maxLength: 1024
          example: 'https://example.com/payments/success'
        failure_url:
          type: string
          format: uri
          description: For redirect payment methods, this overrides the default failure redirect URL configured on your account.
          maxLength: 1024
          example: 'https://example.com/payments/fail'
        items:
          $ref: '#/components/schemas/PaymentContextItems'
        metadata:
          type: object
          description: |
            A set of key-value pairs store additional information about a transaction. You can send custom fields and up to five user-defined fields, which can be used for reporting purposes. You can supply fields of type 
            
            - `string`
            - `number`
            - `boolean`
       
            Arrays and objects are not supported. 
            
            You can provide up to 20 metadata fields per API call, but the value of each field must not exceed 255 characters in length.
      
            You can also reference [`metadata` properties](https://www.checkout.com/docs/business-operations/prevent-fraud/understand-fraud-detection#Metadata) in your custom rules for Fraud Detection.
          example:
            coupon_code: 'NY2018'
    PaymentContextId:
      type: string
      pattern: "^(pct)_(\\w{26})$"
      description: Payment Context's unique identifier.
      maxLength: 30
      minLength: 30
      example: 'pct_y3oqhf46pyzuxjbcn2giaqnb44'
    PaymentContextItems:
      type: array
      description: |
        The order's line items. <p/>
      
        Required for Klarna payments.
      items:
        type: object
        description: The order's line item or product that is being purchased.
        properties:
          type:
            type: string
            description: The item type. For example, `physical`, `digital`.
          name:
            type: string
            description: The descriptive name of the line item.
            example: Test item
            maxLength: 255
          quantity:
            type: integer
            description: The number of line items.
            minimum: 1
            example: 2
          unit_price:
            type: integer
            description: The unit price of the item in <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
            minimum: 0
            example: 50
          reference:
            type: string
            description: The item reference or product SKU (stock-keeping unit).
            example: 858818ac
            maxLength: 255
          total_amount:
            type: number
            description: The total cost of the line item (including any tax and discount amount) in minor currency unit. Value = (quantity x unit_price) - discount_amount.
            example: 29000
          tax_rate:
            type: number
            description: The tax rate of the item line in minor units. The percentage value is represented with two implicit decimals. For example, 2000=20%.
            example: 2000
          tax_amount:
            type: number
            description: The total amount of sales tax or value-added tax (VAT) on the total purchase amount. Tax should be included in the total purchase.
            example: 1000
          discount_amount:
            type: number
            description: The discount applied to each invoice line item.
            example: 1000
          url:
            type: string
            maxLength: 1024
            description: Link to the line item's product page.
          image_url:
            type: string
            maxLength: 1024
            description: Link to the line item's product page.
    PaymentContextPaymentRequest:
      title: Payment Context
      type: object
      required:
        - payment_context_id
      properties:
        payment_context_id:
          type: string
          description: |
            Payment Context's unique identifier.
          allOf:
            - $ref: '#/components/schemas/PaymentContextId'
        amount:
          type: integer
          description: |
            The payment amount.
            The amount must be provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
          minimum: 0
          example: 6540
        reference:
          type: string
          description: |
            A reference you can later use to identify this payment, such as an order number.<br>Can only be alphanumeric and must be unique for Benefit.<br>For Amex, the string limit is 30 characters.
          maxLength: 80
          example: 'ORD-5023-4E89'
        description:
          type: string
          description: A description of the payment.
          maxLength: 100
          example: 'Set of 3 masks'
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: |
            The processing channel to be used for the payment context. Required if this was not set in the request for the OAuth token.
        processing:
          type: object
          description: Use the processing object to influence or override the data during the payment processing.
          properties:
            invoice_id:
              type: string
              description: The identification number of the invoice.
              maxLength: 127
            shipping_amount:
              type: number
              description: The total freight or shipping and handling charges for the transaction.
              minimum: 0
              example: 300
            discount_amount:
              type: number
              description: The discount amount.
              minimum: 0
              example: 5
            tax_amount:
              type: number
              description: The total tax amount for the transaction, in [minor currency units](https://www.checkout.com/docs/payments/accept-payments/calculating-the-amount).
              minimum: 0
              example: 3000
            otp_value:
              type: string
              description: One time password sent to customer by SMS. <br> Required if `source.type` is `StcPay`.
              maxLength: 50
              example: '966557877988'
            airline_data:
              $ref: '#/components/schemas/AirlineData'
            accommodation_data:
              $ref: '#/components/schemas/AccommodationData'
        shipping:
          $ref: '#/components/schemas/Shipping'
        segment:
          $ref: '#/components/schemas/Segment'
    PaymentContextPaymentResponse:
      title: PaymentContextResponse
      type: object
      required:
          - id
          - _links
      properties:
        id:
          $ref: '#/components/schemas/PaymentId'
        payment_type:
          type: string
          description: This is required for card-not-present payments. For example, recurring or mail order / telephone order payments.
          enum:
            - Regular
            - Recurring
            - Installment
            - PayLater
          default: Regular
          example: Recurring
        payment_plan:
          description: The details of the installment plan
          oneOf:
            - $ref: '#/components/schemas/PlanInstallment'
          type: object
        processing:
          properties:
            partner_order_id:
              description: The partner order ID.
              type: string
              example: "5GK24544NA744002L"
        customer:
          $ref: '#/components/schemas/CustomerResponse'
        _links:
          type: object
          description: The links related to the payment.
          properties:
            self:
              type: object
              allOf:
              - $ref: '#/components/schemas/Link'
              description: The URI of the Payment Context.
              example:
                href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pezuxjbcn2giaqnb44'
    PaymentContextProcessing:
      type: object
      description: Use the processing object to influence or override the data sent during card processing.
      properties:
        plan:
          description: 'The plan details for a recurring payment with PayPal. This is required when `payment_type: "recurring"`.'
          required:
            - type
            - skip_shipping_address
            - immutable_shipping_address
          properties:
            type:
              description: Type of payment plan.
              type: string
              example: MERCHANT_INITIATED_BILLING
              enum:
                - MERCHANT_INITIATED_BILLING
                - MERCHANT_INITIATED_BILLING_SINGLE_AGREEMENT
                - CHANNEL_INITIATED_BILLING
                - CHANNEL_INITIATED_BILLING_SINGLE_AGREEMENT
                - RECURRING_PAYMENTS
                - PRE_APPROVED_PAYMENTS
            skip_shipping_address:
              type: boolean
            immutable_shipping_address:
              type: boolean
        discount_amount:
          type: number
          description: The discount amount the merchant applied to the transaction.
          minimum: 0
          example: 5
        shipping_amount:
          type: number
          description: The total freight or shipping and handling charges for the transaction.
          minimum: 0
          example: 300
        tax_amount:
          type: number
          description: The total tax amount for the transaction, in [minor currency units](https://www.checkout.com/docs/payments/accept-payments/calculating-the-amount).
          minimum: 0
          example: 3000
        invoice_id:
          type: string
          description: Invoice ID number.
          maxLength: 127
        brand_name:
          type: string
          description: The label that overrides the business name in the PayPal account on the PayPal pages.
          maxLength: 127
          example: Acme Corporation
        locale:
          type: string
          pattern: '^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}))?$'
          description: The language and region of the customer in ISO 639-2 language code; value consists of language-country.
          example: en-US
          maxLength: 10
          minLength: 2
        shipping_preference:
          type: string
          description: Shipping preference.
          enum:
            - no_shipping
            - set_provided_address
            - get_from_file
          example: set_provided_address
        user_action:
          type: string
          description: Property required by PayPal to have an appropriate payment flow.
          enum:
            - pay_now
            - continue
          example: pay_now
        partner_customer_risk_data:
          type: object
          properties:
            key:
              type: string
              description: The key for the pair.
            value:
              type: string
              description: The value for the pair.
          description: An array of key-and-value pairs with merchant-specific data for the transaction.
        custom_payment_method_ids:
          x-klarna-name: custom_payment_method_ids
          x-cko-passthrough: true
          x-klarna-docs: https://developers.klarna.com/api/#payments-api__create-a-new-credit-session__custom_payment_method_ids
          description: Promo codes - An array that can be used to define which of the configured payment options within a payment category (pay_later, pay_over_time, etc.) should be shown for this purchase.
          type: array
          items:
            type: string
        airline_data:
          $ref: '#/components/schemas/AirlineData'
        accommodation_data:
          $ref: '#/components/schemas/AccommodationData'
    PaymentContextResponse:
      title: Payment Context
      type: object
      required:
        - id
        - partner_metadata
        - processed_on
        - _links
      properties:
        id:
          $ref: '#/components/schemas/PaymentContextId'
        amount:
          type: integer
          description: The payment amount.
        processed_on:
          description: The date and time when the payment context was processed in UTC.
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        status:
          type: string
          description: The status of the payment context.
          example: "Pending"
        response_code:
          type: string
          description: The gateway response code.
          example: '2000'
        response_summary:
          type: string
          description: The gateway response summary.
          example: "Rejected"
        available_payment_types:
          $ref: '#/components/schemas/AvailablePaymentTypes'
        unavailable_payment_types:
          $ref: '#/components/schemas/UnavailablePaymentTypes'
        partner_metadata:
          $ref: '#/components/schemas/PartnerMetadata'
        _links:
            type: object
            description: The links related to the payment.
            properties:
              self:
                type: object
                allOf:
                - $ref: '#/components/schemas/Link'
                description: The URI of the Payment Context.
                example:
                  href: 'https://{prefix}.api.checkout.com/payment-contexts/pct_y3oqhf46pyzuxjbcn2giaqnb44'
    PaymentContextSource:
      type: object
      description: The source of the payment.
      discriminator:
        propertyName: type
        mapping:
          klarna: '#/components/schemas/PaymentContextKlarnaSource'
          paypal: '#/components/schemas/PaymentContextPayPalSource'
          stcpay: '#/components/schemas/PaymentContextStcPaySource'
          tabby: '#/components/schemas/PaymentContextTabbySource'
      required:
        - type
      properties:
        type:
          type: string
          description: The source type of the payment context request.
          example: "paypal"
    PaymentContextKlarnaSource:
      ###
      # Warning: this file was auto generated from OpenAPI specs. Do not manually edit. 
      ###
      type: object
      description: 'Klarna Source'
      allOf:
        - $ref: '#/components/schemas/PaymentContextSource'
        - type: object
          required:
            - account_holder
          properties:
            account_holder:
              required:
                - billing_address
              type: object
              properties:
                billing_address:
                  required:
                    - country
                  type: object
                  properties:
                    country:
                      type: string
                      description: 'The billing country or purchase country of the customer. The two-letter ISO country code of the address'
    PaymentContextPayPalSource:
      type: object
      description: 'PayPal Source'
      allOf:
        - $ref: '#/components/schemas/PaymentContextSource'
        - type: object
    PaymentContextStcPaySource:
      type: object
      description: 'StcPay Source'
      allOf:
        - $ref: '#/components/schemas/PaymentContextSource'
        - type: object
    PaymentContextTabbySource:
      type: object
      description: 'PayPal Source'
      allOf:
        - $ref: '#/components/schemas/PaymentContextSource'
        - type: object
    UnavailablePaymentTypes:
      type: array
      description: Contains information about the unavailable payment type returned by the partner for this purchase.
      items:
        type: object
        properties:
          payment_type:
            type: string
            description: The unavailable payment type returned by the partner for this purchase.
            enum:
              - Regular
              - PayLater
              - Installment
          rejection_reason:
            type: string
            description: The reason why the payment type is unavailable.
          payment_plan:
            $ref: '#/components/schemas/PaymentPlan'
          description:
            type: string
    PaymentInterfacesStorePaymentDetails:
      description: |
        Specifies whether you intend to store the cardholder's payment details.
      
        If you set this field to `enabled`, you must:
      
        - have obtained consent from the cardholder to store their payment details
        - provide a customer ID or email address in the request
      
        If the request's `payment_type` is set to one of the following values, you do not need to provide this field:
      
         - `Installment`
         - `Recurring`
         - `Unscheduled`
      default: disabled
      type: string
      enum:
        - disabled
        - enabled
    GetPaymentLinkResponse:
      type: object
      discriminator:
        propertyName: status
        mapping:
          Active: '#/components/schemas/PaymentLinkResponseStatusActive'
          Payment Received: '#/components/schemas/PaymentLinkResponseStatusPaymentReceived'
          Expired: '#/components/schemas/PaymentLinkResponseStatusExpired'
      
      required:
        - id
        - status
        - amount
        - currency
        - expires_on
        - created_on
        - billing
        - _links
      
      properties:
        id:
          example: pl_ELqQJXdXzabU
          allOf:
            - $ref: '#/components/schemas/PaymentLinkId'
        status:
          type: string
          enum:
            - Active
            - Payment Received
            - Expired
          description: |
            The status of the Payment Link:
              - `Active`: The Payment Link can accept a payment from the customer. A payment may have been attempted by the customer but not completed successfully.
              - `Payment Received`: A payment has been received successfully using this Payment Link.
              - `Expired`: The Payment Link has expired and can no longer be accessed.
          example: Active
        payment_id:
          type: string
          description: Unique identifier for an in progress or completed payment for this Payment Link.
          example: 'pay_88cb4e671m1da22e9bbbyx'
        amount:
          type: integer
          description: The original payment amount.
          example: 100
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a> of the payment.<br>
          example: GBP
        reference:
          type: string
          description: Your reference for the payment.
          example: ORD-123A
        description:
          type: string
          description: A description of the payment.
          example: Payment for Gold Necklace
        created_on:
          type: string
          description: The date and time when the Payment Link was created.
          format: date-time
          example: '2021-08-19T20:25:28.725Z'
        expires_on:
          type: string
          description: The date and time when the Payment Link expires.
          format: date-time
          example: '2021-08-20T20:25:28+08:00'
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: The processing channel to be used for the payment
          example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq'
        amount_allocations:
          allOf:
            - $ref: '#/components/schemas/AmountAllocations'
        customer:
          type: object
          description: The customer's details.
          properties:
            email:
              type: string
              format: email
              description: The email address for the customer.
              example: brucewayne@email.com
            name:
              type: string
              description: The customer's name.
              example: Bruce Wayne
        shipping:
          type: object
          description: The address any products are being sent to.
          required:
            - address
          properties:
            address:
              type: object
              description: The customer's address to ship to.
              required:
                - country
              allOf:
                - $ref: '#/components/schemas/Address'
        billing:
          type: object
          additionalProperties: false
          description: The billing details.
          required:
            - address
          properties:
            address:
              type: object
              description: The billing address.
              required:
                - country
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              type: object
              description: The customer's phone number.
              required:
                - number
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
        products:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesProducts'
        metadata:
          type: object
          title: The Metadata Schema
          description: Any additional information stored at the point of creation.
          additionalProperties: true
        locale:
          type: string
          description: The language that the Payment Link page is displayed in.
          enum:
            - ar
            - da-DK
            - de-DE
            - el
            - en-GB
            - es-ES
            - fi-FI
            - fil-PH
            - fr-FR
            - hi-IN
            - id-ID
            - it-IT
            - ja-JP
            - ms-MY
            - nb-NO
            - nl-NL
            - pt-PT
            - sv-SE
            - th-TH
            - vi-VN
            - zh-CN
            - zh-HK
            - zh-TW
        return_url:
          type: string
          format: uri
          description: If provided, the success page will include a button that redirects your customer to the provided URL.
          example: https://example.com/success
          maxLength: 255
    PaymentLinkId:
      type: string
      pattern: '^pl_[A-Za-z0-9_-]{12}$'
      description: The unique identifier for a Payment Link.
      maxLength: 15
      minLength: 15
    PaymentLinkResponseLinks:
      type: object
      description: The links related to the Payment Link.
      minItems: 2
      required:
        - self
        - redirect
      properties:
        self:
          type: object
          allOf:
            - $ref: '#/components/schemas/Link'
          description: The URI of the Payment Link details.
        redirect:
          type: object
          description: The link to visit the Payment Link page.
          allOf:
            - $ref: '#/components/schemas/Link'
        payment:
          type: object
          description: The URI of the in progress or completed payment for this Payment Link.
          allOf:
            - $ref: '#/components/schemas/Link'
        payment_actions:
          type: object
          description: The URI of the actions associated with the in progress or completed payment for this Payment Link.
          allOf:
            - $ref: '#/components/schemas/Link'
      example:
        self:
          href: 'https://{prefix}.api.sandbox.checkout.com/payment-links/pl_ELqQJXdXzabU'
        redirect:
          href: 'https://pay.sandbox.checkout.com/link/pl_ELqQJXdXzabU'
    PaymentLinkResponseStatusActive:
      type: object
      description: A Payment Link that is active and can accept a payment from a customer.
      allOf:
        - $ref: '#/components/schemas/GetPaymentLinkResponse'
        - type: object
          properties:
            _links:
              allOf:
                - $ref: '#/components/schemas/PaymentLinkResponseLinks'
    PaymentLinkResponseStatusExpired:
      type: object
      description: An expired Payment Link
      allOf:
        - $ref: '#/components/schemas/GetPaymentLinkResponse'
        - type: object
          properties:
            _links:
              allOf:
                - $ref: '#/components/schemas/PaymentLinkResponseLinks'
    PaymentLinkResponseStatusPaymentReceived:
      type: object
      description: A Payment Link that has received a payment
      required:
        - payment_id
      allOf:
        - $ref: '#/components/schemas/GetPaymentLinkResponse'
        - type: object
          properties:
            _links:
              required:
                - payment
                - payment_actions
              allOf:
                - $ref: '#/components/schemas/PaymentLinkResponseLinks'
              example:
                self:
                  href: 'https://{prefix}.api.sandbox.checkout.com/payment-links/pl_ELqQJXdXzabU'
                redirect:
                  href: 'https://pay.sandbox.checkout.com/link/pl_ELqQJXdXzabU'
                payment:
                  href: https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4
                payment_actions:
                  href: https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions
    PaymentLinksRequest:
      type: object
      required:
        - amount
        - currency
        - billing
      properties:
        amount:
          type: integer
          description: The payment amount. The exact format <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="_blank">depends on the currency</a>.
          minimum: 1
          example: 1000
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a> of the payment.<br><i>The `currency` and `billing.address.country` fields determine which payment methods are shown on the payment page</i>.
          example: GBP
          minLength: 3
          maxLength: 3
        payment_type:
          type: string
          description: This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order)
          enum:
            - Regular
            - Recurring
          default: Regular
        authorization_type:
          type: string
          description: The authorization type.
          enum:
            - Final
            - Estimated
          default: Final
          example: 'Estimated'
        payment_plan:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionPaymentPlanRecurring'
        payment_ip:
          deprecated: true
          description: The Customers IP address. Only IPv4 and IPv6 addresses are accepted.
          allOf:
            - $ref: '#/components/schemas/IPAddress'
        billing_descriptor:
          type: object
          description: An optional description that is displayed on the customer's statement identifying a purchase
          required:
            - name
            - city
          properties:
            name:
              type: string
              maxLength: 25
              description: A dynamic description of the change
            city:
              type: string
              minLength: 1
              maxLength: 13
              description: The city from which the charge originated
            reference:
              type: string
              maxLength: 50
              description: The reference shown on the statement. Required for payouts to bank accounts.
        reference:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesReference'
        description:
          type: string
          description: A description of the payment.
          example: Payment for Gold Necklace
          maxLength: 100
        display_name:
          description: The merchant name to display to customers on the checkout page.
          type: string
          example: The Jewelry Shop
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: | 
            The processing channel to use for the payment. <p/>
      
            This field is required if you have more than one processing channel associated with your API key.
          example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq'
        amount_allocations:
          allOf:
            - $ref: '#/components/schemas/AmountAllocations'
        expires_in:
          type: integer
          description: The time for which the link remains valid, in seconds.
          minimum: 1
          maximum: 5184000
          default: 86400
          example: 604800
        customer:
          type: object
          description: The customer's details
          properties:
            email:
              type: string
              format: email
              description: The customer's email address.
              example: ali.farid@example.com
              maxLength: 255
            name:
              type: string
              description: | 
                The customer's name.
                
                This will only set the name for new customers.
              example: Ali Farid
              maxLength: 255
            phone:
              description: The customer's phone number.
              allOf:
                - $ref: '#/components/schemas/PaymentInterfacesPhoneNumber'
            summary:
              allOf:
                - $ref: '#/components/schemas/PaymentInterfacesCustomerSummary'
        shipping:
          type: object
          description: The address any products are being sent to.
          required:
            - address
          properties:
            address:
              type: object
              description: The customer's address to ship to.
              required:
                - country
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              type: object
              description: The customer's phone number
              required:
                - number
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
        billing:
          type: object
          additionalProperties: false
          description: The billing details.
          required:
            - address
          properties:
            address:
              type: object
              description: The billing address.
              required:
                - country
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              type: object
              description: The customer's phone number
              required:
                - number
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
        recipient:
          $ref: '#/components/schemas/PaymentInterfacesRecipient'
        processing:
          $ref: '#/components/schemas/PaymentInterfacesProcessing'
        allow_payment_methods:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPaymentMethods'
          example: ["card", "applepay", "googlepay"]
          description: |
            Specifies which payment method options to present to the customer.
            
            The values in this field override any equivalent values in `disabled_payment_methods`.
      
            Some payment methods have additional field requirements. See the <a href="https://www.checkout.com/docs/payments/accept-payments/create-a-payment-link/manage-payment-links#Payment_method_field_requirements" target="_blank">documentation</a> for more information.
        disabled_payment_methods:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPaymentMethods'
          example: ["eps", "ideal", "knet"]
          description: |
            Specifies which payment method options to not present to the customer.
            
            If you specify the same payment method in this field and in `allow_payment_methods`, the `disabled_payment_methods` value will be overridden.
      
            Any payment method options not explicitly specified in this field will be presented to the customer by default.
        products:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesProducts'
        metadata:
          type: object
          title: The Metadata Schema
          description: Allows you to store additional information about the transaction. This object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays.
          additionalProperties: true
        3ds:
          type: object
          description: Information required for 3D Secure payments.
          properties:
            enabled:
              type: boolean
              description: Whether to process this payment as a 3D Secure payment.
              default: false
            attempt_n3d:
              type: boolean
              description: Applies only when `3ds.enabled` is set to `true`. Set to `true` to attempt the payment without 3DS when the issuer, card, or network doesn’t support 3DS.
              default: false
            challenge_indicator:
              type: string
              description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge.
              enum:
                - no_preference
                - no_challenge_requested
                - challenge_requested
                - challenge_requested_mandate
              default: no_preference
            allow_upgrade:
              type: boolean
              default: true
              description: Whether to process this payment as 3D Secure if the authorization was soft declined because 3DS authentication is required.
            exemption:
              type: string
              enum:
                - low_value
                - secure_corporate_payment
                - trusted_listing
                - transaction_risk_assessment
                - 3ds_outage
                - sca_delegation
                - out_of_sca_scope
                - other
                - low_risk_program
                - recurring_operation
              description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://www.checkout.com/docs/payments/regulation-support/sca-compliance-guide#Possible_SCA_exemptions" target="_blank">SCA compliance guide</a>.
        risk:
          description: Configures the risk assessment performed during payment processing.
          type: object
          properties:
            enabled:
              description: Specifies whether to perform a risk assessment.
              default: true
              example: false
              type: boolean
          required:
            - enabled
        customer_retry:
          description: |
            Configures the parameters for customer retries.
            
            A customer retry is a payment attempt performed by the customer on the checkout page. This differs from [authorization request retries](https://api-reference.checkout.com/#operation/requestAPaymentOrPayout!path=0/retry&t=request) performed in the back end by Checkout.com.
          type: object
          properties:
            max_attempts:
              description: The maximum number of customer retry attempts, excluding the initial payment attempt.
              example: 2
              default: 5
              minimum: 0
              maximum: 5
              type: integer
        sender:
          description: The sender of the payment.
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesSender'
        return_url:
          type: string
          format: uri
          description: If provided, the success page will include a button that redirects your customer to the provided URL.
          example: https://example.com/success
          maxLength: 255
        locale:
          type: string
          description: Creates a translated version of the page in the specified language
          enum:
            - ar
            - da-DK
            - de-DE
            - el
            - en-GB
            - es-ES
            - fi-FI
            - fil-PH
            - fr-FR
            - hi-IN
            - id-ID
            - it-IT
            - ja-JP
            - ms-MY
            - nb-NO
            - nl-NL
            - pt-PT
            - sv-SE
            - th-TH
            - vi-VN
            - zh-CN
            - zh-HK
            - zh-TW
          default: en-GB
        capture:
          type: boolean
          description: Whether to capture the payment (if applicable).
          example: true
        capture_on:
          description: |
            A timestamp (ISO 8601 code) that determines when the payment should be captured.
            Providing this field will automatically set `capture` to true.
          allOf:
            - $ref: '#/components/schemas/Timestamp'
        instruction:     
          type: object
          description: Details about the payment instruction.
          properties:
            purpose:
              allOf:
                - $ref: '#/components/schemas/Purpose'
        payment_method_configuration:
          description: Configuration options for specific payment methods.
          type: object
          properties:
            applepay:
              description: Configuration options specific to Apple Pay payments.
              type: object
              properties:
                account_holder:
                  type: object
                  description: The account holder's details.
                  required:
                    - type
                  discriminator:
                    propertyName: type
                    mapping:
                      individual: '#/components/schemas/01_PaymentSessionRequest_AccountHolderIndividual'
                      corporate: '#/components/schemas/02_PaymentSessionRequest_AccountHolderCorporate'
                      government: '#/components/schemas/03_PaymentSessionRequest_AccountHolderGovernment'
                  properties:
                    type:
                      type: string
                      example: 'individual'
                store_payment_details:
                  $ref: '#/components/schemas/PaymentInterfacesStorePaymentDetails'
            card:
              description: Configuration options specific to card payments.
              type: object
              properties:
                store_payment_details:
                  description: |
                    Specifies whether you intend to store the cardholder's payment details.
      
                    If you set this field to `enabled` or `collect_consent`, you must:
      
                    - Have obtained consent from the cardholder to store their payment details
                    - Provide `customer.id` or `customer.email` in the request
      
                    You do not need to provide this field if `payment_type` is set to one of the following values:
      
                     - `Installment`
                     - `Recurring`
                     - `Unscheduled`
                  default: disabled
                  type: string
                  enum:
                    - disabled
                    - enabled
                    - collect_consent
                account_holder:
                  type: object
                  description: The account holder's details.
                  required:
                    - type
                  discriminator:
                    propertyName: type
                    mapping:
                      individual: '#/components/schemas/01_PaymentSessionRequest_AccountHolderIndividual'
                      corporate: '#/components/schemas/02_PaymentSessionRequest_AccountHolderCorporate'
                      government: '#/components/schemas/03_PaymentSessionRequest_AccountHolderGovernment'
                  properties:
                    type:
                      type: string
                      example: 'individual'
            googlepay:
              description: Configuration options specific to Google Pay payments.
              type: object
              properties:
                account_holder:
                  type: object
                  description: The account holder's details.
                  required:
                    - type
                  discriminator:
                    propertyName: type
                    mapping:
                      individual: '#/components/schemas/01_PaymentSessionRequest_AccountHolderIndividual'
                      corporate: '#/components/schemas/02_PaymentSessionRequest_AccountHolderCorporate'
                      government: '#/components/schemas/03_PaymentSessionRequest_AccountHolderGovernment'
                  properties:
                    type:
                      type: string
                      example: 'individual'
                store_payment_details:
                  $ref: '#/components/schemas/PaymentInterfacesStorePaymentDetails'
    PaymentLinksResponse:
      type: object
      required:
        - id
        - _links
      properties:
        id:
          example: pl_ELqQJXdXzabU
          allOf:
            - $ref: '#/components/schemas/PaymentLinkId'
        expires_on:
          type: string
          description: The date and time when the Payment Link expires.
          format: date-time
          example: '2020-08-20T20:25:28+08:00'
        reference:
          type: string
          description: A reference you can later use to identify this payment, such as an order number.
          example: ORD-123A
        warnings:
          type: array
          description: Related to the `allow_payment_methods` object in the request. Included in the response if an alternative payment method is passed through, but no card schemes are configured against the account.
          items:
            type: object
            properties:
              code:
                type: string
                description: The reason for the warning
                example: payment_method_unavailable
              description:
                type: string
                description: The description of the warning code
                example: The card was provided in the `allow_payment_methods` object, but no card schemes are configured.
              value:
                type: string
                description: Payment method for which the warning applies
                enum:
                  - card
                  - sofort
                  - ideal
                  - knet
                  - bancontact
                  - eps
                  - p24
                  - multibanco
        _links:
          type: object
          description: The links related to the Payment Link session.
          readOnly: true
          properties:
            self:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: 'https://{prefix}.api.sandbox.checkout.com/payment-links/pl_ELqQJXdXzabU'
            redirect:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: 'https://pay.sandbox.checkout.com/link/pl_ELqQJXdXzabU'
    PaymentMethod:
      type: object
      title: PaymentMethod
      required:
        - type
      properties:
        type:
          type: string
          description: The payment method type.
          enum:
            - accel
            - ach
            - alipay_cn
            - alipay_hk
            - alipay_plus
            - alma
            - amex
            - bancontact
            - blik
            - boost
            - bpi
            - card_scheme
            - cartes_bancaires
            - china_union_pay
            - connect_wallet
            - dana
            - dci
            - diners
            - discover
            - eps
            - gcash
            - ideal
            - jcb
            - kakaopay
            - klarna
            - knet
            - mada
            - mastercard
            - mbway
            - multibanco
            - nyce
            - omannet
            - p24
            - paypal
            - paypay
            - pulse
            - qpay
            - rabbit_line_pay
            - sepa
            - sequra
            - shazam
            - star
            - stcpay
            - swish
            - tamara
            - tng
            - truemoney
            - upi
            - visa
            - wechatpay
        partner_merchant_id:
          type: string
          description: The unique identifier for the merchant, provided by the partner.
          example: Z7X8LKJ3PQR5N
    PaymentMethodsResponse:
      type: object
      title: PaymentMethodsResponse
      required:
        - methods
      properties:
        methods:
          type: array
          description: The payment methods enabled for the processing channel.
          items:
            $ref: '#/components/schemas/PaymentMethod'
    3dsData:
      type: object
      properties:
        downgraded:
          type: boolean
          description: Indicates whether this was a 3D Secure payment downgraded to non-3D Secure (when `attempt_n3d` is specified)
          example: false
        enrolled:
          type: string
          description: >
            Indicates the 3D Secure enrollment status of the issuer
              * `Y` - Issuer enrolled
              * `N` - Customer not enrolled
              * `U` - Unknown
          example: Y
        signature_valid:
          type: string
          description: Verification to ensure the integrity of the response
          example: Y
        authentication_response:
          $ref: '#/components/schemas/ResponseCode'
        authentication_status_reason:
          type: string
          description: |
            The response from the Directory Server (DS) or Access Control Server (ACS), which provides information on why you received the given `authentication_response` value. 
            
            This field is only returned as a result of a 3DS2 authentication, and only if the returned `authentication_response` value was not `Y`.
            Refer to our <a href="https://www.checkout.com/docs/risk-management/3d-secure/sessions/understand-authentication-failures#Common_authentication_failures" target="_blank">authentication failures</a> documentation for more information.
        cryptogram:
          type: string
          description: Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the integrity of the 3D secure payment data
          example: hv8mUFzPzRZoCAAAAAEQBDMAAAA=
        xid:
          type: string
          description: Unique identifier for the transaction assigned by the MPI
          example: MDAwMDAwMDAwMDAwMDAwMzIyNzY=
        eci:
          type: string
          description: |
            The <a href="https://www.checkout.com/docs/developer-resources/codes/eci-values">Electronic Commerce Indicator (ECI)</a> security level returned in the payment's authentication response.
        version:
          type: string
          description: Indicates the version of 3D Secure that was used for authentication
          example: '2.1.0'
        exemption:
          type: string
          enum:
            - 3ds_outage
            - data_share
            - low_risk_program
            - low_value
            - none
            - other
            - out_of_sca_scope
            - sca_delegation
            - secure_corporate_payment
            - transaction_risk_assessment
            - trusted_listing
            - trusted_listing_prompt
          description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://www.checkout.com/docs/payments/regulation-support/sca-compliance-guide#Possible_SCA_exemptions" target="_blank">SCA compliance guide</a>
          example: 'low_value'
        exemption_applied:
          type: string
          description: Specifies the applied exemption during 3DS authentication
        challenged:
          type: boolean
          description: Indicates whether this session involved a challenge. This will only be set after communication with the scheme is finished.
          example: true
        upgrade_reason:
          type: string
          description: Indicates the reason why the payment was upgraded to 3D Secure.
          example: sca_retry
        trusted_listing:
          type: object
          description: The details of the trusted listing status of the merchant
          allOf:
            - $ref: '#/components/schemas/TrustedListing'
    3dsEnrollmentData:
      type: object
      properties:
        downgraded:
          type: boolean
          description: Indicates whether this was a 3D Secure payment downgraded to non-3D-Secure (when `attempt_n3d` is specified)
          example: false
        enrolled:
          type: string
          description: >
            Indicates the 3D Secure enrollment status of the issuer
              * `Y` - Issuer enrolled
              * `N` - Customer not enrolled
              * `U` - Unknown
          example: Y
        upgrade_reason:
          type: string
          description: Indicates the reason why the payment was upgraded to 3D Secure.
          example: sca_retry
    3dsRequest:
      type: object
      title: Integrated authentication
      description: Required information to process a 3DS authentication with the payment request
      discriminator:
        propertyName: enabled
        mapping:
          'false': '#/components/schemas/3dsRequestNonEnabled'
          'true': '#/components/schemas/3dsRequestEnabled'
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: Whether to process this payment as a 3D Secure payment. Payments where `merchant_initiated` is `true` will be processed as <a href="https://www.checkout.com/docs/payments/authenticate-payments/3d-secure/request-3ri-authentication" target="_blank">3DS Requestor Initiated.</a>
          example: true
        challenge_indicator:
          type: string
          description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge.
          enum:
            - no_preference
            - no_challenge_requested
            - challenge_requested
            - challenge_requested_mandate
          default: no_preference
    3dsRequestEnabled:
      type: object
      description: 3DS authentication enabled
      required:
        - enabled
      allOf:
        - $ref: '#/components/schemas/3dsRequest'
        - type: object
          properties:
            attempt_n3d:
              type: boolean
              description: |
                Applies only when `3ds.enabled` is set to `true`. Set to `true` to attempt the payment without 3DS when the issuer, card, or network doesn’t support 3DS.
              default: false
              example: true
            exemption:
              type: string
              enum:
                - low_value
                - trusted_listing
                - trusted_listing_prompt
                - transaction_risk_assessment
                - data_share
              description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://docs.checkout.com/four/payments/regulation-support/sca-compliance-guide#SCAcomplianceguide-PossibleSCAexemptionsexemptions" target="_blank">SCA compliance guide</a>
              example: 'low_value'
            merchant_authentication_info:
              type: object
              description: The information about how the 3DS Requestor authenticated the cardholder before or during the transaction
              allOf:
                - $ref: '#/components/schemas/MerchantAuthenticationInfo'
            account_info:
              type: object
              description: Additional information about the cardholder's account
              allOf:
                - $ref: '#/components/schemas/AccountInfo'
    3dsRequestNonEnabled:
      type: object
      description: 3DS authentication not enabled
      required:
        - enabled
      allOf:
        - $ref: '#/components/schemas/3dsRequest'
        - type: object
          properties:
            allow_upgrade:
              type: boolean
              description: Indicates whether to process this payment as 3D Secure if the authorization was soft declined due to 3DS authentication required. For processing channels created before October 12, 2022, the value will default to `false`.
              default: true
              example: true
            exemption:
              type: string
              enum:
                - low_value
                - trusted_listing
                - trusted_listing_prompt
                - transaction_risk_assessment
                - 3ds_outage
                - sca_delegation
                - out_of_sca_scope
                - low_risk_program
                - recurring_operation
                - data_share
                - other
              description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://docs.checkout.com/four/payments/regulation-support/sca-compliance-guide#SCAcomplianceguide-PossibleSCAexemptionsexemptions" target="_blank">SCA compliance guide</a>
              example: 'low_value'
    3dsRequestStandalone:
      type: object
      title: Standalone authentication
      description: Required information to process a payment that has been 3DS authenticated using our <a href="https://www.checkout.com/docs/risk-management/3d-secure/sessions#Non-hosted" target="_blank">Standalone authentication</a>
      required:
        - enabled
        - authentication_id
      
      properties:
        enabled:
          type: boolean
          description: Whether to process this payment as a 3D Secure payment
          enum: [true]
          example: true
        authentication_id:
          type: string
          pattern: "^(sid)_(\\w{26})$"
          minLength: 30
          maxLength: 30
          example: sid_y3oqhf46pyzuxjbcn2giaqnb44
          description: The unique identifier for your 3D Secure session.
    3dsRequestThirdParty:
      type: object
      title: Third party authentication
      description: Required information to process a payment that has been 3DS authenticated using a <a href="https://www.checkout.com/docs/risk-management/3d-secure/sessions#Non-hosted" target="_blank">Third Party provider</a>
      
      required:
        - enabled
        - eci
        - cryptogram
        - xid
        - version
      
      properties:
        enabled:
          type: boolean
          description: Whether to process this payment as a 3D Secure payment
          enum: [true]
          example: true
        eci:
          type: string
          description: The Electronic Commerce Indicator security level associated with the 3D Secure enrollment result. Required if using a third-party merchant plug-in (MPI)
          maxLength: 2
          example: '05'
        cryptogram:
          type: string
          description: A Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the cardholder authentication result (3D Secure). Required if using an external MPI
          maxLength: 100
          example: AgAAAAAAAIR8CQrXcIhbQAAAAAA=
        xid:
          type: string
          description: The 3D Secure transaction identifier. Required if using an external MPI with 3D Secure 2.X.X and a Mastercard card, or with 3D Secure 1.X.X for any supported card scheme
          maxLength: 100
          example: MDAwMDAwMDAwMDAwMDAwMzIyNzY=
        version:
          type: string
          description: Indicates the version of 3D Secure that was used for authentication. Defaults to 1.0.0 if not provided
          maxLength: 10
          example: '2.0.1'
        exemption:
          type: string
          enum:
            - low_value
            - secure_corporate_payment
            - trusted_listing
            - transaction_risk_assessment
            - 3ds_outage
            - sca_delegation
            - out_of_sca_scope
            - other
            - low_risk_program
            - recurring_operation
          description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://docs.checkout.com/four/payments/regulation-support/sca-compliance-guide#SCAcomplianceguide-PossibleSCAexemptionsexemptions" target="_blank">SCA compliance guide</a>
          example: 'low_value'
        status:
          type: string
          example: "Y"
          maxLength: 1
          minLength: 1
          description: The transaction status returned from the card Issuer’s Access Control Server (ACS) or Scheme Directory Server (DS). For 3DS Secure 1, this is the PaRes Status. for 3D Secure 2, this is the transaction status of ARes(frictionless flow) or RReq (Challenge flow)
        authentication_date:
          type: string
          example: "2020-09-03T10:11:12Z"
          description: "Authentication date and time. Format ISO-8601"
          nullable: true
        authentication_amount:
          type: number
          example: 200
          minimum: 0
          description: "Authentication amount"
          nullable: true
        flow_type:
          type: string
          enum:
            - challenged
            - frictionless
            - frictionless_delegated
          description: Indicates whether the 3D Secure 2 authentication was challenged or frictionless.
        challenge_indicator:
          type: string
          description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge.
          enum:
            - no_preference
            - no_challenge_requested
            - challenge_requested
            - challenge_requested_mandate
          default: no_preference
        status_reason_code:
          type: string
          example: "01"
          maxLength: 2
          minLength: 2
          description: "A code indicating the reason for the transaction status"
        challenge_cancel_reason:
          type: string
          example: "01"
          description: 'Indicates a cancel reason for a challenge in the case of authentication. Can be any number from 00 to 99, with 00 being specific ONLY to Cartes Bancaires.'
        score:
          type: string
          description: Risk score calculated by Directory Server (DS). Cartes Bancaires 3D Secure 2 only.
        cryptogram_algorithm:
          type: string
          example: "1"
          maxLength: 1
          minLength: 1
          description: The algorithm used by the Issuer Access Control Server (ACS) to calculate the Authentication cryptogram. This is the AVALGO data returned in Cartes Bancaires Authentication.
        initial_authentication:
          type: object
          description: The details of a previous authentication
          allOf:
            - $ref: '#/components/schemas/InitialAuthentication'
    AccommodationData:
      type: array
      description: Contains information about the accommodation booked by the customer.
      items:
        title: Accommodation Data
        type: object
        properties:
          name:
            type: string
            description: For lodging, contains the lodging name that appears on the storefront/customer receipts. For cruise, contains the ship name booked for the cruise.
            example: The Sea View Hotel
          booking_reference:
            type: string
            description: A unique identifier for the booking.
            example: HOTEL123
          check_in_date:
            type: string
            format: date
            description: For lodging, contains the actual or scheduled date the guest checked-in. For cruise, contains the cruise departure date also known as sail date.
            example: '2023-06-20'
          check_out_date:
            type: string
            format: date
            description: For lodging, contains the actual or scheduled date the guest checked-out. For cruise, contains the cruise return date also known as sail end date.
            example: '2023-06-23'
          address:
            type: object
            description: The address details of the accommodation.
            properties:
              address_line1:
                type: string
                description: The first line of the address.
                example: 123 Beach Road
              zip:
                type: string
                description: The postal code for the address.
                example: '10001'
          state:
            type: string
            description: The state or province of the address country (ISO 3166-2 code of up to two alphanumeric characters).
            example: FL
          country:
            type: string
            description: The ISO country code of the address.
            example: USA
          city:
            type: string
            description: The address city.
            example: Los Angeles
          number_of_rooms:
            type: integer
            description: The total number of rooms booked for the accommodation.
            example: 2
          guests:
            type: array
            description: Contains information about the guests staying at the accommodation.
            items:
              type: object
              properties:
                first_name:
                  type: string
                  description: The first name of the guest.
                  example: Jane
                last_name:
                  type: string
                  description: The last name of the guest.
                  example: Doe
                date_of_birth:
                  type: string
                  format: date
                  description: The date of birth of the guest.
                  example: '1985-07-14'
          room:
            type: array
            description: Contains information about the rooms booked by the customer.
            items:
              type: object
              properties:
                rate:
                  type: string
                  description: For lodging, contains the nightly rate for one room. For cruise, contains the total cost of the cruise.
                  example: '70'
                number_of_nights_at_room_rate:
                  type: string
                  description: For lodging, contains the number of nights charged at the rate provided in the rate field. For cruise, contains the length of the cruise in days.
                  example: '3'
          property_phone:
            type: array
            description: The property's phone information.
            items:
              type: object
              properties:
                country_code:
                  type: string
                  description: The property's phone country code.
                  example: '44'
                number:
                  type: string
                  description: The property's phone number.
                  example: '7123456789'
          customer_service_phone:
            type: array
            description: The customer service phone information.
            items:
              type: object
              properties:
                country_code:
                  type: string
                  description: The customer service phone country code.
                  example: '44'
                number:
                  type: string
                  description: The customer service phone number.
                  example: '7123456789'
    AccountInfo:
      type: object
      title: AccountInfo
      description: >
        Additional information about the cardholder's account
      properties:
        purchase_count:
          type: number
          description: >
            The number of purchases with this cardholder's account during the last six months
          example: 10
          minimum: 0
          maximum: 9999
        account_age:
          type: string
          description: >
            The length of time that the payment account was enrolled in the cardholder's account
          enum:
            - no_account
            - created_during_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        add_card_attempts:
          type: number
          description: >
            The number of _Add Card_ attempts in the last 24 hours
          example: 10
          minimum: 0
          maximum: 999
        shipping_address_age:
          type: string
          description: >
            Indicates when the shipping address for this transaction was first used
          enum:
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        account_name_matches_shipping_name:
          type: boolean
          description: >
            Indicates if the cardholder name on the account is identical to the shipping name used for this transaction
          example: true
        suspicious_account_activity:
          type: boolean
          description: >
            Indicates whether suspicious activity on the cardholder account has been observed
          example: true
        transactions_today:
          type: number
          description: >
            The number of transactions (successful and abandoned) for the cardholder account across all payment accounts in the previous 24 hours
          minimum: 0
          maximum: 999
          example: 10
        authentication_method:
          type: string
          description: >
            Information about how the cardholder was authenticated before or during the transaction
          enum:
            - no_authentication
            - own_credentials
            - federated_id
            - issuer_credentials
            - third_party_authentication
            - fido
        cardholder_account_age_indicator:
          type: string
          description: The length of time the cardholder has held the account with the 3DS Requestor
          enum:
            - no_account,
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        account_change:
          type: string
          format: date-time
          description: |
            The UTC date and time the cardholder’s account with the 3DS Requestor was last changed, in ISO 8601 format.
            
            Changes that affect this value include:
            - updating the billing or shipping address
            - adding a new payment account
            - adding a new user
        account_change_indicator:
          type: string
          description: |
            The amount of time since the cardholder’s account information with the 3DS Requestor was last changed.
            
            Changes that affect this value include:
            - updating the billing or shipping address
            - adding a new payment account
            - adding a new user
          enum:
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        account_date:
          type: string
          format: date-time
          description: The UTC date and time the cardholder opened the account with the 3DS Requestor, in ISO 8601 format.
        account_password_change:
          type: string
          format: date-time
          description: The UTC date and time the cardholder’s account with the 3DS Requestor was last reset or had a password change, in ISO 8601 format.
        account_password_change_indicator:
          type: string
          description: The amount of time since the cardholder’s account with the 3DS Requestor was last reset or had a password change.
          enum:
            - no_change
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        transactions_per_year:
          type: integer
          description:  |
            The number of transactions associated with the cardholder's account with the 3DS Requestor in the previous year. This value includes both successful and abandoned transactions, across all payment accounts. 
          
            Set this value to `999` if the number of transactions is `1000` or greater.
          example: 2
          maxLength: 3
          maximum: 999
        payment_account_age:
          type: string
          format: date-time
          description: The UTC date and time the payment account was enrolled in the cardholder’s account with the 3DS Requestor, in ISO 8601 format.
        shipping_address_usage:
          type: string
          format: date-time
          description: The UTC date and time the shipping address used for the transaction was first used with the 3DS Requestor, in ISO 8601 format.
        account_type:
          type: string
          description: The type of account, in the case of a card product with multiple accounts.
          enum:
            - not_applicable
            - credit
            - debit
        account_id:
          type: string
          description: Additional information about the account optionally provided by the 3DS Requestor
          maxLength: 64
    ActionId:
      type: string
      pattern: "^(act)_(\\w{26})$"
      description: The action identifier
      maxLength: 30
      minLength: 30
      example: 'act_y3oqhf46pyzuxjbcn2giaqnb44'
    Aggregator:
      type: object
      title: Aggregator
      description: Information about the payment aggregator.
      properties:
        sub_merchant_id:
          type: string
          description: The sub-merchant ID.
          example: '9cf70789ba90123'
        aggregator_id_visa:
          type: string
          description: The Visa identifier for the payment aggregator.
          example: '10012345'
        aggregator_id_mc:
          type: string
          description: The Mastercard identifier for the payment aggregator.
          example: '00000123456'
    AirlineData:
      type: array
      description: Contains information about the airline ticket and flights booked by the customer.
      items:
        title: Airline Data
        type: object
        properties:
          ticket:
            type: object
            description: Contains information about the airline ticket.
            properties:
              number:
                type: string
                description: The ticket's unique identifier.
                example: 045-21351455613
              issue_date:
                type: string
                format: date
                description: Date the airline ticket was issued.
                example: '2023-05-20'
              issuing_carrier_code:
                type: string
                description: Carrier code of the ticket issuer.
                example: AI
              travel_package_indicator:
                type: string
                description: C = Car rental reservation, A = Airline flight reservation, B = Both car rental and airline flight reservations included, N = Unknown.
                example: B
              travel_agency_name:
                type: string
                description: The name of the travel agency.
                example: World Tours
              travel_agency_code:
                type: string
                description: The unique identifier from IATA or ARC for the travel agency that issues the ticket.
                example: '01'
          passenger:
            type: array
            description: Contains information about the passenger(s) on the flight.
            items:
              title: Passenger Data
              type: object
              properties:
                first_name:
                  type: string
                  description: The passenger's first name.
                  example: John
                last_name:
                  type: string
                  description: The passenger's last name.
                  example: White
                date_of_birth:
                  type: string
                  format: date
                  description: The passenger's date of birth.
                  example: '1990-05-26'
                address:
                  type: object
                  description: Contains information about the passenger's address.
                  properties:
                    country:
                      type: string
                      description: The two-letter ISO country code of the passenger's country residence.
                      example: US
          flight_leg_details:
            type: array
            title: Flight Leg Details
            description: Contains information about the flight leg(s) booked by the customer.
            items:
              type: object
              properties:
                flight_number:
                  type: string
                  description: The flight identifier.
                  example: '101'
                carrier_code:
                  type: string
                  description: The IATA 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details.
                  example: BA
                class_of_travelling:
                  type: string
                  description: 'A one-letter travel class identifier. The following are common: F = First class, J = Business class, Y = Economy class, W = Premium economy.'
                  example: J
                departure_airport:
                  type: string
                  description: The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details.
                  example: LHR
                departure_date:
                  type: string
                  format: date
                  description: The date of the scheduled take off.
                  example: '2023-06-19'
                departure_time:
                  type: string
                  description: The time of the scheduled take off.
                  example: '15:30'
                arrival_airport:
                  type: string
                  description: The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
                  example: LAX
                stop_over_code:
                  type: string
                  description: A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not.
                  example: x
                fare_basis_code:
                  type: string
                  description: The fare basis code, alphanumeric.
                  example: SPRSVR
    AmountAllocations:
      type: array
      description: The sub-entities that the payment is being processed on behalf of
      minItems: 1
      maxItems: 50
      items:
        type: object
        required:
          - id
          - amount
        title: Amount Allocations
        properties:
          id:
            type: string
            description: "The id of the sub-entity."
            example: "ent_w4jelhppmfiufdnatam37wrfc4"
          amount:
            type: integer
            description: |
              The split amount - this will be credited to your sub-entity's currency account. The sum of all split amounts must be equal to the payment amount.      
      
              The amount must be provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
            minimum: 0
            format: int64
            maximum: 9999999999
            example: 1000
          reference:
            type: string
            description: A reference you can later use to identify this split, such as an order number.
            maxLength: 50
            example: "ORD-5023-4E89"
          commission:
            type: object
            title: Commission
            description: |
              Commission you'd like to collect from this split - this will be credited to your currency account. The commission cannot exceed the split amount.
      
              Commission = (`amount` * `commission.percentage`) + `commission.amount`
            properties:
              amount:
                type: integer
                description: |
                  Optional fixed amount of commission to collect.
      
                  The amount must be provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
                minimum: 0
                example: 1000
              percentage:
                type: number
                description: |
                  Optional percentage of commission to collect.
      
                  Supports up to 8 decimal places.
                minimum: 0
                maximum: 100
                example: 1.125
    AuthorizationRequest:
      type: object
      properties:
        amount:
          type: integer
          description: |
            The amount to increase the authorization by. Omit the amount or provide a value of `0` to extend the authorization validity period
          minimum: 0
          maximum: 99999999
          format: int64
          example: 6540
        reference:
          type: string
          description: A reference you can later use to identify this authorization request
          example: 'ORD-5023-4E89'
        metadata:
          type: object
          description: |
            A set of key-value pairs to attach to the authorization request. You can use this to store additional information in a structured format. 
            
            The `metadata` object only supports primitive data types. Objects and arrays are not supported.
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
          additionalProperties: true
    AuthorizationResponse:
      type: object
      description: Authorization Response
      required:
        - action_id
        - amount
        - currency
        - approved
        - status
        - response_code
        - processed_on
        - _links
      properties:
        action_id:
          description: The unique identifier for the action performed against this payment
          allOf:
            - $ref: '#/components/schemas/ActionId'
        amount:
          type: integer
          description: The payment amount
          example: 6540
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a> of the payment
          example: USD
          maxLength: 3
          minLength: 3
        approved:
          type: boolean
          description: Whether or not the authorization was successful
          example: true
        status:
          type: string
          description: The status of the payment
          enum:
            - Authorized
            - Declined
          example: Authorized
        auth_code:
          type: string
          description: The acquirer authorization code if the payment was authorized
          example: '643381'
        response_code:
          type: string
          description: The Gateway response code
          example: '10000'
        response_summary:
          type: string
          description: The Gateway response summary
          example: 'Approved'
        expires_on:
          type: string
          description: The timestamp (ISO 8601 code) for when the authorization's validity period ends
        balances:
          type: object
          description: The payment balances
          allOf:
            - $ref: '#/components/schemas/PaymentResponseBalances'
        processed_on:
          description: The date/time the payment was processed
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        reference:
          type: string
          description: Your reference for the payment
          example: ORD-5023-4E89
        processing:
          type: object
          description: Returns information related to the processing of the payment
          properties:
            retrieval_reference_number:
              type: string
              description: 'A unique identifier for the authorization that is submitted to the card scheme during processing'
              example: '909913440644'
            acquirer_transaction_id:
              type: string
              description: 'A unique identifier for the transaction generated by the acquirer'
              example: '440644309099499894406'
            recommendation_code:
              type: string
              description: 'A <a href="https://www.checkout.com/docs/resources/codes/recommendation-codes" target="blank">code</a> that represents the next recommended action for the payment'
              example: "02"
            surcharge_amount:
              type: integer
              format: int64
              example: 200
              minimum: 0
              description: 'Surcharge amount applied to the transaction in minor units by the merchant'
            scheme_transaction_link_id:
              type: string
              description: 'The scheme transaction link identifier.'
        eci:
          type: string
          description: The final Electronic Commerce Indicator (ECI) security level used to authorize the payment.
            Applicable for 3D Secure and network token payments
          example: '06'
        scheme_id:
          type: string
          description: The scheme transaction identifier
          example: '489341065491658'
        _links:
          type: object
          description: The links related to the payment
          minItems: 2
          required:
            - self
            - actions
          properties:
            self:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: The URI of the payment
            actions:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to the payment's associated actions
            authorize:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to increment the authorization, where applicable
            void:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to void the payment, where applicable
            capture:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to capture the payment, where applicable
            refund:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to refund the payment, where applicable
          example:
            self:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44'
            actions:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions'
            authorize:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/authorizations'
            void:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/voids'
            capture:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/capture'
    BankAccountFields:
      type: object
      properties:
        sections:
          type: array
          items:
            type: object
            required:
              - name
            properties:
              name:
                type: string
                description: The name of the section
                example: Account Details
              fields:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - display
                    - type
                    - required
                  properties:
                    id:
                      type: string
                      description: The field identifier
                      example: account_holder.first_name
                    section:
                      type: string
                      description: The section to display the field in
                      example: account
                    display:
                      type: string
                      description: The field's display name
                      example: First name
                    help_text:
                      type: string
                      description: The help text that explains the purpose of the field
                      example: The account holder's first name. Required if type is individual.
                    type:
                      type: string
                      description: The type of field
                      example: string
                    required:
                      type: boolean
                      description: Whether the field is required
                      example: true
                    validation_regex:
                      type: string
                      description: A regular expression that can be used to validate the input of the field
                      example: ^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,18}$
                    min_length:
                      type: integer
                      description: The minimum length of the field
                      example: 22
                    max_length:
                      type: integer
                      description: The maximum length of the field
                      example: 22
                    allowed_options:
                      type: array
                      description: The allowed options for the field
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            description: The option identifier
                            example: '1'
                          display:
                            type: string
                            description: The option display value
                            example: Beneficiary
                    dependencies:
                      type: array
                      description: The field's dependencies
                      items:
                        type: object
                        properties:
                          field_id:
                            type: string
                            description: The field identifier
                            example: entity_type
                          value:
                            type: string
                            description: The value of the dependent field that match in order for this field to be displayed
      example:
        sections:
          - name: Account Details
            fields:
              - id: iban
                type: string
                display: IBAN
                description: Number (which can contain letters) that identifies the account
                section: account
                required: true
                validation_regex: ^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,18}$
                min_length: 22
                max_length: 22
              - id: account_holder.first_name
                type: string
                display: First name
                description: The account holder's first name
                section: account
                required: true
              - id: account_holder.last_name
                type: string
                display: First name
                description: The account holder's last name
                section: account
                required: true
    BankPayoutAcceptedResponse:
      title: Bank Payout
      type: object
      description: Payout accepted response
      required:
        - id
        - status
        - _links
        - instruction
      properties:
        id:
          type: string
          description: The payout's unique identifier.
          pattern: "^(pay)_(\\w{26})$"
          maxLength: 30
          minLength: 30
          example: pay_dvxl6j6stpqufkzfgbaahmfrzm
        status:
          type: string
          description: The status of the payout.
          enum:
            - Pending
          example: Pending
        reference:
          type: string
          description: The payout reference.
          example: PO-215-5721
        instruction:
          allOf:
            - $ref: '#/components/schemas/PaymentInstructionResponse'
        _links:
          type: object
          description: The links related to the payout.
          properties:
            self:
              type: object
              description: The URI of the payout.
              properties:
                href:
                  type: string
                  description: The link URL.
                  example: https://{prefix}.api.sandbox.checkout.com/payments/pay_dvxl6j6stpqufkzfgbaahmfrzm
            actions:
              type: object
              description: The actions URI of the payout.
              properties:
                href:
                  type: string
                  description: The link URL.
                  example: https://{prefix}.api.sandbox.checkout.com/payments/pay_dvxl6j6stpqufkzfgbaahmfrzm/actions
    BankPayoutRequest:
      title: Bank Payout
      type: object
      required:
        - source
        - destination
        - amount
        - currency
        - billing_descriptor
        - processing_channel_id
      properties:
        source:
          $ref: '#/components/schemas/BankPayoutRequestSource'
        destination:
          $ref: '#/components/schemas/PaymentRequestDestination'
        amount:
          type: integer
          description: The amount to pay out. Value must be provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>. For example, cents for USD.
          minimum: 0
          example: 6540
        currency:
          type: string
          description: |
            The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO code</a> of the destination currency <br><i>The currency should match that of the destination account</i>.
          example: USD
          maxLength: 3
          minLength: 3
        reference:
          type: string
          description: A reference you can use to identify the payment. For example, an order number.
          example: 'Withdrawal'
        billing_descriptor:
          $ref: '#/components/schemas/PayoutBillingDescriptor'
        sender:
          $ref: '#/components/schemas/PayoutSender'
        instruction:
          $ref: '#/components/schemas/PaymentInstruction'
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: The processing channel identifier
        segment:
          $ref: '#/components/schemas/Segment'
    BankPayoutRequestSource:
      type: object
      description: The source from which the payout is funded.
      discriminator:
        propertyName: type
        mapping:
          currency_account: '#/components/schemas/BankPayoutRequestCurrencyAccountSource'
          entity: '#/components/schemas/BankPayoutRequestEntitySource'
      oneOf:
        - $ref: '#/components/schemas/BankPayoutRequestCurrencyAccountSource'
        - $ref: '#/components/schemas/BankPayoutRequestEntitySource'
      required:
        - type
      properties:
        type:
          type: string
          description: The payout source type.
          example: 'currency_account'
    BillingDescriptor:
      type: object
      description: |
        An optional description that is displayed on the customer's statement identifying a purchase.
      properties:
        name:
          type: string
          description: |
            A dynamic description of the payment. 
            Applies to card payments only.
          example: 'SUPERHEROES.COM'
          maxLength: 25
        city:
          type: string
          description: |
            The city from which the payment originated. 
            Applies to card payments only.
          minimum: 1
          example: 'GOTHAM'
          maxLength: 13
        reference:
          type: string
          description: |
            The reference that should be shown on the statement. 
            Required for payouts to bank accounts.
          maxLength: 50
        local_descriptors:
          type: array
          nullable: true
          maxItems: 100
          items:
            $ref: '#/components/schemas/LocalBillingDescriptor'
      required:
        - name
        - city
    CancellationAcceptedResponse:
      type: object
      description: Cancellation response
      required:
        - action_id
      properties:
        action_id:
          description: The unique identifier for the cancellation action.
          allOf:
            - $ref: '#/components/schemas/ActionId'
        reference:
          type: string
          description: Your reference for the cancellation request.
          example: ORD-5023-4E89
        _links:
          type: object
          description: The links related to the cancellation.
          readOnly: true
          minItems: 2
          properties:
            payment:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: The URI of the payment to be canceled. Use this to check the status of the payment.
              example:
                href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44'
          required:
            - payment
    CancellationRequest:
      type: object
      additionalProperties: false
      properties:
        reference:
          type: string
          description: A reference you can later use to identify this cancellation request. You can use this value to identify the cancellation request later.
          maxLength: 80
          example: 'ORD-5023-4E89'
    CaptureAcceptedResponse:
      type: object
      description: Capture response
      required:
        - action_id
      properties:
        action_id:
          description: The unique identifier for the capture action
          allOf:
            - $ref: '#/components/schemas/ActionId'
        reference:
          type: string
          description: Your reference for the capture request
          example: 'ORD-5023-4E89'
        _links:
          type: object
          description: The links related to the capture
          readOnly: true
          properties:
            payment:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: The URI of the payment to be captured. Use this to check the status of the payment
              example:
                href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44'
            redirect:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: For some alternative payments, the URI that the customer should be redirected to to complete the capture
              example:
                href: 'https://{prefix}.api.checkout.com/redirect/act_y3oqhf46pyzuxjbcn2giaqnb44'
          required:
            - payment
    CaptureRequest:
      type: object
      properties:
        amount:
          type: integer
          description: The amount to capture. If not specified, the full payment amount will be captured.
          minimum: 0
          maximum: 9999999999
          format: int64
          example: 6540
        capture_type:
          type: string
          description: The type of capture. If set to `Final`, the remaining available-to-capture balance will be voided.
          default: Final
          enum:
            - NonFinal
            - Final
          example: Final
        reference:
          type: string
          description: A reference you can later use to identify this capture request.<br>For Amex, the string limit is 30 characters.
          maxLength: 80
          example: 'ORD-5023-4E89'
        customer:
          $ref: '#/components/schemas/CustomerRequest'
        description:
          type: string
          description: A description of the payment.
          maxLength: 100
          example: 'Set of 3 masks'
        billing_descriptor:
          $ref: '#/components/schemas/BillingDescriptor'
        shipping:
          type: object
          description: The shipping details.
          properties:
            address:
              description: The shipping address.
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              description: The phone number associated with the shipping address.
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
            from_address_zip:
              type: string
              description: The postal code or zip code of the location being shipped from.
              example: '10014'
              maxLength: 10
            tracking_info:
              type: array
              maxItems: 200
              description: The tracking information for the payment capture.
              items:
                $ref: '#/components/schemas/TrackingInfo'
        items:
          $ref: '#/components/schemas/Items'
        amount_allocations:
          $ref: '#/components/schemas/AmountAllocations'
        processing:
          $ref: '#/components/schemas/CaptureRequestProcessingSettings'
        metadata:
          type: object
          description: |
            A set of key-value pairs to attach to the authorization request. You can use this to store additional information in a structured format. 
            
            The `metadata` object only supports primitive data types. Objects and arrays are not supported.
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
    CaptureRequestProcessingSettings:
      type: object
      description: Use the processing object to influence or override the data sent during card processing
      properties:
        order_id:
          type: string
          description: The number provided by the cardholder. Purchase order or invoice number may be used.
          maxLength: 17
          example: '123456789'
        otp_value:
          type: string
          description: One time password sent to customer by SMS.
          maxLength: 50
          example: '966557877988'
        tax_amount:
          type: number
          description: The total amount of sales tax on the total purchase amount.
          minimum: 0
          example: 3000
        surcharge_amount:
          type: integer
          format: int64
          example: 200
          minimum: 0
          description: 'Surcharge amount applied to the partial capture transaction in minor units by the merchant'
        discount_amount:
          type: number
          description: The discount amount applied to the transaction by the merchant.
          minimum: 0
          example: 0
        duty_amount:
          type: number
          description: The total charges for any import/export duty included in the transaction.
          minimum: 0
          example: 0
        shipping_amount:
          type: number
          description: The total freight or shipping and handling charges for the transaction.
          minimum: 0
          example: 300
        shipping_tax_amount:
          type: number
          description: The tax amount of the freight or shipping and handling charges for the transaction.
          minimum: 0
          example: 100
        purchase_country:
          type: string
          description: The country where the goods are purchased or the seller is based. ISO 3166 alpha-2 purchase country code.
          example: GB
        foreign_retailer_amount:
          type: integer
          example: 20000
          minimum: 0
          description: The amount of the transaction that originates from a foreign retailer,  in the [minor currency unit](https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value).  
    CustomerSummary:
      type: object
      description: Summary of the customer's transaction history. <br> Used for risk assessment when `source.type` is `Tamara`
      properties:
        registration_date:
          type: string
          format: date
          description: The date the customer registered.
          example: "2023-05-01"
        first_transaction_date:
          type: string
          format: date
          description: The date of the customer's first transaction.
          example: "2023-07-01"
        last_payment_date:
          type: string
          format: date
          description: The date of the customer's last payment.
          example: "2023-08-01"
        total_order_count:
          type: integer
          description: The total number of orders made by the customer.
          example: 15
        last_payment_amount:
          type: number
          format: float
          description: The amount of the customer's last payment.
          example: 500
        is_premium_customer:
          type: boolean
          description: Specifies whether the customer is a premium customer.
          example: true
        is_returning_customer:
          type: boolean
          description: Specifies whether the customer is a returning customer.
          example: true
        lifetime_value:
          type: number
          format: float
          description: |
            The customer's lifetime value. This is the total monetary amount that the customer has ordered, in their local currency, excluding the following:
               
            - canceled orders
            - rejected payments
            - refunded payments
            - Tamara payments
      
            The lifetime value is an indicator of how valuable the relationship with the customer is to your company. 
          example: 500
    DeviceDetails:
      type: object
      description: Details of the device from which the payment originated.
      properties:
        user_agent:
          type: string
          maxLength: 2048
          description: |
            The contents of the HTTP User-Agent request header.
            
            This field is required to process the device with the risk engine.
          example: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
        network:
          $ref: '#/components/schemas/Network'
        provider:
          $ref: '#/components/schemas/DeviceProvider'
        timestamp:
          type: string
          description: |
            The UTC date and time the payment was performed as reported by the device.
            <br/>Format – ISO 8601 code
      
            This field is required to process the device with the risk engine.
          example: "2024-02-06T15:00:00.000Z"
        timezone:
          type: string
          maxLength: 5
          minLength: 1
          description: |
            The time difference between UTC time and the local time reported by the browser, in minutes. 
            
            This field is required to process the device with the risk engine.
          example: "60"
        virtual_machine:
          type: boolean
          description: Specifies if the device is running in a virtual machine.
          example: false
        incognito:
          type: boolean
          description: Specifies if the browser is in incognito mode.
          example: false
        jailbroken:
          type: boolean
          description: Specifies if the device is jailbroken.
          example: false
        rooted:
          type: boolean
          description: Specifies if the device is rooted.
          example: false
        java_enabled:
          type: boolean
          description: |
            Specifies if the browser has the ability to execute Java, as reported by the browser's `navigator.javaEnabled` property.
          example: false
        javascript_enabled:
          type: boolean
          description: |
            Specifies if the browser has the ability to execute Javascript, as reported by the browser's `navigator.javascriptEnabled` property.
      
            Only required for 3D Secure authentications processed with 3DS 2.2. If the payment is processed with an older 3DS version, this field is ignored.
          example: false
        language:
          type: string
          maxLength: 12
          minLength: 1
          description: |
            The browser language, as reported by the browser's `navigator.language` property.
            <br/>Format – IETF BCP47 language tag
          example: "FR-fr"
        color_depth:
          type: string
          maxLength: 2
          minLength: 1
          description: The bit depth of the color palette for displaying images in bits per pixel, as reported by the browser's `screen.colorDepth` property.
          example: "16"
        screen_height:
          type: string
          maxLength: 6
          minLength: 1
          description: The total height of the device screen in pixels, as reported by the browser's `screen.height` property.
          example: "1080"
        screen_width:
          type: string
          maxLength: 6
          minLength: 1
          description: The total width of the device screen in pixels, as reported by the browser's `screen.width` property.
          example: "1920"
        user_agent_client_hint:
          type: string
          description: The raw `Sec-CH-UA` header value. This field improves Google Single-Page Application (SPA) support, as it provides more accurate information about the customer's browser.
        iframe_payment_allowed:
          type: boolean
          description: Indicates whether the Payments API is enabled for all parent frames.
        accept_header:
          type: string
          maxLength: 2048
          description: The exact content of the HTTP `Accept` headers as sent to the 3DS Requestor from the cardholder’s browser.
    DeviceProvider:
      type: object
      description: Details of the device ID provider.
      properties:
        id:
          type: string
          description: The unique identifier for the device.
          example: "1728646225211.AfUgxG"
        name:
          type: string
          description: The name of the provider that generated the device identifier.
          example: List [ "merchant", "fingerprintjs", "riskify" ]
    DowntimeRetryRequest:
      type: object
      required:
        - enabled
      description: |
        Configuration of Downtime retries.
      properties:
        enabled:
          type: boolean
          description: Indicates if Checkout.com retries the payment when it's declined due to issuer or acquirer downtime.
    DunningRetryRequest:
      type: object
      required:
        - enabled
      description: |
        Configuration of Dunning retries.
      properties:
        enabled:
          type: boolean
          description: Indicates if Checkout.com retries the payment when it's declined with a supported decline code.
        max_attempts:
          type: integer
          description: The maximum number of authorization retry attempts, excluding the initial authorization.
          default: 6
          minimum: 1
          maximum: 15
        end_after_days:
          type: integer
          description: The maximum number of days between the initial request and the final retry attempt.
          default: 30
          minimum: 1
          maximum: 60
    PaymentGetResponseAlmaSource:
      type: object
      description: 'Alma Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - alma
          description: "The payment source type"
    PaymentGetResponseBancontactSource:
      type: object
      description: 'Bancontact Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - bancontact
          description: "The payment source type"
        iban:
          maxLength: 34
          type: string
          description: "The IBAN of the Consumer Bank account used for payment (if applicable).\n"
        bic:
          maxLength: 11
          type: string
          description: "The Bank Code of the Consumer Bank account used for payment (if applicable). Example: BIC, Sort Code.\n"
    PaymentGetResponseBlikSource:
      type: object
      description: 'Blik Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - blik
          description: The payment source type.
        id:
          type: string
          description: |
            The Checkout.com source identifier for the partner agreement created during a Blik recurring payment.
      
            Use this value as `source.id` (with `source.type: id`) to process subsequent merchant-initiated payments against the same agreement.
          example: src_iz65kt6uiq4enbm6wkjqssehsm
    PaymentGetResponseCardSource:
      type: object
      description: A card payment source
      required:
        - type
        - expiry_month
        - expiry_year
        - last4
        - fingerprint
        - bin
      properties:
        type:
          description: The payment source type.
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - card
        id:
          type: string
          description: The payment source identifier that can be used for subsequent payments. For new sources, this will only be returned if the payment was approved
          example: 'src_nwd3m4in3hkuddfpjsaevunhdy'
        billing_address:
          description: The payment source owner's billing address
          allOf:
            - $ref: '#/components/schemas/Address'
        phone:
          description: The payment source owner's phone number
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        expiry_month:
          type: integer
          description: The expiry month
          minimum: 1
          minLength: 1
          maxLength: 2
          example: 6
        expiry_year:
          type: integer
          description: The expiry year
          minLength: 4
          maxLength: 4
          example: 2025
        name:
          type: string
          description: The cardholder's name
          example: 'Bruce Wayne'
        scheme:
          type: string
          description: The card scheme
          example: 'VISA'
        scheme_local:
          type: string
          deprecated: true
          description: |
            Replaced by `local_schemes`
            The local co-branded card scheme.
          example: 'Cartes_Bancaires'
        local_schemes:
          type: array
          items:
            type: string
          description: The local co-branded card schemes.
          example: ['cartes_bancaires', 'visa']
        last4:
          type: string
          description: The last four digits of the card number
          example: '9996'
        fingerprint:
          type: string
          description: Uniquely identifies this particular card number. You can use this to compare cards across customers.
          example: 'F639CAB2745BEE4140BF86DF6B6D6'
        bin:
          type: string
          description: The card issuer's Bank Identification Number (BIN)
          maxLength: 8
          example: '45434748'
        card_type:
          type: string
          description: The card type
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
            - DEFERRED DEBIT
          example: CREDIT
        card_category:
          type: string
          description: The card category
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        card_wallet_type:
          type: string
          description: The card wallet type
          enum:
            - applepay
            - googlepay
        issuer:
          type: string
          description: The name of the card issuer
          example: 'GOTHAM STATE BANK'
        issuer_country:
          type: string
          maxLength: 2
          minLength: 2
          description: The card issuer's country (<a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">two-letter ISO code</a>)
          example: 'US'
        product_id:
          type: string
          description: The issuer/card scheme product identifier
          example: 'F'
        product_type:
          type: string
          description: The issuer/card scheme product type
          example: CLASSIC
        avs_check:
          type: string
          description: The Address Verification System check result
          example: S
        cvv_check:
          type: string
          description: The card verification value (CVV) check result
          example: Y
        payment_account_reference:
          type: string
          description: A unique reference to the underlying card for network tokens (e.g., Apple Pay, Google Pay)
          example: 'EUNIX9AX7THOOJIEJ2AP6OOFAHGH4'
        encrypted_card_number:
          type: string
          description: The JWE encrypted full card number that has been updated by <a href="https://www.checkout.com/docs/payments/manage-payments/real-time-account-updater" target="_blank">real-time account updater</a>.
          example: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUz...'
        account_update_status:
          type: string
          description: Specifies what card information was updated by the <a href="https://www.checkout.com/docs/payments/manage-payments/real-time-account-updater#Retrieve_card_updates" target="_blank">Real-Time Account Updater</a>.
          enum:
            - card_updated
            - card_expiry_updated
            - card_closed
            - contact_cardholder
          example: card_updated
        account_update_failure_code:
          type: string
          description: Provides the <a href="https://www.checkout.com/docs/developer-resources/codes/real-time-account-updater-response-codes" target="_blank">failure code</a> if the <a href="https://checkout.com/docs/payments/store-and-manage-credentials/update-stored-credentials/real-time-account-updater" target="_blank">Real-Time Account Updater</a> fails to update the card information.
          example: VAU009
        account_holder:
          type: object
          description: Information about the account holder of the card
          required:
            - type
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_ResponseSources_AccountHolderIndividual'
              corporate: '#/components/schemas/02_ResponseSources_AccountHolderCorporate'
              government: '#/components/schemas/03_ResponseSources_AccountHolderGovernment'
          properties:
            type:
              type: string
              example: 'individual'
    PaymentGetResponseCurrencyAccountSource:
      type: object
      description: 'Currency Account Source'
      required:
        - id
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - currency_account
          description: "The payment source type"
        id:
          type: string
          description: 'The ID of the currency account'
          pattern: ^(ca)_(\w{26})$
        amount:
          type: integer
          description: "If specified, indicates the amount in the source currency to be paid out. If omitted, the root amount in the destination currency will be used.<br>The amount must be provided in the minor currency unit."
    PaymentGetResponseEPSSource:
      type: object
      description: 'EPS Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - eps
          description: "The payment source type"
        purpose:
          maxLength: 27
          type: string
          description: "Purpose of the payment as appearing on customer's bank statement."
        bic:
          maxLength: 11
          type: string
          description: 'Bank Identifier Code (BIC). It can be exactly 8 characters or 11 characters long.'
        iban:
          maxLength: 34
          type: string
          description: 'International Bank Account Number (IBAN) without whitespaces.'
        account_holder_name:
          type: string
          description: 'Account holder information.'
        account_holder:
          $ref: '#/components/schemas/AccountHolderEps'
    PaymentGetResponseIdealSource:
      type: object
      description: 'Ideal Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - ideal
          description: 'The payment source type'
        account_holder:
          type: string
          description: 'The account holder information'
          example: 'M.P.H. Nordhausen'
        account_holder_name:
          type: string
          description: 'The account holder''s name'
          example: 'M.P.H. Nordhausen'
        bic:
          type: string
          description: 'Bank Identifier Code (BIC). It can be exactly 8 characters or 11 characters long'
          example: 'RABONL2U'
        description:
          type: string
          description: 'Description of the product(s) or services being paid for'
          example: 'MEXC 18652552'
        iban:
          type: string
          maxLength: 34
          example: 'NL73RABO0117816396'
          description: "The IBAN of the Consumer Bank account used for payment (if applicable).\n"
    PaymentGetResponseKlarnaSource:
      type: object
      description: 'Klarna Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - klarna
          description: The payment source type.
        account_holder:
          type: object
          description: The account holder's details.
          properties:
            first_name:
              type: string
              description: The account holder's first name.
              example: Hannah
            last_name:
              type: string
              description: The account holder's last name.
              example: Bret
            billing_address:
              description: The account holder's billing address.
              required:
                - zip
                - city
                - country
              type: object
              properties:
                address_line1:
                  type: string
                  description: The first line of the billing address.
                  example: 123 Example St.
                address_line2:
                  type: string
                  description: The second line of the billing address.
                  example: Apt. 456
                city:
                  type: string
                  description: The billing address city.
                  example: Berlin
                zip:
                  type: string
                  description: The billing address ZIP or postal code.
                  example: '10115'
                country:
                  type: string
                  description: The two-letter <a href="https://www.checkout.com/docs/previous/resources/codes/country-codes" target="blank">ISO country code</a> of the billing address.
                  example: DE
                  maxLength: 2
                  minLength: 2
            email:
              type: string
              description: The account holder's email address.
            date_of_birth:
              type: string
              description: The account holder's date of birth.
            account_holder_name: 
              type: string
              description: The account holder's full name.
            iban:
              type: string
              description: The account's international bank account number (IBAN). The IBAN is a standardized international format for identifying bank accounts across countries.
            account_number:
              type: string
              description: The account holder's account number.
            bank_code:
              type: string
              description: A unique code that identifies the bank the account is held with.
            bank_name:
              type: string
              description: The name of the bank the account is held with.
            bic:
              type: string
              description: |
                The account's bank identifier code (BIC). A BIC is a standardized international code used by banks to identify themselves in financial transactions. 
                
                Also referred to as a SWIFT code.
            gender:
              type: string
              description: The account holder's gender.
            phone:
              type: object
              description: The account holder's phone number.
              properties:
                country_code:
                  type: string
                  description: The international <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">country calling code</a>.
                  minLength: 1
                  maxLength: 7
                  example: '44'
                number:
                  type: string
                  description: The phone number.
                  minLength: 6
                  maxLength: 25
                  example: '1234 567890'
    PaymentGetResponseKnetSource:
      type: object
      description: 'KNet Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - knet
          description: 'The payment source type'
        language:
          enum:
            - ar
            - en
          type: string
          description: >-
            Required for KNet Gateway payments.
            
            This field enables the issuer's site to select the consumer's preferred language.
            For example, the language selected on the merchant's site – if the issuer's site supports it.
            Code list in accordance with ISO 639-1. (Arabic = 'ar', English = 'en').
            Note that 'ar' corresponds to 'ARA' and 'en' to 'USA'. Both values accepted by KNet Gateway.
        user_defined_field1:
          type: string
          description: >-
            User-defined field that can be used to pass and store any additional transaction data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed.
        user_defined_field2:
          type: string
          description: >-
            User-defined field can be used to pass and store any additional transaction data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed.
        user_defined_field3:
          type: string
          description: >-
            User-defined field can be used to pass and store any additional transaction data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed.
            Note that this field must be omitted when the `card_token` field is not empty. This restriction
            exists because a card token is passed to KNet Gateway as `user_defined_field3`.
        user_defined_field4:
          type: string
          description: >-
            User-defined field can be used to pass and store any additional transaction data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed.
        user_defined_field5:
          type: string
          description: >-
            User-defined field can be used to pass and store any additional transaction data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed.
            Note that this field must be omitted when the `ptlf` field is not empty. This restriction
            exists because a PTLF value is passed to KNet Gateway as `user_defined_field5`.
        card_token:
          type: string
          pattern: '^[0-9]{8}$'
          description: >-
            This token allows re-usage of card details for multiple payments.
            This 8-digit token should be generated by a merchant. When a subsequent payment
            is initialized with the same card token, a customer is presented with two options.
            The customer can choose to pay with KFast (doesn't need to enter card details again),
            or with KNet as usual. The payment flow stays the same i.e. a merchant should redirect
            a customer to the redirect URL which is provided in the payment creation response.
            Note that `user_defined_field3` must be omitted when the `card_token` field is not empty. This restriction
            exists because a card token is passed to KNet Gateway as `user_defined_field3`.
        ptlf:
          type: string
          maxLength: 45
          description: >-
            This is an ID for merchant PTLF functionality tracking.
            Only alphanumeric characters are allowed.
            Note that `user_defined_field5` must be omitted when the `ptlf` field is not empty. This restriction
            exists because a PTLF value is passed to KNet Gateway as `user_defined_field5`.
        knet_payment_id:
          type: string
          description: The payment identifier assigned by KNet Gateway.
        knet_result:
          type: string
          description: >-
            The state of the payment, returned by KNet Gateway after the customer is redirected from
            the payment page.
        inquiry_result:
          type: string
          description: >-
            The state of the payment, returned by KNet Gateway in the response from the payment inquiry.
            This field is populated in rare cases when the redirection from the payment page did not occur
            properly.
        bank_reference:
          type: string
          example: '123456789012'
          description: 'The result transaction reference, given by some banks/institutions.'
        knet_transaction_id:
          type: string
          example: '1234567890123456'
          description: The transaction identifier assigned by KNet Gateway.
        auth_code:
          type: string
          example: '999554'
          description: The resulting authorization code from the issuing bank.
        auth_response_code:
          type: string
          example: '5'
          description: >-
            The auth response code / reason code relating to the issuing bank
            authorization code.
        post_date:
          type: string
          example: '1127'
          description: >-
            The transaction date in the authorization system format, with the
            value defined by the issuing bank, so may not match the actual
            transaction date. The format is `MMDD`.
        avr:
          type: string
          example: A
          description: >-
            The Address Verification Response returned from the address
            verification service.
        error:
          type: string
          example: IPAY0100044
          description: The KNET error code for transaction processing.
        error_text:
          type: string
          example: IPAY0100044-Problem occured while loading payment page.
          description: 'The KNET text detail for the error, including an error code.'
    PaymentGetResponseMultibancoSource:
      type: object
      description: 'Multibanco Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - multibanco
          description: "The payment source type"
        payment_reference:
          type: string
          description: 'Multibanco payment reference'
        service_supplier_id:
          type: string
          description: 'The identifier of a supplier charging for its service or product'
    PaymentGetResponseP24Source:
      type: object
      description: 'P24 Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - p24
          description: "The payment source type"
        p24_descriptor:
          type: string
          description: "P24-generated payment descriptor, which contains the requested billing descriptor or the merchant's default descriptor (subject to truncation)."
    PaymentGetResponsePayPalSource:
      type: object
      description: 'PayPal Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - paypal
          description: 'The payment source type'
        account_holder:
          type: object
          description: The account holder details
          properties:
            email:
              type: string
              format: email
              description: The account holder email address.
            full_name:
              type: string
              description: The full name of the account holder
              example: 'John Smith'
    PaymentGetResponseQPaySource:
      type: object
      description: 'QPay Source'
      required:
        - type
        - description
        - pun
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - qpay
          description: 'The payment source type'
        description:
          type: string
          description: 'Alphanumeric string containing a description of the payment order.'
        qpay_status:
          type: string
          description: 'The status code returned from the QPay gateway on payment, if available.'
        status_message:
          type: string
          description: 'A message giving further detail on the payment status, for failure/cancelled/success status payments.'
        confirmation_id:
          type: string
          description: 'An identifier from the QPay gateway for a successful payment.'
        pun:
          type: string
          description: 'QPay Payment Unique Number'
    PaymentGetResponseSEPAV4Source:
      type: object
      description: 'SEPA DD Source'
      required:
        - type
        - id
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - sepa
          description: 'The payment source type'
        id:
          type: string
          description: 'The instrument ID'
          example: src_q2euotsbrciupfgmwxkyzuoevq
    PaymentGetResponseSequraSource:
      type: object
      description: 'Sequra Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - sequra
          description: "The payment source type"
    PaymentGetResponseSwishSource:
      type: object
      description: 'Swish Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - swish
          description: "The payment source type"
    PaymentGetResponseTamaraSource:
      type: object
      description: 'Tamara Source'
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSourceType'
            - type: string
              enum:
                - tamara
          description: "The payment source type"
    IdempotentActionResponse:
      type: object
      description: The response received when you attempt a repeated payment action. For example, if you attempt to refund a payment that is already refunded.
      required:
        - action_id
      properties:
        action_id:
          description: The unique identifier for the previously completed payment action.
          allOf:
            - $ref: '#/components/schemas/ActionId'
        _links:
          type: object
          description: Links related to the payment.
          readOnly: true
          minItems: 2
          properties:
            payment:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: The URI of the refunded payment. Use this to check the status of the payment.
              example:
                href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44'
          required:
            - payment
    InitialAuthentication:
      type: object
      title: InitialAuthentication
      description: The details of a previous transaction
      properties:
        acs_transaction_id:
          type: string
          minLength: 36
          description:  The Access Control Server (ACS) transaction ID for a previously authenticated transaction
        authentication_method:
          type: string
          enum:
            - frictionless_authentication
            - challenge_occurred
            - avs_verified
            - other_issuer_methods
        authentication_timestamp:
          type: string
          description:  The timestamp of the previous authentication, in ISO 8601 format.
          example: "2023-02-06T15:00:00.000Z"
        authentication_data:
          type: string
          maxLength: 2048
          description:  The data that documents and supports a specific authentication process
        initial_session_id:
          type: string
          description: The ID for a previous session, which is used for retrieve the initial transaction's properties
          example: sid_p6prbhogijnuxgv4grm3ber55u
          minLength: 30
          maxLength: 30
    Items:
      type: array
      description: The order's line items.
      maxItems: 998
      items:
        type: object
        description: The order's line item or product that is being purchased.
        properties:
          type:
            type: string
            description: |
              The item type. For example, `physical` or `digital`.
      
              This field is used to provide item level metadata where applicable. If `source.type` is `sequra`, this field is required.
            enum:
              - digital
              - discount
              - physical
            example:
              digital
          sub_type:
            type: string
            description: |
              The digital item type.
      
              If `type` is set to `digital`, this field is required.
            enum:
              - blockchain
              - cbdc
              - cryptocurrency
              - nft
              - stablecoin
            example:
              stablecoin
          name:
            type: string
            description: |
              The descriptive name of the line item. 
              
              If `source.type` is `sequra`, this field is required.
            example: Necklace
            maxLength: 255
          quantity:
            type: integer
            description: |
              The number of line items.
              
              If `source.type` is `sequra`, this field is required.
            minimum: 1
            example: 2
          unit_price:
            type: integer
            description: The unit price of the item the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>. Required if `source.type` is `sequra`
            minimum: 0
            example: 50
          reference:
            type: string
            description: | 
              The item reference or product SKU (stock-keeping unit).
      
              For Visa and Mastercard's interchange reduction programs, this value has a maximum length of 12 characters.
      
              If `source.type` is `sequra`, this field is required.
            example: 858818ac
            maxLength: 255
          commodity_code:
            type: string
            description: A code identifying a Commodity for value-added tax (VAT) purposes.
            maxLength: 12
            example: 'DEF123'
          unit_of_measure:
            type: string
            description: Unit of Measure code used for an item in transaction.
            maxLength: 12
            example: 'metres'
          total_amount:
            type: number
            description: |
              The total cost of the line item, in <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="_blank">minor currency units</a>. Calculate this using the following formula:
      
              `total_amount` = (`quantity` * `unit_price`) - `discount_amount`.
      
              If `source.type` is `sequra`, this field is required.
            example: 29000
          tax_rate:
              type: number
              description: The tax rate of the item line in minor units. The percentage value is represented with two implicit decimals. For example, 2000=20%.
              example: 2000
          tax_amount:
            type: number
            description: Contains the total amount of sales tax or value-added tax (VAT) on the total purchase amount. Tax should be included in the total purchase.
            example: 1000
          tax_exempt:
            type: boolean
            description: | 
              Indicates whether the products or services are tax-exempt. <p/>
              
              Set to `true` if:
                - You are processing a card payment.
                - The `tax_amount` field is `0` due to a tax-exempt product or service.          
          discount_amount:
            type: number
            description: The discount applied to each invoice line item.
            example: 1000
          wxpay_goods_id:
            type: string
            description: Unified product No. defined by WeChat Pay
            maxLength: 32
            example: '1001'
          url:
            type: string
            maxLength: 1024
            description: Link to the line item's product page
          image_url:
            type: string
            maxLength: 1024
            description: Link to the line item's product page
          service_ends_on:
            type: string
            format: date
            example: '2025-01-01'
            description: |
              Maximum date for the service to be rendered or ended. 
              
              If `source.type` is `sequra` and `item.type` is `digital`, this field is required.
          purchase_country:
            type: string
            description: |
              The country where the purchase was made. <br/>Format – <a href="https://www.checkout.com/docs/previous/resources/codes/country-codes" target="_blank">ISO alpha-2 country code</a>
            example: GB
            maxLength: 2
          foreign_retailer_amount:
            type: integer
            example: 200
            minimum: 0
            description: The foreign retailer amount the merchant applied to the transaction, in the [minor currency unit](https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value).    
    LocalBillingDescriptor:
      type: object
      description: |
        An optional description that is displayed on the customer's statement identifying a purchase, in the specified local character set. 
        
        This does not override the value supplied in `BillingDescriptor`.
      properties:
        name:
          type: string
          description: |
            A dynamic description of the card payment. Other payment methods will not display this description.
            
            The character set specified will determine the maximum length of the field. For `katakana`, the maximum length is 23 characters, equivalent to 23 katakana characters. For `kanji`, the maximum length is 40 characters, equivalent to 20 kanji characters.
          example: '漢字'
        character_set:
          allOf:
            - $ref: '#/components/schemas/LocalCharacterSets'
            - description: The character set of the descriptor
      required:
        - name
        - character_set
    LocalCharacterSets:
      type: string
      enum:
        - kanji
        - katakana
    MerchantAuthenticationInfo:
      type: object
      title: MerchantAuthenticationInfo
      description: The information about how the 3DS Requestor authenticated the cardholder before or during the transaction
      properties:
        three_ds_req_auth_method:
          type: string
          description: The mechanism used by the cardholder to authenticate with the 3DS Requestor
          enum:
            - no_threeds_requestor_authentication_occurred
            - three3ds_requestor_own_credentials
            - federated_id
            - issuer_credentials
            - third_party_authentication
            - fido_authenticator
            - fido_authenticator_fido_assurance_data_signed
            - src_assurance_data
        three_ds_req_auth_timestamp:
          type: string
          format: date-time
          description: The UTC date and time the cardholder authenticated with the 3DS Requestor, in ISO 8601 format.
        three_ds_req_auth_data:
          type: string
          description: The data that documents and supports a specific authentication process
          maxLength: 20000
    Network:
      type: object
      description: |
        Details of the device network. 
        
        Either ipv4 or ipv6 is required field.
      properties:
        ipv4:
          type: string
          description: |
            The device's IPV4 address.
      
            Not required if you provide the `ipv6` field.
          example: "63.33.82.13"
        ipv6:
          type: string
          description: |
            The device's IPV6 address.
      
            Not required if you provide the `ipv4` field.
          example: "2001:0000:130F:0000:0000:09C0:876A:130B"
        tor:
          type: boolean
          description: Specifies if the Tor network was used in the browser session.
          example: false
        vpn:
          type: boolean
          description: Specifies if a virtual private network (VPN) was used in the browser session.
          example: false
        proxy:
          type: boolean
          description: Specifies if a proxy was used in the browser session.
          example: false
    PartialAuthorization:
      type: object
      description: Required information to allow partial authorization
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: Specifies whether to allow partial authorizations.
          example: true
    PaymentAcceptedResponse:
      title: Payment
      type: object
      description: Payment response
      required:
        - id
        - status
      properties:
        id:
          description: The payment's unique identifier
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/PaymentId'
        status:
          type: string
          description: The status of the payment
          enum:
            - Pending
        reference:
          type: string
          description: Your reference for the payment request
          example: ORD-5023-4E89
        customer:
          type: object
          description: The customer associated with the payment, if provided in the request
          allOf:
            - $ref: '#/components/schemas/CustomerResponse'
        3ds:
          type: object
          description: Provides 3D Secure enrollment status
          allOf:
            - $ref: '#/components/schemas/3dsEnrollmentData'
        subscription:
          $ref: '#/components/schemas/Subscription'
        processing:
          type: object
          description: Returns information related to the processing of the payment
          readOnly: true
          properties:
            continuation_payload:
              type: string
              description: The payload for an in-app payment the merchant can use to continue a payments.
              example: '{\"prepay_id\":\"wx02161421698644ab471821297252eb0000\",\"partner_id\":\"1900012731\",\"timestamp\":1651479262,\"app_id\":\"sub_application_id\",\"nonce\":\"476d17edadf44915ad533107bd3c71c2\",\"sign\":\"QM1CCVAkexZLq00Uz/IxgbqC2ke7Xl9xUayutALc1EebLT1cI85H0biNNjhzQrzFdJ0YCq8KR2Hc9bD01vxRsn18fHzE5bhvn2qlUSOeY7hATfaLYS7+f+gKVj+0iIuUp3qamquErrKYl1g1Vhvlwn1U8TrcjhU0w666YYJuwIP9qPNy6F8wj3ORWM1uYmB9D4v09sTnmZfBPFwuGJzj2PTBGyvoKLu+V1T1HzlC2rwhpDmrSCq0rcFL2smztWGVktpZ2NoggEAVWLjHWsvS8OmzgeosM3ltoCeWjlp1SusmXtlMtUJWyjiVQYHnjb/a42NYk/qynZ/w+BAqLTlDKA==\",\"pkg\":\"Sign=WXPay\"}'
            partner_payment_id:
              type: string
              description: 'The partner-originated unique payment identifier'
              example: '440644309099499894406'
            pan_type_processed:
              type: string
              description: The type of Primary Account Number (PAN) used for the payment. DPAN indicates network token was used, FPAN indicates the full card was used
              enum:
                - fpan
                - dpan
            fallback_source_used:
              type: boolean
              description: Indicates whether the `fallback_source` field was used for the payment.
              example: false
            cko_network_token_available:
              type: boolean
              description: The flag indicating if Checkout Network Token was available for the payment
              example: false
            scheme_merchant_id:
              type: string
              description: The merchant identifier that was configured with the scheme and used for the payment.
              example: "123456"
            payment_reference:
              type: string
              description: The payment reference of the transaction. Can be used to build your own payment slip. Applicable for Multibanco payments.
              example: '999999964'
            service_supplier_id:
              type: string
              description: The merchant/service provider identifier of the transaction. Can be used to build your own payment slip. Applicable for Multibanco payments.
              example: '11854'
        _links:
          type: object
          description: The links related to the payment
          readOnly: true
          minItems: 2
          properties:
            self:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: The URI of the payment
              example:
                href: 'https://{prefix}.api.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4'
            redirect:
              type: object
              allOf:
                - $ref: '#/components/schemas/RedirectLink'
              description: The URI to which the customer is redirected to complete the payment.
              example:
                href: 'https://{prefix}.api.checkout.com/3ds/pay_mbabizu24mvu3mela5njyhpit4'
                mobile:
                  android:
                    href: 'app-scheme://android.com'
                  ios:
                    href: 'app-scheme://ios.com'
                qr_code:
                  image: 'https://{prefix}.api.sandbox.checkout.com/qr/medium'
                  text: 'abc'
          required:
            - self
    PaymentAction:
      type: object
      required:
        - id
        - type
        - amount
        - response_code
        - processed_on
      properties:
        id:
          description: The unique identifier of the payment action
          allOf:
            - $ref: '#/components/schemas/ActionId'
        type:
          type: string
          description: The type of action
          enum:
            - Authorization
            - Card Verification
            - Void
            - Capture
            - Refund
            - Payout
            - Return
        processed_on:
          description: The date/time the action was processed
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        amount:
          type: integer
          description: The action amount
          example: 6540
        approved:
          type: boolean
          description: Whether the action was successful
          example: true
        auth_code:
          type: string
          description: |
            The issuer authorization code for cards. 
            
            Only applicable for payins.
          example: '643381'
        response_code:
          type: string
          description: The Gateway response code
          example: '10000'
        response_summary:
          type: string
          description: The Gateway response summary
          example: 'Approved'
        authorization_type:
          type: string
          description: |
            The authorization type. 
            
            Only applicable for payins.
          enum:
            - Final
            - Estimated
            - Incremental
          default: Final
          example: Estimated
        reference:
          type: string
          description: |
            Your reference for the action.
            
            Only applicable for payins.
          example: 'ORD-5023-4E89'
        amount_allocations:
          description: |
            The sub-entities that the payment is being processed on behalf of.
            
            Only applicable for payins.
          allOf:
            - $ref: '#/components/schemas/AmountAllocations'
        processing:
          type: object
          description: |
            Returns information related to the processing of the payment. 
            
            Only applicable for payins.
          properties:
            retrieval_reference_number:
              type: string
              description: 'A unique identifier for the authorization that is submitted to the card scheme during processing'
              example: '909913440644'
            acquirer_reference_number:
              type: string
              description: 'A unique identifier for the capture that is submitted to the card scheme during processing'
              example: '24021219099007452440793'
            acquirer_transaction_id:
              type: string
              description: 'A unique identifier for the transaction generated by the acquirer'
              example: '440644309099499894406'
            capture_action_id:
              type: string
              description: The Checkout.com action ID of the capture you wanted to refund. Required only for PayPal and Riverty.
              example: 'act_fd3h6evhpn3uxdoqbuu3lqnqbm'
        items:
          description: |
            The order's line item or product that is being purchased.
            
            Only applicable for payins.
          allOf:
            - $ref: '#/components/schemas/Items'
        metadata:
          type: object
          description: |
            A set of key-value pairs that you can attach to an action.
            
            Only applicable for payins.
    PaymentActionsResponse:
      type: array
      items:
        $ref: '#/components/schemas/PaymentAction'
      minItems: 1
      maxItems: 151
      description: |
        The payment actions
      example:
        - 'id': 'act_fd3h6evhpn3uxdoqbuu3lqnqbm'
          'type': 'Refund'
          'processed_on': '2018-01-20T10:30:48Z'
          'amount': 1000
          'approved': true
          'response_code': '10000'
          'response_summary': 'Approved'
        - 'id': 'act_gefycn3jcvuupboxfmqrhk2aym'
          'type': 'Capture'
          'processed_on': '2018-01-17T10:30:48Z'
          'amount': 6540
          'approved': true
          'response_code': '10000'
          'response_summary': 'Approved'
          'processing':
            'acquirer_reference_number': '24021219099007452440793'
            'acquirer_transaction_id': '00745244079'
          'metadata':
            'shipping_ref': 'MQIBN2'
        - 'id': 'act_y3oqhf46pyzuxjbcn2giaqnb44'
          'type': 'Authorization'
          'processed_on': '2018-01-17T09:30:48Z'
          'amount': 6540
          'approved': true
          'auth_code': '643381'
          'response_code': '10000'
          'response_summary': 'Approved'
          'reference': 'ORD-5023-4E89'
          'processing':
            'retrieval_reference_number': '909913440644'
            'acquirer_transaction_id': '440644309099499894406'
    PaymentActionSummary:
      type: object
      required:
        - id
        - type
        - response_code
      properties:
        id:
          description: The unique identifier of the payment action
          allOf:
            - $ref: '#/components/schemas/ActionId'
        type:
          type: string
          description: The type of action
          enum:
            - Authorization
            - Card Verification
            - Void
            - Capture
            - Refund
        response_code:
          type: string
          description: The Gateway response code
          example: '10000'
        response_summary:
          type: string
          description: The Gateway response summary
          example: 'Approved'
    PaymentDetails:
      type: object
      description: Payment response
      required:
        - id
        - requested_on
        - amount
        - currency
        - status
        - approved
        - _links
      properties:
        id:
          description: Payment unique identifier
          allOf:
            - $ref: '#/components/schemas/PaymentId'
        requested_on:
          description: The date/time the payment was requested
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        source:
          $ref: '#/components/schemas/PaymentDetailsResponseSource'
        destination:
          description: The destination of the payment
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentResponseDestination'
        amount:
          type: integer
          description: The original payment amount
          example: 6540
        amount_requested:
          type: integer
          description: The full amount from the original authorization, if a partial authorization was requested.
          example: 6540
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a> of the payment
          example: USD
          maxLength: 3
          minLength: 3
        payment_type:
          type: string
          description: |
            This must be specified for card payments where the cardholder is not present (For example, recurring or mail order / telephone order)
          enum:
            - Regular
            - Recurring
            - MOTO
            - Installment
            - PayLater
            - Unscheduled
          default: Regular
          example: Recurring
        payment_plan:
          description: The details of a recurring subscription or installment
          oneOf:
            - $ref: '#/components/schemas/PlanRecurring'
            - $ref: '#/components/schemas/PlanInstallment'
          type: object
        reference:
          type: string
          description: Your reference for the payment
          example: ORD-5023-4E89
        description:
          type: string
          description: A description of the payment
          example: Set of 3 masks
        approved:
          type: boolean
          description: Whether the payment was successful
          example: true
        expires_on:
          type: string
          description: The timestamp (ISO 8601 code) for when the authorization's validity period expires
        status:
          type: string
          description: The status of the payment
          enum:
            - Pending
            - Authorized
            - Card Verified
            - Voided
            - Partially Captured
            - Captured
            - Partially Refunded
            - Refunded
            - Declined
            - Canceled
            - Expired
            - Paid
            - Retry Scheduled
          example: Authorized
        balances:
          type: object
          description: The payment balances
          allOf:
            - $ref: '#/components/schemas/PaymentResponseBalances'
        3ds:
          type: object
          description: Provides information relating to the processing of 3D Secure payments
          allOf:
            - $ref: '#/components/schemas/3dsData'
        authentication:
          type: object
          description: Provides information relating to the authentication of the payment.
          allOf:
            - $ref: '#/components/schemas/PaymentAuthenticationData'
        risk:
          type: object
          description: Returns the payments risk assessment results
          properties:
            flagged:
              type: boolean
              description: Whether the payment was flagged by a risk check
              default: false
              example: true
            score:
              type: integer
              description: The risk score calculated by our Fraud Detection engine. Absent if not enough data provided.
              example: 22
              minimum: 0
              maximum: 100
        customer:
          type: object
          description: The customer to which this payment is linked
          properties:
            id:
              type: string
              pattern: "^(cus)_(\\w{26})$"
              description: The unique identifier of the customer. This can be passed as a source when making a payment
              example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44'
            email:
              type: string
              description: The customer's email address
              example: 'brucewayne@gmail.com'
            name:
              type: string
              description: The customer's name
              example: 'Bruce Wayne'
            summary:
              $ref: '#/components/schemas/CustomerSummary'
          required:
            - id
        billing_descriptor:
          $ref: '#/components/schemas/BillingDescriptor'
        shipping:
          type: object
          description: The payment shipping details
          properties:
            address:
              description: The shipping address
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              description: The phone number associated with the shipping address
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
        payment_ip:
          description: The IP address used to make the payment. Used by Checkout.com's risk engine to check the customer's IP address – only accepts IPv4 and IPv6 addresses.
          allOf:
            - $ref: '#/components/schemas/IPAddress'
        sender:
          description: Information about the sender of the payment's funds
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSender'
        amount_allocations:
          $ref: '#/components/schemas/AmountAllocations'
        recipient:
          $ref: '#/components/schemas/PaymentRecipient'
        processing:
          $ref: '#/components/schemas/ProcessingData'
        items:
          $ref: '#/components/schemas/Items'
        metadata:
          type: object
          description: A set of key-value pairs that you can attach to a payment. It can be useful for storing additional information in a structured format
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
        eci:
          type: string
          description: |
            The final Electronic Commerce Indicator (ECI) security level used to authorize the payment.
            Applicable for 3D Secure and network token payments
          example: '06'
        scheme_id:
          type: string
          description: |
            The scheme transaction identifier
          example: '488341541494658'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/PaymentActionSummary'
          description: |
            A summary of the payment's actions,
            returned when a session ID is used to get the payment details
        retry:
          $ref: '#/components/schemas/RetryGetResponse'
        cko_network_token_available:
          type: boolean
          description: The flag indicating if Checkout Network Token was available for the payment
          example: false
        instruction:
          type: object
          description: Details about the payment instruction.
          properties:
            purpose:
              type: string
              description: The purpose of the payment.
              example: financial_services
        _links:
          type: object
          description: The links related to the payment
          minItems: 2
          required:
            - self
            - actions
          properties:
            self:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: The URI of the payment
            actions:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to the payment's associated actions
            authorize:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to increment the authorization, where applicable
            void:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to void the payment, where applicable
            capture:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to capture the payment, where applicable
            refund:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to refund the payment, where applicable
          example:
            self:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44'
            actions:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions'
            authorize:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/authorizations'
            refund:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/refund'
    PaymentDetailsResponseSender:
      type: object
      description: Information about the sender of the payment's funds
      discriminator:
        propertyName: type
        mapping:
          individual: '#/components/schemas/01_PaymentResponseIndividualSender'
          corporate: '#/components/schemas/02_PaymentResponseCorporateSender'
          instrument: '#/components/schemas/03_PaymentResponseInstrumentSender'
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - individual
            - corporate
            - instrument
          description: The type of sender
          example: instrument
        reference:
          type: string
          description: The sender's reference for the payout
          example: '8285282045818'
    PaymentDetailsResponseSource:
      title: source
      type: object
      description: The source of the payment
      properties:
        type:
          type: string
          description: 'The payment source type'
      required:
        - type
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/PaymentGetResponseCardSource'
          alma: '#/components/schemas/PaymentGetResponseAlmaSource'
          bancontact: '#/components/schemas/PaymentGetResponseBancontactSource'
          blik: '#/components/schemas/PaymentGetResponseBlikSource'
          currency_account: '#/components/schemas/PaymentGetResponseCurrencyAccountSource'
          eps: '#/components/schemas/PaymentGetResponseEPSSource'
          ideal: '#/components/schemas/PaymentGetResponseIdealSource'
          klarna: '#/components/schemas/PaymentGetResponseKlarnaSource'
          knet: '#/components/schemas/PaymentGetResponseKnetSource'
          multibanco: '#/components/schemas/PaymentGetResponseMultibancoSource'
          p24: '#/components/schemas/PaymentGetResponseP24Source'
          paypal: '#/components/schemas/PaymentGetResponsePayPalSource'
          qpay: '#/components/schemas/PaymentGetResponseQPaySource'
          sepa: '#/components/schemas/PaymentGetResponseSEPAV4Source'
          swish: '#/components/schemas/PaymentGetResponseSwishSource'
          sequra: '#/components/schemas/PaymentGetResponseSequraSource'
          tamara: '#/components/schemas/PaymentGetResponseTamaraSource'
      oneOf:
        - $ref: '#/components/schemas/PaymentGetResponseCardSource'
        - $ref: '#/components/schemas/PaymentGetResponseAlmaSource'
        - $ref: '#/components/schemas/PaymentGetResponseBancontactSource'
        - $ref: '#/components/schemas/PaymentGetResponseBlikSource'
        - $ref: '#/components/schemas/PaymentGetResponseCurrencyAccountSource'
        - $ref: '#/components/schemas/PaymentGetResponseEPSSource'
        - $ref: '#/components/schemas/PaymentGetResponseIdealSource'
        - $ref: '#/components/schemas/PaymentGetResponseKlarnaSource'
        - $ref: '#/components/schemas/PaymentGetResponseKnetSource'
        - $ref: '#/components/schemas/PaymentGetResponseMultibancoSource'
        - $ref: '#/components/schemas/PaymentGetResponseP24Source'
        - $ref: '#/components/schemas/PaymentGetResponsePayPalSource'
        - $ref: '#/components/schemas/PaymentGetResponseQPaySource'
        - $ref: '#/components/schemas/PaymentGetResponseSEPAV4Source'
        - $ref: '#/components/schemas/PaymentGetResponseSwishSource'
        - $ref: '#/components/schemas/PaymentGetResponseSequraSource'
        - $ref: '#/components/schemas/PaymentGetResponseTamaraSource'
    PaymentDetailsResponseSourceType:
      type: string
      description: Ordered list of payment details response source types
      enum:
        - card
        - alma
        - bancontact
        - blik
        - currency_account
        - eps
        - ideal
        - klarna
        - knet
        - multibanco
        - p24
        - paypal
        - qpay
        - sepa
        - sequra
        - swish
        - tamara
    PaymentId:
      type: string
      pattern: "^(pay)_(\\w{26})$"
      description: The payment identifier.
      maxLength: 30
      minLength: 30
      example: 'pay_mbabizu24mvu3mela5njyhpit4'
    PaymentInstruction:
      type: object
      description: Details about the instruction for payouts to bank accounts.
      properties:
        scheme:
          type: string
          description: An option to restrict the payment scheme type, when not available payouts will fail.
          enum:
            - local
            - instant
        remittance:
          type: object
          properties:
            reference:
              type: string
              description: A merchant-provided reference for the remittance payment. This value is used for payment reconciliation and is reviewed by our banking partner.
              maxLength: 80
    PaymentInstructionResponse:
      type: object
      description: Instruction details for payouts to bank accounts.
      properties:
        value_date:
          description: The date (in ISO 8601 format) and time at which the recipient's account will be credited.
          type: string
          format: date-time
          example: 2020-06-12T22:27:42.512594Z
    PaymentPaged:
      type: object
      properties:
        limit:
          type: integer
          description: The numbers of results to retrieve
          example: 10
        skip:
          type: integer
          description: The number of results to skip
          example: 10
        total_count:
          type: integer
          description: The total number of results matching the payment reference. This number is unaffected by the values of the `skip` and `limit` parameters
          example: 1
        data:
          type: array
          description: The list of payments
          items:
            $ref: '#/components/schemas/PaymentDetails'
    PaymentPlan:
      type: object
      title: PaymentPlan
      description: The details of a recurring subscription or installment `payment_plan`.
      properties:
        days_between_payments:
          type: integer
          description: Indicates the minimum number of days between payments
          example: 28
        total_number_of_payments:
          type: integer
          description: Indicates the agreed total number of payments
          example: 5
        current_payment_number:
          type: integer
          description: The number of the current installment payment
          example: 3
        expiry:
          type: string
          description: The date after which no further payments will be performed in the format YYYYMMDD
          example: '20251031'
        name:
          type: string
          description: |
            The name of the payment plan.
      
            Required when `source.type` is `blik`. For Blik merchant-initiated requests using an external `partner_agreement_id`, this value is used as the Blik Alias Label.
          maxLength: 35
          example: 'Subscription 1234'
        start_date:
          type: string
          description: |
            The date on which the first payment will be taken, in `YYYYMMDD` format.
      
            Required when `source.type` is `blik` and the recurring agreement is created without an initial payment (`amount` set to `0`).
          example: '20260507'
        amount:
          type: integer
          description: |
            The amount to charge for each payment in the plan, in the [minor currency unit](https://www.checkout.com/docs/resources/calculating-the-amount).
      
            Required when `source.type` is `blik`, `payment_plan.amount_variability` is `Fixed`, and the recurring agreement is created without an initial payment (`amount` set to `0`).
          minimum: 1
          example: 1234
    PaymentRecipient:
      type: object
      description: Information about the recipient of the payment's funds. Relevant for [Account Funding Transactions](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions) and VISA or Mastercard [domestic UK transactions processed by financial institutions](https://www.checkout.com/docs/payments/regulation-support/requirements-for-financial-institutions).
      properties:
        dob:
          type: string
          format: date
          description: The recipient's date of birth (yyyy-mm-dd)
          maxLength: 10
          example: '1985-05-15'
        account_number:
          type: string
          description: Any identifier like part of the PAN (first six digits and last four digits), an IBAN, an internal account number, or a phone number related to the primary recipient's account
          maxLength: 34
          example: '5555554444'
        address:
          description: The recipient's address
          allOf:
            - $ref: '#/components/schemas/Address'
        zip:
          type: string
          deprecated: true
          description: |
            Replaced by `address.zip`
        
            The first part of the UK postcode (e.g., SW1A 1AA would be SW1A).
          maxLength: 10
          example: 'SW1A'
        first_name:
          type: string
          description: The recipient's first name
          maxLength: 50
          example: 'John'
        last_name:
          type: string
          description: The recipient's last name
          maxLength: 50
          example: 'Jones'
    PaymentRequest:
      title: Payment
      type: object
      required:
        - currency
      properties:
        source:
          $ref: '#/components/schemas/PaymentRequestSource'
        fallback_source:
          $ref: '#/components/schemas/PaymentRequestFallbackSource'
        amount:
          type: integer
          format: int64
          maximum: 9999999999
          description: |
              The payment amount. To perform a card verification, do not provide the amount or provide a value of `0`.
      
              The amount must be provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
          minimum: 0
          example: 6540
        currency:
          type: string
          description: |
            The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a>
          example: 'USD'
          maxLength: 3
          minLength: 3
        payment_type:
          type: string
          description: |
            The type of payment.
      
            This field is required for card payments in which the cardholder is not present. For example, mail orders, telephone orders, or merchant-initiated transactions (MITs) in a [recurring payment](https://www.checkout.com/docs/payments/accept-payments/pay-with-stored-card-details/recurring-payments-with-stored-card-details) series.
      
            For MITs, this field must not be set to `Regular`.
          enum:
            - Regular
            - Recurring
            - MOTO
            - Installment
            - PayLater
            - Unscheduled
          default: Regular
          example: 'Recurring'
        payment_plan:
          description: The details of a recurring subscription or installment
          oneOf:
            - $ref: '#/components/schemas/PlanRecurring'
            - $ref: '#/components/schemas/PlanInstallment'
          type: object
        merchant_initiated:
          type: boolean
          description: |
      
            Whether the payment is a merchant-initiated transaction (MIT).
      
            <a href="https://www.checkout.com/docs/payments/accept-payments/use-saved-details/about-stored-card-details" target="_blank">Must be set to `true` for all MITs</a>.
      
            If you set this field to `true`, the value for `payment_type` must not be set to `Regular`.
        reference:
          type: string
          description: |
      
            A reference you can use to identify the payment. For example, an order number.
              - For Amex payments, the reference has a 30-character limit.
              - For Benefit payments, the reference must be a unique alphanumeric value.
              - For Blik payments, the reference has a 35-character limit.
              - For Discover payments, the reference has a 60-character limit.
              - For iDEAL payments, the reference is required and must be an alphanumeric value with a 35-character limit.
              - For OmanNet payments, the reference must be a unique alphanumeric value between 12 and 30 characters long, generated for every payment action.
              - For seQura payments, the reference is required and must be a unique value.
              - For TWINT payments, the reference has a 50 character limit.
          maxLength: 80
          example: 'ORD-5023-4E89'
        description:
          type: string
          description: A description of the payment.
          maxLength: 100
          example: 'Set of 3 masks'
        authorization_type:
          type: string
          description: The authorization type
          enum:
            - Final
            - Estimated
          default: Final
          example: 'Estimated'
        partial_authorization:
          $ref: '#/components/schemas/PartialAuthorization'
        capture:
          type: boolean
          description: Whether to capture the payment (if applicable)
          default: true
          example: true
        capture_on:
          description: |
            A timestamp (ISO 8601 code) that determines when the payment should be captured.
            Providing this field will automatically set `capture` to true
          allOf:
            - $ref: '#/components/schemas/Timestamp'
        expire_on:
          description: |
            The date and time when the Multibanco payment expires in UTC. </br>Format – ISO 8601 <br/>Example– `2025-01-31T10:20:30.456`
          allOf:
            - $ref: '#/components/schemas/Timestamp'
        customer:
          $ref: '#/components/schemas/CustomerRequest'
        billing_descriptor:
          $ref: '#/components/schemas/BillingDescriptor'
        shipping:
          $ref: '#/components/schemas/Shipping'
        3ds:
          description: Information required for 3D Secure authentication payments.
          anyOf:
            - $ref: '#/components/schemas/3dsRequest'
            - $ref: '#/components/schemas/3dsRequestStandalone'
            - $ref: '#/components/schemas/3dsRequestThirdParty'
          type: object
        authentication:
          type: object
          description: Provides information required to authenticate payments.
          allOf:
            - $ref: '#/components/schemas/PaymentAuthenticationRequest'
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: The processing channel to be used for the payment
          example: 'pc_q4dbxom5jbgudnjzjpz7j2z6uq'
        previous_payment_id:
          type: string
          description: |
            An identifier that links the payment to an existing series of payments.
      
            You must only pass this field if the transaction is a merchant-initiated transaction (MIT) in a <a href="https://www.checkout.com/docs/payments/accept-payments/pay-with-stored-card-details/recurring-payments-with-stored-card-details" target="blank">recurring payment series</a>.
      
            To link the payment, pass one of the following as its value:
            - a payment identifier (for example, `pay_cr4hxwizzp6k7biycuk2ibltnm`) from the recurring series, or
            - the scheme transaction ID
          maxLength: 100
          example: 'pay_fun26akvvjjerahhctaq2uzhu4'
        risk:
          $ref: '#/components/schemas/RiskRequest'
        success_url:
          type: string
          format: uri
          description: For redirect payment methods, this overrides the default success redirect URL configured on your account
          maxLength: 1024
          example: 'https://example.com/payments/success'
        failure_url:
          type: string
          format: uri
          description: For redirect payment methods, this overrides the default failure redirect URL configured on your account
          maxLength: 1024
          example: 'https://example.com/payments/fail'
        payment_ip:
          deprecated: true
          description: |
            Use the `risk.device.network.ipv4` or `risk.device.network.ipv6` field instead.
      
            The IP address used to make the payment. Used by Checkout.com's risk engine to check the customer's IP address – only accepts IPv4 and IPv6 addresses. Required if `source.type` is `sequra`
          allOf:
            - $ref: '#/components/schemas/IPAddress'
        sender:
          $ref: '#/components/schemas/PaymentRequestSender'
        recipient:
          $ref: '#/components/schemas/PaymentRecipient'
        amount_allocations:
          $ref: '#/components/schemas/AmountAllocations'
        processing:
          $ref: '#/components/schemas/PaymentRequestProcessing'
        items:
          $ref: '#/components/schemas/Items'
        retry:
          $ref: '#/components/schemas/RetryRequest'
        subscription:
          $ref: '#/components/schemas/Subscription'
        metadata:
          type: object
          description: |
            Stores additional information about a transaction with custom fields and up to five user-defined fields, which you can use for reporting purposes. The object supports `string`, `number`, and `boolean` fields, but not arrays or objects.
      
            You can provide up to 20 metadata fields per API call, but the value of each field must not exceed 255 characters in length.
      
            You can also reference [`metadata` properties](https://www.checkout.com/docs/business-operations/prevent-fraud/understand-fraud-detection#Metadata) in your custom rules for Fraud Detection. For example, `$coupon_code = '1234’`.
          example:
            coupon_code: 'NY2018'
        segment:
          $ref: '#/components/schemas/Segment'
        instruction:
          type: object
          description: Details about the payment instruction.
          properties:
            purpose:
              allOf:
                - $ref: '#/components/schemas/Purpose'
        routing:
          type: object
          description: Controls processor attempts at the payment level.
          properties:
            attempts:
              type: array
              description: |
                Specifies the processing rules for the payment. Each object in the array should be a unique expression of rules that determine the routing attempts to process the payment with. For example:
      
                ```
                "attempts": [
                  {
                    "scheme": "mastercard"
                  },
                  {
                    "scheme": "visa"
                  }
                ]
                ```
      
              items:
                $ref: '#/components/schemas/Attempt'
    PaymentRequestDestination:
      type: object
      description: The destination of the payout.
      discriminator:
        propertyName: type
        mapping:
          id: '#/components/schemas/PaymentRequestIdDestination'
          bank_account: '#/components/schemas/PaymentBankAccountDestination'
      oneOf:
        - $ref: '#/components/schemas/PaymentRequestIdDestination'
        - $ref: '#/components/schemas/PaymentBankAccountDestination'
      required:
        - type
      properties:
        type:
          type: string
          description: The payout destination type. Destinations need to populate the required parameters for destination country and currency, see our <a href="https://www.checkout.com/docs/payments/request-payouts/bank-payouts/payout-formatting" target="_blank">docs</a> and <a href="https://www.checkout.com/docs/developer-resources/codes/error-codes#Instruments_endpoint" target="_blank">error codes</a> for details.
          example: 'id'
    PaymentRequestProcessing:
      type: object
      description: Use the processing object to influence or override the data sent during card processing
      properties:
        order_id:
          type: string
          description: The number provided by the cardholder. Purchase order or invoice number may be used.
          maxLength: 15
          example: '123456789'
        tax_amount:
          type: number
          description: The total amount of sales tax on the total purchase amount.
          minimum: 0
          example: 3000
        surcharge_amount:
          type: integer
          example: 200
          minimum: 0
          description: 'Surcharge amount applied to the transaction in minor units by the merchant.'
        discount_amount:
          type: number
          description: The discount amount applied to the transaction by the merchant.
          minimum: 0
          example: 0
        duty_amount:
          type: number
          description: The total charges for any import/export duty included in the transaction.
          minimum: 0
          example: 0
        shipping_amount:
          type: number
          description: The total freight or shipping and handling charges for the transaction.
          minimum: 0
          example: 300
        shipping_tax_amount:
          type: number
          description: The tax amount of the freight or shipping and handling charges for the transaction.
          minimum: 0
          example: 100
        aft:
          type: boolean
          description: Indicates if the payment is an [Account Funding Transaction](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions)
        preferred_scheme:
          type: string
          enum:
            - 'mastercard'
            - 'visa'
            - 'cartes_bancaires'
          description: The preferred scheme for co-badged card payment processing. If performing 3DS via a third party, set this value to the scheme that processed 3DS. This field does not support PINless debit schemes in the US (STAR, PULSE, NYCE, ACCEL, SHAZAM).
        merchant_initiated_reason:
          type: string
          enum:
            - 'Delayed_charge'
            - 'Resubmission'
            - 'No_show'
            - 'Reauthorization'
          description: Indicates the reason for a merchant-initiated payment request.
        campaign_id:
          type: integer
          description: "Unique number of the campaign this payment will be running in. Only required for Afterpay campaign invoices."
        product_type:
          type: string
          description: |-
            Product type of the payment. Used when `source.type` is<br>
              <ul><li>`wechatpay` - required. Enum:
                <ul>
                  <li>`QR Code`</li>
                  <li>`In-App`</li>
                  <li>`Official Account`</li>
                  <li>`Mini Program`</li>
                </ul>
              </li>
              <li>`tamara` - optional. You can omit this if you've chosen the default pay installment option or want the payment provider to show all the available Tamara options to the customer during redirection. Enum:
                <ul>
                  <li>`pay_in_full`</li>
                  <li>`pay_by_instalment_2`</li>
                  <li>`pay_by_instalment_3`</li>
                  <li>`pay_by_instalment_4`</li>
                  <li>`pay_by_instalment_6`</li>
                </ul>
              </li>
              <li>`sequra` - required. Enum:
                <ul>
                  <li>`invoice`</li>
                  <li>`pay_later`</li>
                  <li>`pay_by_instalment_3`</li>
                  <li>`pay_by_instalment`</li>
                </ul>
              </li></ul>
          example: QR Code
        open_id:
          type: string
          description: Value obtained from WeChat Web Authorization API before initiating Official Account or Mini Program payments. Required if `source.type` is `wechatpay` and `processing.product_type` is `Official Account` or `Mini Program`.
          example: oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
        original_order_amount:
          type: number
          minimum: 0
          description: The payment for a merchant's order may be split, and the original order price indicates the transaction amount of the entire order.
          example: 10
        receipt_id:
          type: string
          maxLength: 32
          description: Merchant receipt ID.
          example: '10'
        terminal_type:
          enum:
            - APP
            - WAP
            - WEB
          type: string
          description: The client-side terminal type, if it is a website that is opened via a PC browser or a mobile browser or mobile application.
          default: WEB
          example: WAP
        os_type:
          enum:
            - ANDROID
            - IOS
          type: string
          description: This field is required when `terminalType` is not `WEB`.
          example: ANDROID
        invoice_id:
          type: string
          description: Invoice ID number.
          maxLength: 127
        locale:
          type: string
          pattern: '^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}))?$'
          description: The language and region of the customer in ISO 639-2 language code; value consists of language-country.
          example: en-US
          maxLength: 10
          minLength: 2
        airline_data:
          $ref: '#/components/schemas/AirlineData'
        accommodation_data:
          $ref: '#/components/schemas/AccommodationData'
        merchant_callback_url:
          type: string
          description: A URL which you can use to notify the customer that the order has been created.
        line_of_business:
          type: string
          description: |
            <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
            The line of business that the payment is associated with.
          example: Flights
        pan_preference:
          type: string
          enum:
            - 'fpan'
            - 'dpan'
          description: |
            Specifies the preferred type of Primary Account Number (PAN) for the payment.
            <br>Note: This only works for source.type cards, instruments and tokens.
            * **DPAN**: Indicates a preference for using the Checkout.com Network Token.
            * **FPAN**: Indicates a preference for using the full card number.
        service_type:
          type: string
          enum:
            - "same_day"
            - "standard"
          example: 'standard'
          description: Specifies which ACH service to use for the payment, if you set `source.type` to `ach`.
        partner_code:
          type: string
          description: |
            The customer's 6-digit Blik code.
      
            Required when `source.type` is `blik` and `merchant_initiated` is `false` (For example, for `Regular` payments and the initial payment of a `Recurring` agreement).
          pattern: '^\d{6}$'
          minLength: 6
          maxLength: 6
          example: '902111'
        provision_network_token:
          type: boolean
          description: Indicates whether to provision a network token for the payment.
          default: true
          example: true
        card_type:
          type: string
          description: |
            Specifies whether to process the payment as a credit or debit transaction, if a combo card is used.
      
            This field is required for domestic payments in Brazil performed using a Brazilian card.
          enum:
            - credit
            - debit
        affiliate_id:
          type: string
          pattern: ^[a-zA-Z0-9]{1,15}$
          description: |
            The unique identifier for Visa-registered ramp providers. 
      
            Must only contain alphanumeric characters.
      
            If you're a Visa-registered ramp provider operating with affiliates, this field is required.
          maxLength: 15
        affiliate_url:
          type: string
          description: |
            The affiliate URL.
      
            If you're a Visa-registered ramp provider operating with affiliates, this field is required.
          example: www.mycrypto.com
        purchase_country:
          type: string
          description: |
            The two-letter <a href="https://www.checkout.com/docs/previous/resources/codes/country-codes" target="_blank">ISO country code</a> of the purchase country. 
      
            If you're a Visa-registered ramp provider operating with affiliates, this field is required.
          example: GB
          maxLength: 2
        foreign_retailer_amount:
          type: integer
          example: 200
          minimum: 0
          description: The foreign retailer amount the merchant applied to the transaction, in the [minor currency unit](https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value).
        reconciliation_id:
          type: string
          description: The transaction identifier to track a payment request.
          example: "4123495123"
        aggregator:
          $ref: '#/components/schemas/Aggregator' 
        scheme_transaction_link_id:
          type: string
          description: 'The scheme transaction link identifier.'            
    PaymentRequestSender:
      type: object
      description: Information about the sender of the payment's funds
      discriminator:
        propertyName: type
        mapping:
          individual: '#/components/schemas/01_PaymentRequestIndividualSender'
          corporate: '#/components/schemas/02_PaymentRequestCorporateSender'
          instrument: '#/components/schemas/03_PaymentRequestInstrumentSender'
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - individual
            - corporate
            - instrument
          description: The sender type. If set to `instrument`, the sender information (name and address) will be retrieved from the payment instrument.
        reference:
          type: string
          description: The unique reference for the sender of the payment.
    PaymentRequestSource:
      type: object
      description: The source of the payment
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/PaymentRequestCardSource'
          customer: '#/components/schemas/PaymentRequestCustomerSource'
          id: '#/components/schemas/PaymentRequestIdSource'
          network_token: '#/components/schemas/PaymentRequestNetworkTokenSource'
          token: '#/components/schemas/PaymentRequestTokenSource'
          ach: '#/components/schemas/PaymentRequestAchSource'
          alipay_cn: '#/components/schemas/PaymentRequestAlipayCnSource'
          alipay_hk: '#/components/schemas/PaymentRequestAlipayHkSource'
          alipay_plus: '#/components/schemas/PaymentRequestAlipayPlusSource'
          alma: '#/components/schemas/PaymentRequestAlmaSource'
          bancontact: '#/components/schemas/PaymentRequestBancontactSource'
          bizum: '#/components/schemas/PaymentRequestBizumSource'
          blik: '#/components/schemas/PaymentRequestBlikSource'
          dana: '#/components/schemas/PaymentRequestDanaSource'
          eps: '#/components/schemas/PaymentRequestEpsSource'
          fawry: '#/components/schemas/PaymentRequestFawrySource'
          gcash: '#/components/schemas/PaymentRequestGcashSource'
          ideal: '#/components/schemas/PaymentRequestIdealSource'
          kakaopay: '#/components/schemas/PaymentRequestKakaopaySource'
          knet: '#/components/schemas/PaymentRequestKnetSource'
          mbway: '#/components/schemas/PaymentRequestMBWaySource'
          mobilepay: '#/components/schemas/PaymentRequestMobilePaySource'
          multibanco: '#/components/schemas/PaymentRequestMultibancoSource'
          octopus: '#/components/schemas/PaymentRequestOctopusPaySource' 
          paynow: '#/components/schemas/PaymentRequestPayNowSource'
          plaid: '#/components/schemas/PaymentRequestPlaidSource'
          p24: '#/components/schemas/PaymentRequestP24Source'
          qpay: '#/components/schemas/PaymentRequestQPaySource'
          sequra: '#/components/schemas/PaymentRequestSequraSource'
          sepa: '#/components/schemas/PaymentRequestSEPAV4Source'
          stcpay: '#/components/schemas/PaymentRequestStcPaySource'
          swish: '#/components/schemas/PaymentRequestSwishSource'
          tamara: '#/components/schemas/PaymentRequestTamaraSource'
          tng: '#/components/schemas/PaymentRequestTngSource'
          truemoney: '#/components/schemas/PaymentRequestTruemoneySource'
          twint: '#/components/schemas/PaymentRequestTwintSource'
          vipps: '#/components/schemas/PaymentRequestVippsSource'
          wechatpay: '#/components/schemas/PaymentRequestWeChatPaySource'
      oneOf:
        - $ref: '#/components/schemas/PaymentRequestCardSource'
        - $ref: '#/components/schemas/PaymentRequestWeChatPaySource'
        - $ref: '#/components/schemas/PaymentRequestVippsSource'
        - $ref: '#/components/schemas/PaymentRequestTwintSource'
        - $ref: '#/components/schemas/PaymentRequestTamaraSource'
        - $ref: '#/components/schemas/PaymentRequestStcPaySource'
        - $ref: '#/components/schemas/PaymentRequestSEPAV4Source'
        - $ref: '#/components/schemas/PaymentRequestSequraSource'
        - $ref: '#/components/schemas/PaymentRequestQPaySource'
        - $ref: '#/components/schemas/PaymentRequestP24Source'
        - $ref: '#/components/schemas/PaymentRequestPlaidSource'
        - $ref: '#/components/schemas/PaymentRequestPayNowSource'
        - $ref: '#/components/schemas/PaymentRequestOctopusPaySource'
        - $ref: '#/components/schemas/PaymentRequestMultibancoSource'
        - $ref: '#/components/schemas/PaymentRequestMobilePaySource'
        - $ref: '#/components/schemas/PaymentRequestMBWaySource'
        - $ref: '#/components/schemas/PaymentRequestKnetSource'
        - $ref: '#/components/schemas/PaymentRequestIdealSource'
        - $ref: '#/components/schemas/PaymentRequestFawrySource'
        - $ref: '#/components/schemas/PaymentRequestEpsSource'
        - $ref: '#/components/schemas/PaymentRequestBizumSource'
        - $ref: '#/components/schemas/PaymentRequestBlikSource'
        - $ref: '#/components/schemas/PaymentRequestBancontactSource'
        - $ref: '#/components/schemas/PaymentRequestAlmaSource'
        - $ref: '#/components/schemas/PaymentRequestAlipayCnSource'
        - $ref: '#/components/schemas/PaymentRequestAlipayHkSource'
        - $ref: '#/components/schemas/PaymentRequestAlipayPlusSource'
        - $ref: '#/components/schemas/PaymentRequestDanaSource'
        - $ref: '#/components/schemas/PaymentRequestGcashSource'
        - $ref: '#/components/schemas/PaymentRequestKakaopaySource'
        - $ref: '#/components/schemas/PaymentRequestTngSource'
        - $ref: '#/components/schemas/PaymentRequestTruemoneySource'
        - $ref: '#/components/schemas/PaymentRequestAchSource'
        - $ref: '#/components/schemas/PaymentRequestTokenSource'
        - $ref: '#/components/schemas/PaymentRequestNetworkTokenSource'
        - $ref: '#/components/schemas/PaymentRequestIdSource'
        - $ref: '#/components/schemas/PaymentRequestCustomerSource'
      required:
        - type
      properties:
        type:
          type: string
          allOf:
            - $ref: '#/components/schemas/PaymentRequestSourceType'
          description: The payment source type.<br> *Note:* *To make a payment with
            full card details, you must be <a
            href="https://www.checkout.com/docs/payments/regulation-support/pci-compliance"
            target="_blank">SAQ D PCI compliant</a>*
    PaymentResponse:
      type: object
      description: Payment Response
      additionalProperties: false
      required:
        - id
        - action_id
        - amount
        - currency
        - approved
        - status
        - response_code
        - processed_on
        - _links
      properties:
        id:
          description: The payment's unique identifier
          allOf:
            - $ref: '#/components/schemas/PaymentId'
        action_id:
          description: The unique identifier for the action performed against this payment
          allOf:
            - $ref: '#/components/schemas/ActionId'
        amount:
          type: integer
          description: The payment amount.
          example: 6540
        amount_requested:
          type: integer
          description: The full amount from the original authorization, if a partial authorization was requested and approved.
          example: 6540
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a> of the payment
          example: USD
          maxLength: 3
          minLength: 3
        approved:
          type: boolean
          description: Whether or not the authorization or capture was successful
          example: true
        status:
          type: string
          description: The status of the payment
          enum:
            - Authorized
            - Pending
            - Card Verified
            - Declined
            - Retry Scheduled
          example: Authorized
        auth_code:
          type: string
          description: The acquirer authorization code if the payment was authorized
          example: '643381'
        response_code:
          type: string
          description: The Gateway response code
          example: '10000'
        response_summary:
          type: string
          description: The Gateway response summary
          example: 'Approved'
        expires_on:
          type: string
          description: The timestamp (ISO 8601 code) for when the authorization's validity period expires
        3ds:
          type: object
          description: Provides 3D Secure enrollment status if the payment was downgraded to non-3D Secure
          allOf:
            - $ref: '#/components/schemas/3dsEnrollmentData'
          example:
            downgraded: true
            enrolled: N
        risk:
          type: object
          description: Returns the payment's risk assessment results
          properties:
            flagged:
              type: boolean
              description: Whether or not the payment was flagged by a risk check
              default: false
              example: true
            score:
              type: integer
              description: The risk score calculated by our Fraud Detection engine. Absent if not enough data provided.
              example: 22
              minimum: 0
              maximum: 100
        source:
          description: The source of the payment
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentResponseSource'
        customer:
          type: object
          description: The customer associated with the payment, if provided in the request
          allOf:
            - $ref: '#/components/schemas/CustomerResponse'
        balances:
          type: object
          description: The payment balances
          allOf:
            - $ref: '#/components/schemas/PaymentResponseBalances'
        processed_on:
          description: The date/time the payment was processed
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        reference:
          type: string
          description: Your reference for the payment
          example: ORD-5023-4E89
        subscription:
          $ref: '#/components/schemas/Subscription'
        processing:
          type: object
          description: Returns information related to the processing of the payment
          properties:
            retrieval_reference_number:
              type: string
              description: 'A unique identifier for the authorization that is submitted to the card scheme during processing'
              example: '909913440644'
            acquirer_transaction_id:
              type: string
              description: 'A unique identifier for the transaction generated by the acquirer'
              example: '440644309099499894406'
            recommendation_code:
              type: string
              description: 'A <a href="https://www.checkout.com/docs/resources/codes/recommendation-codes" target="blank">code</a> representing the follow-up action to take with the payment, as recommended by Checkout.com'
              example: "02"
            scheme:
              type: string
              description: The scheme the transaction was processed with
            partner_merchant_advice_code:
              type: string
              description: |
                The <a href="https://www.checkout.com/docs/developer-resources/codes/recommendation-codes#Mastercard_merchant_advice_codes" target="blank">Merchant Advice Code (MAC)</a> provided by Mastercard, which contains additional information about the transaction. 
                
                For example, the MAC can inform you if the transaction was performed using a consumer non-reloadable prepaid card or a consumer single-use virtual card. 
                
                For declined transactions, the MAC will also let you know whether the payment can be retried, and how long you should wait before doing so.
            partner_response_code:
              type: string
              description: |
                The original authorization response code sent by the scheme. This is also referred to as the <a href="https://www.checkout.com/docs/developer-resources/codes/api-response-codes#Raw_response_codes_(Beta)" target="blank">raw response code</a>. 
                
                This differs from the `recommendation_code` value, which is provided by Checkout.com and is standardized across all schemes.
            partner_order_id:
              type: string
              description: "Unique order identification of an Afterpay payment"
              example: "5GK24544NA744002L"
            partner_payment_id:
              type: string
              description: "Unique identification of a payment provided by partner"
            partner_status:
              type: string
              description: "Status of a payment provided by partner"
            partner_transaction_id:
              type: string
              description: "Unique transaction identification provided by partner"
            partner_error_codes:
              type: array
              items:
                type: string
              description: "Error codes provided by partner"
            partner_error_message:
              type: string
              description: "Error description provided by partner"
            partner_authorization_code:
              type: string
              description: "Authorization code provided by partner"
            partner_authorization_response_code:
              type: string
              description: "Authorization response code provided by partner"
            surcharge_amount:
              type: integer
              format: int64
              example: 200
              minimum: 0
              description: 'Surcharge amount applied to the transaction in minor units'
            pan_type_processed:
              type: string
              description: The type of Primary Account Number (PAN) used for the payment. DPAN indicates network token was used, FPAN indicates the full card was used
              enum:
                - fpan
                - dpan
            fallback_source_used:
              type: boolean
              description: Indicates whether the `fallback_source` field was used for the payment.
              example: false
            cko_network_token_available:
              type: boolean
              description: The flag indicating if Checkout Network Token was available for the payment
              example: false
            purchase_country:
              type: string
              description:  The country where the purchase was made. <br/>Format – <a href="https://www.checkout.com/docs/previous/resources/codes/country-codes" target="_blank">ISO alpha-2 country code</a>
              example: GB
              maxLength: 2
            foreign_retailer_amount:
              type: integer
              example: 200
              minimum: 0
              description: The foreign retailer amount the merchant applied to the transaction, in the [minor currency unit](https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value).
            scheme_merchant_id:
              type: string
              description: The merchant identifier that was configured with the scheme and used for the payment.
              example: "123456"
            reconciliation_id:
              type: string
              description: The transaction identifier to track a payment request.
              example: "4123495123"
            aggregator:
              $ref: '#/components/schemas/Aggregator'
            scheme_transaction_link_id:
              type: string
              description: 'The scheme transaction link identifier.'        
        eci:
          type: string
          description: The final Electronic Commerce Indicator (ECI) security level used to authorize the payment.
            Applicable for 3D Secure and network token payments
          example: '06'
        scheme_id:
          type: string
          description: The scheme transaction identifier
          example: '489341065491658'
        retry:
          description: |
            <span style="font-size: 14px; font-weight: 500; color: rgb(60, 4, 133); background-color: rgb(237, 222, 255); border-radius: 4px; padding: 2px 6px" >Beta</span><p>
          allOf:
            - $ref: '#/components/schemas/RetryPostResponse'
        _links:
          type: object
          description: The links related to the payment
          minItems: 2
          required:
            - self
            - actions
          properties:
            self:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: The URI of the payment
            actions:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to the payment's associated actions
            authorize:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to increment the authorization, where applicable
            void:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to void the payment, where applicable
            capture:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to capture the payment, where applicable
            refund:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to refund the payment, where applicable
            cancel:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: A link to cancel the upcoming scheduled retry, where applicable.
          example:
            self:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44'
            actions:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions'
            authorize:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/authorizations'
            void:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/voids'
            capture:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/capture'
            cancel:
              href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/cancel'
    PaymentResponseBalances:
      type: object
      description: The balances of the payment
      properties:
        total_authorized:
          type: integer
          description: The total amount that has been authorized
          example: 6540
        total_voided:
          type: integer
          description: The total amount that has been voided
          example: 0
        available_to_void:
          type: integer
          description: The total amount that is still available for voiding
          example: 6540
        total_captured:
          type: integer
          description: The total amount that has been captured
          example: 0
        available_to_capture:
          type: integer
          description: The total amount that is still available for capture
          example: 6540
        total_refunded:
          type: integer
          description: The total amount that has been refunded
          example: 0
        available_to_refund:
          type: integer
          description: The total amount that is still available for refund
          example: 0
    PaymentResponseDestination:
      type: object
      description: Payment destination
      discriminator:
        propertyName: type
        mapping:
          bank_account: '#/components/schemas/PaymentResponseBankAccountDestination'
      oneOf:
        - $ref: '#/components/schemas/PaymentResponseBankAccountDestination'
      required:
        - type
      properties:
        type:
          type: string
          description: |
            The payment destination type.
          example: 'card'
    PaymentResponseSource:
      type: object
      description: Payment source in /payments successfully created response
      required:
        - type
      properties:
        type:
          type: string
          description: |
            The payment source type. For any payment request sources that result in a card token (token, source ID, etc.),
            this will be `card`
            
            For payment types not specified in this list, the response will not contain a source object.
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/PaymentResponseCardSource'
          ach: '#/components/schemas/PaymentDeclinedSourceResponse'
          alipay_cn: '#/components/schemas/PaymentDeclinedSourceResponse'
          bank_account: '#/components/schemas/PaymentDeclinedSourceResponse'
          sepa: '#/components/schemas/PaymentDeclinedSourceResponse'
      oneOf:
        - $ref: '#/components/schemas/PaymentResponseCardSource'
        - $ref: '#/components/schemas/PaymentDeclinedSourceResponse'
    PaymentReversalAcceptedResponse:
      type: object
      description: Reversal response
      required:
        - action_id
      properties:
        action_id:
          description: The unique identifier for the payment reversal action.
          allOf:
            - $ref: '#/components/schemas/ActionId'
        reference:
          type: string
          description: A unique reference for the payment reversal.
          example: 'ORD-5023-4E89'
        action_type:
          type: string
          description: |
            The payment action performed during the reversal. 
            Determined by the payment's state at the time of processing:
             - `Refund` if the payment has been fully or partially captured
             - `Void` if the payment is in an `Authorized` state.
          example: 'Refund'  
        _links:
          type: object
          description: Links related to the payment reversal.
          readOnly: true
          required:
            - payment
          properties:
            payment:
              description: |
                The URI of the payment to be reversed. 
                
                You can use this value to check the status of the payment reversal.
              allOf:
                - $ref: '#/components/schemas/Link'
                - example:
                    href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44'
      
    PaymentReversalRequest:
      type: object
      properties:
        reference:
          type: string
          description: |
            An internal reference to identify the payment reversal.
            
            For American Express payment reversals, there is a 30-character limit.
          maxLength: 80
          example: 'ORD-5023-4E89'
        metadata:
          type: object
          additionalProperties: true
          description: |
            Stores additional information about the transaction with custom fields.
            
            You can only supply primitive data types with one level of depth. Fields of type `object` or `array` are not supported.
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
    PayoutBillingDescriptor:
      type: object
      required: [reference]
      description: |
        Beneficiary banks typically construct the billing descriptor using the billing descriptor reference and sender information. For direct sellers, the sender is typically your entity’s legal company name. If the ultimate sender is provided, then it is the values of the Sender object.
      properties:
        reference:
          type: string
          minLength: 11
          maxLength: 15
          description: |
            The reference shown on the beneficiary's bank statement.
            Format – The length varies per beneficiary bank. In general, we recommend fewer than 11 characters.
            Note – References are not supported in the US.
    PayoutDetails:
      type: object
      description: Payment response
      properties:
        id:
          description: Payment unique identifier
          allOf:
            - $ref: '#/components/schemas/PaymentId'
        requested_on:
          description: The date/time the payment was requested
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        source:
          description: The source of the payout
          type: object
          properties:
            id:
              type: string
              description: The payment source identifier, which can be used for subsequent payments
              example: ca_y3oqhf46pyzuxjbcn2giaqnb44
            type:
              type: string
              description: The payment source type. This is always `currency_account` for payouts.
              example: currency_account
            currency:
              type: string
              description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a> of the payout source
              example: GBP
              maxLength: 3
              minLength: 3
            amount:
              type: integer
              description: The amount paid out, in minor units, from the source currency account.
              example: 1000
        destination:
          description: The destination of the payout
          type: object
          properties:
            type:
              type: string
              description: The payout destination type
              example: bank_account
            id:
              type: string
              description: The payment instrument identifier
              example: src_4pakgjwmv5re5m5ivqohsqpxnm
        amount:
          type: integer
          description: The original payout amount
          example: 1000
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="_blank">ISO currency code</a> of the payment
          example: GBP
          maxLength: 3
          minLength: 3
        reference:
          type: string
          description: Your reference for the payout
          example: PO-215-5721
        billing_descriptor:
          type: object
          description: Details about the billing descriptor
          properties:
            reference:
              type: string
              description: The reference that is displayed on the account holder's statement
              example: Withdrawal
        status:
          type: string
          description: The status of the payout
          enum:
            - Pending
            - Paid
            - Declined
            - Returned
          example: Pending
        approved:
          type: boolean
          description: Whether the authorization was successful
          example: true
        sender:
          description: Information about the sender of the payment's funds
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentDetailsResponseSender'
        instruction:
          description: Details about the instruction for payouts to bank accounts <br><i>The fields will depend on which ones were included in the request</i>.
          type: object
          properties:
            value_date:
              type: string
              description: The date (in ISO 8601 format) on which the recipient's account will be credited
            purpose:
              type: string
              description: An optional description of the payout purpose, like `Insurance_claim` or `Remittance`
            charge_bearer:
              type: string
              description: Who should be charged the payout fee
              enum:
                - OUR
                - SHA
            repair:
              type: boolean
              description: Determines whether the payout details can be modified to attempt to prevent a payout from being returned
            scheme:
              type: string
              description: The preferred payment scheme or network the bank transfer will be sent through
              enum:
                - swift
                - local
                - instant
            quote_id:
              type: string
              description: The FX quote identifier
          example:
            value_date: '2020-06-13T01:49:19.1864428Z'
            purpose: Wallet Withdrawal
            quote_id: qte_xrhaw53z5m6ehbbxz2n6n5lk74
        _links:
          type: object
          description: Links related to the payouts
          properties:
            self:
              type: object
              description: The direct link to the payout
              properties:
                href:
                  type: string
                  description: The link URL
                  example: https://{prefix}.api.sandbox.checkout.com/payments/pay_gwlowf7eap7uzm4cyaaqoq62au
            actions:
              type: object
              description: The link to the list of actions related to the payout
              properties:
                href:
                  type: string
                  description: The link URL
                  example: https://{prefix}.api.sandbox.checkout.com/payments/pay_gwlowf7eap7uzm4cyaaqoq62au/actions
    PayoutSender:
      type: object
      description: |
         The ultimate sender of the payout – that is, your customer.
         Not supported for Platform or Direct Seller Checkout.com clients. 
      discriminator:
        propertyName: type
        mapping:
          instrument: '#/components/schemas/03_PayoutRequestInstrumentSender'
          individual: '#/components/schemas/01_PayoutRequestIndividualSender'
          corporate: '#/components/schemas/02_PayoutRequestCorporateSender'
      required:
        - reference
      properties:
        type:
          type: string
          enum:
            - instrument
            - individual
            - corporate
          description: The sender type. Given it is set to `instrument`, then the sender parameters are retrieved from the destination.
        reference:
          type: string
          description: A unique reference to the underlying client's customer. A global KYC requirement.
    PlanInstallment:
      type: object
      title: Installment
      description: The information to process a installment payment request. To be used when the `payment_type` is `installment`.
      allOf:
        - properties:
            financing:
              type: boolean
              default: false
              description: If the installment plan has financing.
              example: false
        - $ref: '#/components/schemas/PaymentPlan'
      
    PlanRecurring:
      type: object
      title: Recurring
      description: The information to process a recurring payment request. To be used when the `payment_type` is `recurring`.
      allOf:
        - properties:
            amount_variability:
              type: string
              description: Specifies whether the amount is fixed or variable for each recurrence.
              enum:
                - Fixed
                - Variable
              example: Variable
        - $ref: '#/components/schemas/PaymentPlan'
      
    ProcessingData:
      type: object
      description: Returns information related to the processing of the payment
      properties:
        preferred_scheme:
          type: string
          enum:
            - "mastercard"
            - "visa"
            - "cartes_bancaires"
          description: The preferred scheme for co-badged card payment processing. If performing 3DS via a third party, set this value to the scheme that processed 3DS. This field does not support PINless debit schemes in the US (STAR, PULSE, NYCE, ACCEL, SHAZAM).
          example: 'cartes_bancaires'
        app_id:
          type: string
          description: The customer's application identifier.
          example: 'com.iap.linker_portal'
        airline_data:
          $ref: '#/components/schemas/AirlineData'
        accommodation_data:
          $ref: '#/components/schemas/AccommodationData'
        partner_customer_id:
          type: string
          description: The customer's ID on the partner platform.
          example: '2102209000001106125F8'
        partner_payment_id:
          type: string
          description: 'The partner-originated unique payment identifier'
          example: '440644309099499894406'
        partner_code:
          type: string
          pattern: '^\d{6}$'
          minLength: 6
          maxLength: 6
          description: |
            The 6-digit partner code returned by the payment provider. Returned when `source.type` is `blik`.
          example: '999111'
        failure_code:
          type: string
          description: |
            A high-level failure category returned by the payment provider when a payment is declined or fails. Not all payment methods return this field.
          example: 'partner_error'
        partner_response_code:
          type: string
          description: |
            The raw response code returned by the payment provider when a payment is declined or fails. Not all payment methods return this field.
          example: 'ER_WRONG_TICKET'
        tax_amount:
          type: number
          description: Total tax amount of the order.
          example: 1000
        locale:
          type: string
          pattern: '^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}))?$'
          description: The language and region of the customer. ISO 639-2 language code, its value consists of language-country
          example: en-US
          maxLength: 10
          minLength: 2
        retrieval_reference_number:
          type: string
          description: 'A unique identifier for the authorization provided by partner'
          example: '909913440644'
        partner_order_id:
          type: string
          description: The Klarna order ID associated with the payment.
        partner_status:
          type: string
          description: "Status of a payment provided by partner"
        partner_transaction_id:
          type: string
          description: "Unique transaction identification provided by partner"
        partner_error_codes:
          type: array
          description: The list of error codes that led the payment to fail or be declined, as given by the payment provider
          items:
            type: string
        partner_merchant_advice_code:
          type: string
          description: |
            The <a href="https://www.checkout.com/docs/developer-resources/codes/recommendation-codes#Mastercard_merchant_advice_codes" target="blank">Merchant Advice Code (MAC)</a> provided by Mastercard, which contains additional information about the transaction. 
            
            For example, the MAC can inform you if the transaction was performed using a consumer non-reloadable prepaid card or a consumer single-use virtual card. 
            
            For declined transactions, the MAC will also let you know whether the payment can be retried, and how long you should wait before doing so.
          example: '24'
        partner_error_message:
          type: string
          description: "Error description provided by partner"
        partner_authorization_code:
          type: string
          description: "Authorization code provided by partner"
        partner_authorization_response_code:
          type: string
          description: "Authorization response code provided by partner"    
        partner_fraud_status:
          type: string
          description: Partner fraud status. If the status is Pending, and the Merchant captures before it changes to Accepted the risk of the transaction is solely of the merchant.
        pan_type_processed:
          type: string
          description: The type of Primary Account Number (PAN) used for the payment. DPAN indicates network token was used, FPAN indicates the full card was used
          enum:
            - "fpan"
            - "dpan"
        fallback_source_used:
          type: boolean
          description: Indicates whether the `fallback_source` field was used for the payment.
          example: false
        custom_payment_method_ids:
          type: array
          description: An array defining which of the configured payment options within a payment category (for example, `pay_later` or `pay_over_time`) should be displayed for this purchase.
          items:
            type: string
        aft:
          type: boolean
          description: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions)
        merchant_category_code:
          type: string
          description: Four-digit code for retail financial services expressed in ISO 18245 format, classifying the types of goods or services you provide.
          example: '5311'
        scheme_merchant_id:
          type: string
          description: The merchant identifier that was configured with the scheme and used for the payment.
          example: "123456"
        scheme:
          type: string
          description: The scheme on which the payment was authorized. This may differ from the card's scheme used for the payment if the card is co-badged and the payment was authorized on a different network.
          example: "ACCEL"
          readOnly: true
        scheme_transaction_link_id:
          type: string
          description: 'The scheme transaction link identifier.'            
    RefundAcceptedResponse:
      type: object
      description: Refund response
      required:
        - action_id
      properties:
        action_id:
          description: The unique identifier for the refund action
          allOf:
            - $ref: '#/components/schemas/ActionId'
        reference:
          type: string
          description: Your reference for the refund request
          example: ORD-5023-4E89
        _links:
          type: object
          description: The links related to the refund
          readOnly: true
          minItems: 2
          properties:
            payment:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              description: The URI of the payment to be refunded. Use this to check the status of the payment
              example:
                href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44'
          required:
            - payment
    RefundBankAccountDestination:
      type: object
      description: |
        The destination of the refund. 
        
        This field is required for giropay and EPS refunds.
      required:
        - country
        - account_number
        - bank_code
        - account_holder
      allOf:
        - type: object
          properties:
            account_type:
              description: The type of account to which the refund will be sent.
              type: string
              enum:
                - savings
                - current
                - cash
              example: savings
      
            account_number:
              description: The account number.
              type: string
              example: '13654567455'
      
            bank_code:
              description: The code that identifies the bank.
              type: string
              example: 123-456
      
            branch_code:
              description: The code that identifies the bank branch.
              type: string
              example: '6443'
      
            iban:
              description: The account's International Bank Account Number (IBAN).
              type: string
              example: HU93116000060000000012345676
      
            bban:
              description: |
                The account's Basic Bank Account Number (BBAN). 
                
                The BBAN is a combination of the account number and the bank or branch code, or both.
              type: string
              example: 3704 0044 0532 0130 00
      
            swift_bic:
              description: An 8 or 11-digit code that identifies the bank or bank branch.
              type: string
              example: '37040044'
      
            country:
              description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the country where the account is based.
              type: string
              example: GB
      
            account_holder:
              $ref: '#/components/schemas/RefundDestinationAccountHolder'
      
            bank:
              $ref: '#/components/schemas/BankDetails'
    RefundDestinationAccountHolder:
      type: object
      description: The account holder details.
      required:
        - first_name
        - last_name
      properties:
        type:
          description: The account holder type.
          type: string
          enum:
            - individual
            - corporate
            - government
          example: individual
      
        first_name:
          description: The account holder's first name.
          type: string
          example: 'John'
      
        last_name:
          description: The account holder's last name.
          type: string
          example: 'Smith'
      
        company_name:
          description: The corporate account holder's company name.
          type: string
          example: Test company
      
        tax_id:
          description: The account holder's tax number or reference.
          type: string
          example: '123456'
      
        date_of_birth:
          description: The account holder's date of birth,  in the format `YYYY-MM-DD`.
          type: string
          format: date
          example: '1986-01-01'
      
        country_of_birth:
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the account holder's country of birth.
          type: string
          example: GB
      
        residential_status:
          description: The account holder's residential status.
          type: string
          enum:
            - resident
            - non_resident
          example: resident
      
        billing_address:
          description: The account holder's billing address.
          allOf:
            - $ref: '#/components/schemas/Address'
      
        phone:
          description: The account holder's phone number.
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
      
        identification:
          $ref: '#/components/schemas/AccountHolderIdentification'
      
        email:
          description: The account holder's email address.
          type: string
          format: email
          example: test.user@checkout.com
    RefundRequest:
      type: object
      properties:
        amount:
          type: integer
          description: |
            The amount to refund. If not specified, the full payment amount will be refunded.
          minimum: 0
          example: 6540
        reference:
          type: string
          description: A reference you can later use to identify this refund request.<br>For Amex, the string limit is 30 characters. <br> For TWINT, the string limit is 50 characters.
          maxLength: 80
          example: 'ORD-5023-4E89'
        amount_allocations:
          $ref: '#/components/schemas/AmountAllocations'
        capture_action_id:
          type: string
          description: The Checkout.com action ID of the capture you want to refund. Only for PayPal and Riverty.
          example: 'act_fd3h6evhpn3uxdoqbuu3lqnqbm'
        items:
          $ref: '#/components/schemas/Items'
        destination:
          $ref: '#/components/schemas/RefundBankAccountDestination'
        metadata:
          type: object
          description: |
            A set of key-value pairs to attach to the authorization request. You can use this to store additional information in a structured format. 
            
            The `metadata` object only supports primitive data types. Objects and arrays are not supported.
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
    01_PayoutRequestIndividualAccountHolder:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/AccountHolder'
      required:
        - type
        - first_name
        - last_name
        - billing_address
      properties:
        first_name:
          description: |
            The <b>legal</b> first name of the account holder.
          type: string
          example: 'John'
      
        last_name:
          description: |
            The <b>legal</b> last name of the account holder.
          type: string
          example: 'Smith'
      
        tax_id:
          description: The <b>legal</b> account holder's tax number or reference.
          type: string
          example: '123456'
      
        date_of_birth:
          description: The account holder's date of birth in a `YYYY-MM-DD` format. Strongly recommended where available.
          type: string
          format: date
          example: '1986-01-01'
      
        country_of_birth:
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the account holder's country of birth.
          type: string
          example: GB
      
        residential_status:
          description: The account holder's residential status.
          type: string
          enum:
            - resident
            - non_resident
          example: resident
      
        billing_address:
          description: The current billing address associated with the destination account. Required for payouts to individuals. Strongly recommended when available.
          allOf:
            - $ref: '#/components/schemas/Address'
      
        phone:
          description: The phone number of the account holder.
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
      
        identification:
          type: object
          description: The account holder's government document identification. For example, the social security number (SSN).
          properties:
            type:
              type: string
              description: The document type
              example: SSN
            issuing_country:
              type: string
              description: The country where the document was issued
            number:
              type: string
              description: The document number
    02_PayoutRequestCorporateAccountHolder:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/AccountHolder'
      required:
        - type
        - company_name
      properties:
        company_name:
          description: |
            The full <b>legal</b> name of a registered company that holds the account.
          type: string
          example: Test company
      
        tax_id:
          description: The <b>legal</b> account holder's tax number or reference.
          type: string
          example: '123456'
      
        billing_address:
          description: The current billing address associated with the destination account. Strongly recommended when available.
          allOf:
            - $ref: '#/components/schemas/Address'
    03_PayoutRequestGovernmentAccountHolder:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/AccountHolder'
      required:
        - type
        - company_name
      properties:
        company_name:
          description: |
            The full <b>legal</b> name of a registered company that holds the account.
          type: string
          example: Test company
      
        tax_id:
          description: The <b>legal</b> account holder's tax number or reference.
          type: string
          example: '123456'
      
        billing_address:
          description: The current billing address associated with the destination account. Strongly recommended when available.
          allOf:
            - $ref: '#/components/schemas/Address'
    PaymentBankAccountDestination:
      type: object
      description: An existing payment instrument.
      required:
        - country
        - account_type
        - type
      properties:
        type:
          type: string
          description: The payout destination type.
          example: 'bank_account'
        country:
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of where the account is based. Note that not all countries are available, see our <a href="https://www.checkout.com/docs/payments/request-payouts/bank-payouts/payout-formatting" target="_blank">docs</a> for details.
          type: string
          minLength: 2
          maxLength: 2
          example: GB
        iban:
          description: Internationally agreed standard for identifying bank accounts. Lengths vary per `destination_country`. See the <a href="https://www.iban.com/glossary" target="_blank">glossary</a> for details.
          type: string
          example: HU93116000060000000012345676
        account_number:
          description: Number (which can contain letters) that identifies the local account.
          type: string
          example: '13654567455'
        bank_code:
          description: Code that identifies the bank. Also referred as Routing Number in the United States.
          type: string
          example: 123-456
        branch_code:
          description: Code that identifies the bank branch.
          type: string
          example: '6443'
        bban:
          description: The combination of bank code and/or branch code and account number.
          type: string
          example: 3704 0044 0532 0130 00
        swift_bic:
          description: 8 or 11 character code which identifies the bank or bank branch.
          type: string
          example: '37040044'
        account_type:
          description: The type of the bank account. <b>Note:</b> that some beneficiary banks do not accept payouts to savings accounts.
          type: string
          enum:
            - savings
            - current
            - cash
          example: savings
        account_holder:
          $ref: '#/components/schemas/AccountHolder'
    PaymentRequestIdDestination:
      type: object
      description: An existing payment instrument.
      required:
        - id
        - type
      properties:
        type:
          type: string
          description: The payout destination type.
          example: 'id'
        id:
          type: string
          pattern: "^(src)_(\\w{26})$"
          description: The existing payment instrument's identifier. It is advisable that payment instruments are reused, <i>see the <a href="https://api-reference.checkout.com/#operation/createAnInstrument" target="_blank">documentation</a> for more information.</i>
          example: src_wmlfc3zyhqzehihu7giusaaawu
    01_PaymentRequestIndividualSender:
      description: Store a previously tokenized instrument
      allOf:
          - $ref: '#/components/schemas/PaymentRequestSender'
          - type: object
            required:
              - first_name
              - last_name
              - address
            properties:
              first_name:
                type: string
                description: The sender's first name
                example: 'John'
              last_name:
                type: string
                description: The sender's last name
                example: 'Jones'
              date_of_birth:
                type: string
                format: date
                description: The sender's date of birth (yyyy-mm-dd)
                maxLength: 10
                example: '1985-05-15'
              address:
                description: The sender's address
                allOf:
                  - $ref: '#/components/schemas/Address'
              identification:
                type: object
                properties:
                  type:
                    type: string
                    description: The type of identification used to identify the sender
                    enum:
                      - passport
                      - driving_licence
                      - national_id
                    example: driving_licence
                  number:
                    type: string
                    description: The identification number
                    example: '1234'
                  issuing_country:
                    type: string
                    description: The two-letter ISO country code of the country that issued the identification
                    example: GT
    01_PayoutRequestIndividualSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PayoutSender'
      required:
        - type
        - first_name
        - last_name
        - address 
      properties:
        first_name:
          type: string
          description: The <b>legal</b> first name of the ultimate sender.
          example: 'John'
        last_name:
          type: string
          description: The <b>legal</b> last name of the ultimate sender.
          example: 'Jones'
        dob:
          type: string
          format: date
          description: The sender's date of birth in a `YYYY-MM-DD` format. Strongly recommended where available.
          maxLength: 10
          example: '1985-05-15'
        address:
          description: The sender's address.
          allOf:
            - $ref: '#/components/schemas/Address'
        identification:
          type: object
          properties:
            type:
              type: string
              description: The type of identification used to identify the sender.
              enum:
                - passport
                - driving_licence
                - national_id
              example: driving_licence
            number:
              type: string
              description: The identification number.
              example: '1234'
            issuing_country:
              type: string
              description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> that issued the identification.
              example: GT
    02_PaymentRequestCorporateSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PaymentRequestSender'
        - type: object
          required:
            - company_name
            - address
          properties:
            company_name:
              type: string
              description: The sender's company name
            address:
              description: The sender's address
              allOf:
                - $ref: '#/components/schemas/Address'
    02_PayoutRequestCorporateSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PayoutSender'
      required:
        - type
        - company_name
        - address 
      properties:
        company_name:
          type: string
          description: The sender's company name
        address:
          description: The sender's address
          allOf:
            - $ref: '#/components/schemas/Address'
    03_PaymentRequestInstrumentSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PaymentRequestSender'
    03_PayoutRequestInstrumentSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PayoutSender'
      required:
        - type
    PaymentRequestAchSource:
      type: object
      description: An ach payment source
      required:
      - type
      - account_type
      - account_holder
      - account_number
      - bank_code
      - country
      properties:
        account_type:
          type: string
          description: The type of Direct Debit account
          example: savings
          enum:
          - savings
          - checking
          - cash
        country:
          type: string
          description: The source country
          minLength: 2
          maxLength: 2
          example: US
        account_number:
          type: string
          description: The account number of the Direct Debit account
          minLength: 4
          maxLength: 17
          example: '136549956'
        bank_code:
          type: string
          description: The bank code of the Direct Debit account
          minLength: 8
          maxLength: 9
          example: '021000021'
        account_holder:
          $ref: '#/components/schemas/AccountHolderAch'
        type:
          type: string
          description: The payment source type.
          example: ach
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - ach
    PaymentRequestAlipayCnSource:
      type: object
      description: 'Alipay CN Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: alipay_cn
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - alipay_cn
      required:
      - type
    PaymentRequestAlipayHkSource:
      type: object
      description: 'Alipay HK Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: alipay_hk
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - alipay_hk
      required:
      - type
    PaymentRequestAlipayPlusSource:
      type: object
      description: 'Alipay Plus Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: alipay_plus
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - alipay_plus
      required:
      - type
    PaymentRequestAlmaSource:
      type: object
      description: Alma payment source
      required:
      - type
      properties:
        type:
          type: string
          description: The payment source type.
          example: alma
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - alma
        billing_address:
          description: The billing address of the cardholder
          allOf:
          - $ref: '#/components/schemas/Address'
          - type: object
            required:
            - address_line1
            - city
            - country
    PaymentRequestBancontactSource:
      ###
      # Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit.
      ###
      type: object
      description: 'Bancontact Source'
      required:
      - type
      - payment_country
      - account_holder_name
      properties:
        payment_country:
          maxLength: 2
          minLength: 2
          enum:
          - BE
          type: string
          description: 'The 2-letter ISO country code of the country in which the payment
            instrument is issued/operated.'
        account_holder_name:
          maxLength: 100
          minLength: 3
          type: string
          description: 'The account holder.'
        billing_descriptor:
          maxLength: 65534
          type: string
          description: 'Payment billing descriptor.'
        language:
          maxLength: 2
          minLength: 2
          enum:
          - fr
          - nl
          - de
          - en
          type: string
          description: 'The 2-letter ISO language code that should be preferred when presenting
            payment pages to the consumer.'
          default: fr
          example: nl
        type:
          type: string
          description: The payment source type.
          example: bancontact
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - bancontact
    PaymentRequestBizumSource:
      type: object
      description: 'Bizum Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: bizum
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - bizum
      required:
      - type
    PaymentRequestBlikSource:
      type: object
      description: |
        Blik source. Use this to process Blik payments in Poland.
      
        When `source.type` is `blik`:
          - `currency` must be `PLN`.
          - `amount` must not exceed `5000000` (in the [minor currency unit](https://www.checkout.com/docs/resources/calculating-the-amount)).
          - `reference` is limited to 35 characters.
      
        For customer-initiated payments (`merchant_initiated: false`), provide the customer's 6-digit Blik code in `processing.partner_code`. This applies to one-off (`payment_type: Regular`) payments and to the initial payment of a recurring agreement (`payment_type: Recurring`).
      
        For merchant-initiated recurring payments (`merchant_initiated: true`), use either:
          - `source.type: id` with a `source.id` value returned from a previous Blik recurring payment, or
          - `source.type: blik` with `partner_agreement_id` set to an external Blik PAYID created with another PSP.
      required:
        - type
      properties:
        type:
          type: string
          description: The payment source type.
          example: blik
          allOf:
            - $ref: '#/components/schemas/PaymentRequestSourceType'
            - type: string
              enum:
                - blik
        partner_agreement_id:
          type: string
          description: |
            The Blik PAYID identifying an external partner agreement created with another PSP.
      
            Only used when processing merchant-initiated recurring payments (`merchant_initiated: true`) without a stored Checkout.com source.
          maxLength: 64
          example: blik_payid_123456789
    PaymentRequestCardSource:
      type: object
      description: A card payment source
      required:
      - type
      - number
      - expiry_month
      - expiry_year
      properties:
        number:
          type: string
          description: The card number (without separators)
          example: '4543474002249996'
        expiry_month:
          type: integer
          description: The expiry month of the card
          minimum: 1
          maximum: 12
          example: 6
        expiry_year:
          type: integer
          description: 4-digit expiry year of the card
          example: 2030
        name:
          type: string
          description: The name of the cardholder
          example: 'Bruce Wayne'
        cvv:
          type: string
          description: The card verification value/code. 3 digits, except for American
            Express (4 digits)
          example: '956'
          minLength: 3
          maxLength: 4
        stored:
          type: boolean
          description: >-
            Indicates whether this card is being submitted from your own stored card-on-file system, rather than being entered by the customer at the time of payment. Set to `true` when you provide card details that you already have on file for the customer.
          default: false
          example: true
        store_for_future_use:
          type: boolean
          description: This must be set to true if you intend to reuse the payment 
            credentials in subsequent payments. Setting the field as false will mean 
            that a <a 
            href="https://www.checkout.com/docs/payments/store-payment-details/payment-instruments"
            target="blank">payment instrument</a> will not be included in the payment 
            response.
          default: true
          example: false
        billing_address:
          description: The billing address of the cardholder
          allOf:
          - $ref: '#/components/schemas/Address'
        phone:
          description: The phone number of the cardholder
          allOf:
          - $ref: '#/components/schemas/PhoneNumber'
        account_holder:
          type: object
          description: Information about the account holder of the card
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_RequestSources_AccountHolderIndividual'
              corporate: '#/components/schemas/02_RequestSources_AccountHolderCorporate'
              government: '#/components/schemas/03_RequestSources_AccountHolderGovernment'
          required:
            - type
          properties:
            type:
              type: string
              example: 'individual'
        allow_update:
          type: boolean
          description: Specifies whether to use the <a 
            href="https://checkout.com/docs/payments/store-and-manage-credentials/update-stored-credentials/real-time-account-updater">Real-Time
            Account Updater</a> to update the card information.
          default: true
          example: false
        type:
          type: string
          description: The payment source type.
          example: card
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - card
    PaymentRequestCustomerSource:
      type: object
      description: A customer source
      required:
      - type
      - id
      properties:
        id:
          type: string
          pattern: "^(cus)_(\\w{26})$"
          description: The customer's identifier.
          example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44'
        billing_address:
          description: The cardholder's billing address.
          allOf:
          - $ref: '#/components/schemas/Address'
        phone:
          description: The cardholder's phone number.
          allOf:
          - $ref: '#/components/schemas/PhoneNumber'
        account_holder:
          type: object
          description: Information about the account holder of the customer's default 
            payment instrument
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_RequestSources_AccountHolderIndividual'
              corporate: '#/components/schemas/02_RequestSources_AccountHolderCorporate'
              government: '#/components/schemas/03_RequestSources_AccountHolderGovernment'
          properties:
            type:
              type: string
              example: 'individual'
        allow_update:
          type: boolean
          description: Specifies whether to use the <a 
            href="https://checkout.com/docs/payments/store-and-manage-credentials/update-stored-credentials/real-time-account-updater">Real-Time
            Account Updater</a> to update the card information.
          default: true
          example: false
        type:
          type: string
          description: The payment source type.
          example: customer
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - customer
    PaymentRequestDanaSource:
      type: object
      description: 'Dana Source'
      properties:
        type:
          description: The payment source type.
          example: dana
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - dana
      required:
      - type
    PaymentRequestEpsSource:
      ###
      # Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit.
      ###
      type: object
      description: 'EPS Source'
      required:
      - type
      - purpose
      properties:
        type:
          type: string
          description: The payment source type.
          example: eps
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - eps
        purpose:
          maxLength: 27
          type: string
          description: "Purpose of the payment as appearing on customer's bank statement."
        account_holder:
          $ref: '#/components/schemas/AccountHolderEps'
    PaymentRequestFallbackSource:
      type: object
      description: A card payment source
      required:
        - type
        - number
        - expiry_month
        - expiry_year
      properties:
        number:
          type: string
          description: The card number (without separators)
          example: '4543474002249996'
        expiry_month:
          type: integer
          description: The expiry month of the card
          minimum: 1
          maximum: 12
          example: 6
        expiry_year:
          type: integer
          description: 4-digit expiry year of the card
          example: 2030
        name:
          type: string
          description: The name of the cardholder
          example: 'Bruce Wayne'
        cvv:
          type: string
          description: The card verification value/code. 3 digits, except for American
            Express (4 digits)
          example: '956'
          minLength: 3
          maxLength: 4
        stored:
          type: boolean
          description: >-
            Indicates whether this card is being submitted from your own stored card-on-file system, rather than being entered by the customer at the time of payment. Set to `true` when you provide card details that you already have on file for the customer.
          default: false
          example: true
        store_for_future_use:
          type: boolean
          description: This must be set to true if you intend to reuse the payment
            credentials in subsequent payments. Setting the field as false will mean
            that a <a
            href="https://www.checkout.com/docs/payments/store-payment-details/payment-instruments"
            target="blank">payment instrument</a> will not be included in the payment
            response.
          default: true
          example: false
        billing_address:
          description: The billing address of the cardholder
          allOf:
            - $ref: '#/components/schemas/Address'
        phone:
          description: The phone number of the cardholder
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        account_holder:
          type: object
          description: Information about the account holder of the card
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_RequestSources_AccountHolderIndividual'
              corporate: '#/components/schemas/02_RequestSources_AccountHolderCorporate'
              government: '#/components/schemas/03_RequestSources_AccountHolderGovernment'
          required:
            - type
          properties:
            type:
              type: string
              example: 'individual'
        allow_update:
          type: boolean
          description: Specifies whether to use the <a
            href="https://checkout.com/docs/payments/store-and-manage-credentials/update-stored-credentials/real-time-account-updater">Real-Time
            Account Updater</a> to update the card information.
          default: true
          example: false
        type:
          type: string
          description: The payment source type.
          example: card
          allOf:
            - type: string
              enum:
                - card
    PaymentRequestFawrySource:
      ###
      # Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit.
      ###
      type: object
      description: 'Fawry Source'
      required:
      - type
      - description
      - products
      - customer_email
      - customer_mobile
      properties:
        description:
          maxLength: 265
          type: string
          description: 'The payment description.'
        customer_profile_id:
          type: string
          description: "The customer's id within merchant's system."
        customer_email:
          type: string
          description: "The customer's email address."
        customer_mobile:
          type: string
          description: "The customer's mobile phone number."
        expires_on:
          type: string
          description: 'The date on which the payment expires.'
          format: 'date-time'
        products:
          type: array
          items:
            required:
            - product_id
            - quantity
            - price
            - description
            type: object
            properties:
              product_id:
                maxLength: 265
                type: string
                description: 'The id of the product.'
              quantity:
                type: integer
                description: 'The quantity of the product.'
              price:
                type: integer
                description: "The price of the item.  Expressed using Checkout.com's standard
                  rules for calculating payment values."
              description:
                maxLength: 265
                type: string
                description: 'The description of the product.'
          description: 'List of Products'
        type:
          type: string
          description: The payment source type.
          example: fawry
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - fawry
    PaymentRequestGcashSource:
      type: object
      description: 'GCash Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: gcash
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - gcash
      required:
      - type
    PaymentRequestIdealSource:
      ###
      # Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit.
      ###
      type: object
      description: 'iDEAL Source'
      required:
      - type
      - description
      properties:
        description:
          maxLength: 35
          type: string
          description: "Description of the product(s) or services being paid for.  This
            field must not contain characters that can lead to problems (for example those
            occurring in HTML editing codes).  To prevent any possible errors most iDEAL
            systems will reject any description that contains HTML-tags and such other code.\n"
        language:
          maxLength: 2
          type: string
          description: |
            This field enables the issuer's site to select the consumer's preferred language.
            For example, the language selected on the merchant's site – if the issuer's site supports it.  Code list in accordance with ISO 639-1. (Dutch = 'nl', English = 'en'). 
      
            If a non-supported or non-existing language is entered, the standard language of the issuer is used. Because not all issuers support other languages, it is recommended to send 'nl' by default.
        type:
          type: string
          description: The payment source type.
          example: ideal
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - ideal
    PaymentRequestIdSource:
      type: object
      description: An existing payment source. Payment Method required for ACH payment
      required:
      - type
      - id
      properties:
        id:
          type: string
          pattern: "^(src)_(\\w{26})$"
          description: The payment source identifier (e.g., a card source identifier)
          example: src_wmlfc3zyhqzehihu7giusaaawu
        cvv:
          type: string
          description: |
            The card verification value (CVV) or code, if the source is a card. The expected format varies:
      
            - for American Express cards, this should be a 4-digit code
            - for other cards, this should be a 3-digit code
            - for Checkout.com CVV tokens, this should be an ID value with the prefix `tok_`
          pattern: ^tok_(\w{26})$|^\d{3,4}$
          example: '956'
        payment_method:
          type: string
          description: The payment method. Payment Method required for ACH payment
          example: 'ach'
        billing_address:
          description: The cardholder's billing address.
          allOf:
          - $ref: '#/components/schemas/Address'
        phone:
          description: The cardholder's phone number.
          allOf:
          - $ref: '#/components/schemas/PhoneNumber'
        account_holder:
          type: object
          description: Information about the account holder of the payment instrument
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_RequestSources_AccountHolderIndividual'
              corporate: '#/components/schemas/02_RequestSources_AccountHolderCorporate'
              government: '#/components/schemas/03_RequestSources_AccountHolderGovernment'
          required:
          - type
          properties:
            type:
              type: string
              example: 'individual'
        allow_update:
          type: boolean
          description: Specifies whether to use the <a 
            href="https://checkout.com/docs/payments/store-and-manage-credentials/update-stored-credentials/real-time-account-updater">Real-Time
            Account Updater</a> to update the card information.
          default: true
          example: false
        type:
          type: string
          description: The payment source type.
          example: id
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - id
    PaymentRequestKakaopaySource:
      type: object
      description: 'Kakaopay Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: kakaopay
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - kakaopay
      required:
      - type
    PaymentRequestKnetSource:
      type: object
      description: 'KNet Source'
      required:
      - type
      properties:
        type:
          type: string
          description: The payment source type.
          example: knet
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - knet
        language:
          maxLength: 2
          enum:
          - ar
          - en
          type: string
          description: |
            Required for KNet Gateway payments.
      
            This field enables the issuer's site to select the consumer's preferred language.
            For example, the language selected on the merchant's site – if the issuer's site supports it.
            Code list in accordance with ISO 639-1. (Arabic = 'ar', English = 'en').
            Note that 'ar' corresponds to 'ARA' and 'en' to 'USA'. Both values accepted by KNet Gateway.
        user_defined_field1:
          maxLength: 255
          type: string
          description: >-
            User-defined field that can be used to pass and store any additional transaction
            data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed
        user_defined_field2:
          maxLength: 255
          type: string
          description: >-
            User-defined field that can be used to pass and store any additional transaction
            data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed
        user_defined_field3:
          maxLength: 255
          type: string
          description: >-
            User-defined field that can be used to pass and store any additional transaction
            data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed.
            Note that this field must be omitted when the `card_token` field is not empty.
            This restriction
            exists because a card token is passed to KNet Gateway as `user_defined_field3`
        user_defined_field4:
          maxLength: 255
          type: string
          description: >-
            User-defined field that can be used to pass and store any additional transaction
            data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed.
        user_defined_field5:
          maxLength: 255
          type: string
          description: >-
            User-defined field that can be used to pass and store any additional transaction
            data
            required to be archived with the transaction and available as a searching criterion.
            Only alphanumeric characters and spaces are allowed.
            Note that this field must be omitted when the `ptlf` field is not empty. This
            restriction
            exists because a PTLF value is passed to KNet Gateway as `user_defined_field5`
        card_token:
          type: string
          pattern: '^[0-9]{8}$'
          description: >-
            This token allows re-use of card details for multiple payments.
            This 8-digit token should be generated by a merchant. When a subsequent payment
            is initialized with the same card token, a customer is presented with two options.
            The customer can choose to pay with KFast (doesn't need to enter card details
            again),
            or with KNet as usual. The payment flow stays the same i.e. a merchant should
            redirect
            a customer to the redirect URL which is provided in the payment creation response.
            Note that `user_defined_field3` must be omitted when the `card_token` field
            is not empty. This restriction
            exists because a card token is passed to KNet Gateway as `user_defined_field3`
        ptlf:
          maxLength: 45
          type: string
          description: >-
            This is an ID for merchant PTLF functionality tracking.
            Only alphanumeric characters are allowed.
            Note that `user_defined_field5` must be omitted when the `ptlf` field is not
            empty. This restriction
            exists because a PTLF value is passed to KNet Gateway as `user_defined_field5`.
        token_type:
          type: string
          enum:
          - applepay
          description: The token type. This field is always `applepay` for KNet Apple 
            Pay payments.
        token_data:
          description: The Apple Pay payment token. Required for Apple Pay payments.
          allOf:
          - $ref: '#/components/schemas/TokenData'
        payment_method_details:
          type: object
          description: The payment data received in the Apple Pay payload. Required 
            for Apple Pay payments.
          properties:
            display_name:
              type: string
              description: The payment type display name.
              example: 'Visa 1234'
            type:
              type: string
              description: The payment method type.
              example: 'debit'
            network:
              type: string
              description: The card network.
              example: 'Visa'
    PaymentRequestMBWaySource:
      type: object
      description: 'MBWay payment request source'
      required:
      - type
      properties:
        type:
          type: string
          description: The payment source type.
          example: mbway
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - mbway
    PaymentRequestMobilePaySource:
      type: object
      description: 'MobilePay Request Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: mobilepay
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - mobilepay
      required:
      - type
    PaymentRequestMultibancoSource:
      ###
      # Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit.
      ###
      type: object
      description: 'Multibanco Source'
      required:
      - type
      - payment_country
      - account_holder_name
      properties:
        payment_country:
          maxLength: 2
          minLength: 2
          enum:
          - PT
          type: string
          description: 'The 2-letter ISO country code of the country in which the payment
            instrument is issued/operated.'
        account_holder_name:
          maxLength: 100
          minLength: 3
          type: string
          description: 'The account holder.'
        billing_descriptor:
          maxLength: 65534
          type: string
          description: 'Payment billing descriptor.'
        type:
          type: string
          description: The payment source type.
          example: multibanco
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - multibanco
    PaymentRequestNetworkTokenSource:
      type: object
      description: A network token payment source
      required:
      - type
      - token
      - expiry_month
      - expiry_year
      - token_type
      - cryptogram
      - eci
      properties:
        token:
          type: string
          description: The network token PAN
          example: '4543474002249996'
        expiry_month:
          type: integer
          description: The expiry month of the token
          minimum: 1
          example: 6
          minLength: 1
          maxLength: 2
        expiry_year:
          type: integer
          description: The expiry year of the token
          example: 2025
          minLength: 4
          maxLength: 4
        token_type:
          type: string
          description: The type of token
          enum:
          - vts
          - mdes
          - applepay
          - googlepay
        cryptogram:
          type: string
          description: The Base64 encoded cryptographic identifier (TAVV) used by card
            schemes to validate the token verification result. Optional if 
            `previous_payment_id` is specified and `3ds.enabled` is false
          maxLength: 100
          example: hv8mUFzPzRZoCAAAAAEQBDMAAAA=
        eci:
          type: string
          description: |
            The Electronic Commerce Indicator (ECI) security level associated with the token. Optional if `previous_payment_id` is specified and `3ds.enabled` is false
          maxLength: 2
          example: '05'
        stored:
          type: boolean
          description: >-
            Indicates whether this card is being submitted from your own stored card-on-file system, rather than being entered by the customer at the time of payment. Set to `true` when you provide card details that you already have on file for the customer.
          default: false
          example: true
        store_for_future_use:
          type: boolean
          description: This must be set to true if you intend to reuse the payment 
            credentials in subsequent payments. Setting the field as false will mean 
            that a <a 
            href="https://www.checkout.com/docs/payments/store-payment-details/payment-instruments"
            target="blank">payment instrument</a> will not be included in the payment 
            response.
          default: true
          example: false
        name:
          type: string
          description: The customer's name
          example: 'Bruce Wayne'
        cvv:
          type: string
          description: The card verification value/code. 3 digits, except for American
            Express (4 digits)
          example: '956'
          minLength: 3
          maxLength: 4
        billing_address:
          description: The customer's billing address
          allOf:
          - $ref: '#/components/schemas/Address'
        phone:
          description: The customer's phone number
          allOf:
          - $ref: '#/components/schemas/PhoneNumber'
        account_holder:
          type: object
          description: Information about the account holder of the card
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_RequestSources_AccountHolderIndividual'
              corporate: '#/components/schemas/02_RequestSources_AccountHolderCorporate'
              government: '#/components/schemas/03_RequestSources_AccountHolderGovernment'
          properties:
            type:
              type: string
              example: 'individual'
        type:
          type: string
          description: The payment source type.
          example: network_token
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - network_token
    PaymentRequestOctopusPaySource:
      type: object
      description: "Octopus Pay Source"
      required:
      - type
      properties:
        type:
          type: string
          description: The payment source type.
          example: octopus
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - octopus
    PaymentRequestP24Source:
      ###
      # Warning: this file was auto generated from OpenAPI specs using 'npm run sync-generated-specs'. Do not manually edit.
      ###
      type: object
      description: 'P24 Source'
      required:
      - type
      - payment_country
      - account_holder_name
      - account_holder_email
      properties:
        type:
          type: string
          description: The payment source type.
          example: p24
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - p24
        payment_country:
          maxLength: 2
          minLength: 2
          enum:
          - PL
          type: string
          description: 'The 2-letter ISO country code of the country in which the payment
            instrument is issued/operated.'
        account_holder_name:
          maxLength: 100
          minLength: 3
          type: string
          description: 'The account holder.'
        account_holder_email:
          maxLength: 254
          type: string
          description: 'RFC-compliant email address of the account holder.'
        billing_descriptor:
          maxLength: 65534
          type: string
          description: 'Payment billing descriptor.'
    PaymentRequestPayNowSource:
      type: object
      description: 'PayNow Request Source'
      required:
      - type
      properties:
        type:
          type: string
          description: The payment source type.
          example: paynow
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - paynow
    PaymentRequestPlaidSource:
      type: object
      description: A Plaid source.
      required:
      - type
      - token
      - account_holder
      properties:
        token:
          type: string
          description: |
            The `processor_token` returned from Plaid’s `/processor/token/create` endpoint. 
      
            In the sandbox environment, this token will have the format `processor-sandbox-xxx`.
        account_holder:
          description: The account holder details.
          allOf:
          - $ref: '#/components/schemas/AccountHolder'
        type:
          type: string
          description: The payment source type.
          example: plaid
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - plaid
    PaymentRequestQPaySource:
      type: object
      description: 'QPay Source'
      required:
      - type
      - description
      properties:
        type:
          type: string
          description: The payment source type.
          example: qpay
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - qpay
        quantity:
          minimum: 1
          type: integer
          description: 'A numeric value greater than zero that represents the quantity of
            a purchased item. The value is used for display purposes only and does not affect
            the total amount of the payment. The minimum allowed value is 1.'
        description:
          type: string
          description: 'Alphanumeric string containing a description of the payment order.
            Note: The maximum allowed length of this property is 255 characters after UTF-8
            URL encoding.'
        language:
          type: string
          description: 'Alphabetic value representing the language of the interface displayed
            to customer at merchant site, and used as language for the payment description
            parameter.  PG will use this value to display the interface supporting selected
            language to the customer during the payment process.  Supported values are:
            `En`, `Ar`. The default value is `En`.'
        national_id:
          maxLength: 32
          type: string
          description: 'Alphanumeric value representing the national ID of the customer
            performing the transaction. The maximum allowed length of this property is 32.'
    PaymentRequestSEPAV4Source:
      type: object
      description: 'SEPA DD Source'
      required:
      - type
      - country
      - account_number
      - currency
      - account_holder
      properties:
        country:
          type: string
          description: 'The account''s country, as an ISO 3166-1 alpha-2 code.'
          example: FR
        account_number:
          type: string
          description: 'The account holder''s IBAN.'
          example: FR7630006000011234567890189
        currency:
          type: string
          description: 'The account holder''s account currency.'
          example: EUR
        mandate_id:
          type: string
          description: 'The ID of the mandate.'
          example: '123456'
        mandate_type:
          type: string
          enum:
          - Core
          - B2B
          description: 'The type of mandate.'
        date_of_signature:
          type: string
          description: 'The date the mandate was signed, in the format yyyy-MM-dd'
          example: 2022-08-02
        account_holder:
          type: object
          description: 'The account holder''s personal information.'
          required:
          - billing_address
          properties:
            first_name:
              type: string
              description: 'The account holder''s first name.'
              example: John
              maxLength: 50
            last_name:
              type: string
              description: 'The account holder''s last name.'
              example: Wick
              maxLength: 50
            company_name:
              type: string
              description: 'The account holder''s company name.'
              example: Checkout.com
              maxLength: 50
            type:
              type: string
              enum:
              - Individual
              - Corporate
              description: The type of account holder
            billing_address:
              type: object
              description: 'The account holder''s billing address.'
              required:
              - address_line1
              - address_line2
              - city
              - zip
              - country
              properties:
                address_line1:
                  type: string
                  description: 'The account holder''s street name.'
                  example: Evergreen Terrace
                address_line2:
                  type: string
                  description: 'The account holder''s street number.'
                  example: '742'
                  maxLength: 10
                city:
                  type: string
                  description: 'The account holder''s city.'
                  example: Paris
                  maxLength: 35
                zip:
                  type: string
                  description: 'The account holder''s zip code.'
                  example: '75000'
                  maxLength: 16
                country:
                  type: string
                  description: 'The account holder''s country, as an ISO 3166-1 alpha-2
                    code.'
                  example: FR
                  maxLength: 2
        type:
          type: string
          description: The payment source type.
          example: sepa
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - sepa
    PaymentRequestSequraSource:
      type: object
      description: A seQura payment source
      required:
      - type
      - billing_address
      properties:
        type:
          type: string
          description: The payment source type.
          example: sequra
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - sequra
        billing_address:
          description: The billing address of the cardholder
          required:
          - address_line1
          - city
          - state
          - country
          - zip
          allOf:
          - $ref: '#/components/schemas/Address'
    PaymentRequestSourceType:
      type: string
      description: Ordered list of payment request source types used for discriminators
      enum:
        - card
        - customer
        - id
        - network_token
        - token
        - ach
        - alipay_cn
        - alipay_hk
        - alipay_plus
        - alma
        - bancontact
        - bizum
        - blik
        - dana
        - eps
        - fawry
        - gcash
        - ideal
        - kakaopay
        - knet
        - mbway
        - mobilepay
        - multibanco
        - octopus
        - paynow
        - plaid
        - p24
        - qpay
        - sequra
        - sepa
        - stcpay
        - swish
        - tamara
        - tng
        - truemoney
        - twint
        - vipps
        - wechatpay
    PaymentRequestStcPaySource:
      type: object
      description: 'STC Pay request source'
      required:
      - type
      properties:
        type:
          type: string
          description: The payment source type.
      
          example: stcpay
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - stcpay
    PaymentRequestSwishSource:
      type: object
      description: 'Swish source'
      required:
      - type
      - payment_country
      - account_holder
      properties:
        payment_country:
          maxLength: 2
          minLength: 2
          enum:
          - SE
          type: string
          description: 'The 2-letter ISO country code of the country in which the payment
            instrument is issued or operated.'
        account_holder:
          type: object
          description: 'Information about the account holder''s details'
          required:
          - first_name
          - last_name
          properties:
            first_name:
              type: string
              description: 'The account holder''s first name'
              maxLength: 50
            last_name:
              type: string
              description: 'The account holder''s last name'
              maxLength: 50
        billing_descriptor:
          type: object
          description: 'Payment billing descriptor'
          required:
          - name
          properties:
            name:
              type: string
              description: 'A description for the payment, which displays on the customer''s
                statement'
              maxLength: 120
        type:
          type: string
          description: The payment source type.
          example: swish
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - swish
    PaymentRequestTamaraSource:
      type: object
      description: A Tamara payment source
      required:
      - type
      - billing_address
      properties:
        billing_address:
          description: The billing address of the cardholder
          required:
          - address_line1
          - city
          - country
          allOf:
          - $ref: '#/components/schemas/Address'
        type:
          type: string
          description: The payment source type.
          example: tamara
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - tamara
    PaymentRequestTngSource:
      type: object
      description: 'TNG Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: tng
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - tng
      required:
      - type
    PaymentRequestTokenSource:
      type: object
      description: A token payment source
      required:
      - type
      properties:
        type:
          type: string
          description: The payment source type.
          example: token
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - token
        token:
          type: string
          pattern: "^(tok)_(\\w{26})$"
          description: The Checkout.com token (e.g., a card token)
          example: tok_ubfj2q76miwundwlk72vxt2i7q
        billing_address:
          description: The customer's billing address. This will override the billing 
            address specified during tokenization
          allOf:
          - $ref: '#/components/schemas/Address'
        phone:
          description: The customer's phone number. This will override the phone 
            number specified during tokenization
          allOf:
          - $ref: '#/components/schemas/PhoneNumber'
        store_for_future_use:
          type: boolean
          description: This must be set to true if you intend to reuse the payment 
            credentials in subsequent payments. Setting the field as false will mean 
            that a <a 
            href="https://www.checkout.com/docs/payments/store-payment-details/payment-instruments"
            target="blank">payment instrument</a> will not be included in the payment 
            response.
          default: true
          example: false
        account_holder:
          type: object
          description: Information about the account holder of the card
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_RequestSources_AccountHolderIndividual'
              corporate: '#/components/schemas/02_RequestSources_AccountHolderCorporate'
              government: '#/components/schemas/03_RequestSources_AccountHolderGovernment'
          required:
          - type
          properties:
            type:
              type: string
              example: 'individual'
    PaymentRequestTruemoneySource:
      type: object
      description: 'TrueMoney Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: truemoney
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - truemoney
      required:
      - type
    PaymentRequestTwintSource:
      type: object
      description: 'Twint Request Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: twint
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - twint
      required:
      - type
    PaymentRequestVippsSource:
      type: object
      description: 'Vipps Request Source'
      properties:
        type:
          type: string
          description: The payment source type.
          example: vipps
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - vipps
      required:
      - type
    PaymentRequestWeChatPaySource:
      type: object
      required:
      - type
      properties:
        billing_address:
          type: object
          properties:
            address_line1:
              type: string
              description: The first line of the address
              example: 150 Kennedy Road
            address_line2:
              type: string
              description: The second line of the address
              example: Acacia Building
            city:
              type: string
              description: The address city
              example: Wan Chai
            state:
              type: string
              description: The address state
              example: Hong Kong
            zip:
              type: number
              description: The address zip/postal code
              example: 42345
            country:
              type: string
              description: The two-letter ISO country code of the address
              example: HK
        type:
          type: string
          description: The payment source type.
          example: wechatpay
          allOf:
          - $ref: '#/components/schemas/PaymentRequestSourceType'
          - type: string
            enum:
            - wechatpay
    BankPayoutRequestCurrencyAccountSource:
      type: object
      description: A currency account source.
      required:
      - type
      - id
      properties:
        type:
          type: string
          description: The payout source type.
          example: 'entity'
        id:
          type: string
          pattern: '^(ca)_(\w{26})$'
          maxLength: 29
          minLength: 29
          description: The currency account's identifier. <br><i>Its holding currency 
            must match the payout's `currency`</i>.
          example: ca_y3oqhf46pyzuxjbcn2giaqnb44
    BankPayoutRequestEntitySource:
      type: object
      description: A currency account source.
      required:
      - type
      - id
      properties:
        type:
          type: string
          description: The payout source type.
          example: 'entity'
        id:
          type: string
          pattern: "^(ent)_(\\w{26})$"
          description: The entity or sub-entity's identifier, only applies to Platform
            Clients.
          example: ent_w4jelhppmfiufdnatam37wrfc4
    01_RequestSources_AccountHolderIndividual:
      type: object
      description: Information about the individual account holder of the card
      required:
        - type
        - first_name
        - last_name
      properties:
        type:
          type: string
          description: |
            The card account holder type
          example: 'individual'
        first_name:
          type: string
          description: |
            The card account holder's first name
      
            *A valid and legal name must be populated in this field. The populated value cannot be only one character or all non-alphabet.*
          maxLength: 35
        middle_name:
          type: string
          description: |
            The card account holder's middle name
      
            ***Conditional*** - required when the [card metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response) `issuer_country` = `ZA` (South Africa)
          maxLength: 35
        last_name:
          type: string
          description: |
            The card account holder's last name
      
            *A valid and legal name must be populated in this field. The populated value cannot be only one character or all non-alphabet.*
          maxLength: 35
        account_name_inquiry:
          type: boolean
          description: |
            Whether the ANI (account name inquiry) check should be performed with the scheme (Visa or MasterCard)
    02_RequestSources_AccountHolderCorporate:
      type: object
      description: Information about the corporate account holder of the card
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The card account holder type
          example: 'corporate'
        company_name:
          type: string
          description: |
            The card account holder's company name
      
            *A valid and legal name must be populated in this field. The populated value cannot be only one character or all non-alphabet.*
          maxLength: 35
        account_name_inquiry:
          type: boolean
          description: |
            Whether the ANI (account name inquiry) check should be performed with the scheme (Visa or MasterCard)
    03_RequestSources_AccountHolderGovernment:
      type: object
      description: Information about the government account holder of the card
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The card account holder type
          example: 'government'
        company_name:
          type: string
          description: |
            The card account holder's company name
      
            *A valid and legal name must be populated in this field. The populated value cannot be only one character or all non-alphabet.*
          maxLength: 35
        account_name_inquiry:
          type: boolean
          description: |
            Whether the ANI (account name inquiry) check should be performed with the scheme (Visa or MasterCard)
    PaymentResponseBankAccountDestination:
      type: object
      description: A bank account payment destination
      required:
        - type
        - id
      properties:
        type:
          type: string
          description: |
            The payment destination type.
          enum:
            - bank_account
          example: bank_account
        id:
          type: string
          description: The payment instrument identifier
          pattern: ^(src)_(\w{26})$
    01_PaymentResponseIndividualSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PaymentDetailsResponseSender'
      required:
        - type
        - first_name
        - last_name
        - address
      properties:
        first_name:
          type: string
          description: The sender's first name
          example: 'John'
        last_name:
          type: string
          description: The sender's last name
          example: 'Jones'
        address:
          description: The sender's address
          allOf:
            - $ref: '#/components/schemas/Address'
    02_PaymentResponseCorporateSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PaymentDetailsResponseSender'
      required:
        - type
        - company_name
      properties:
        company_name:
          type: string
          description: The sender's company name
        address:
          description: The sender's address
          allOf:
            - $ref: '#/components/schemas/Address'
    03_PaymentResponseInstrumentSender:
      type: object
      description: Store a previously tokenized instrument
      allOf:
        - $ref: '#/components/schemas/PaymentDetailsResponseSender'
      required:
        - type
    PaymentDeclinedSourceResponse:
      type: object
      description: 'A source-based APM Declined payment source response'
      required:
          - id
          - type
      properties:
        id:
          type: string
          description: 'The payment instrument identifier'
          pattern: ^(src)_(\w{26})$
        type:
          type: string
          description: 'The type of payment source'
          enum:
            - card
            - ach
            - alipay_cn
            - bank_account
            - sepa
    PaymentResponseCardSource:
      type: object
      description: A card payment source
      required:
        - type
        - expiry_month
        - expiry_year
        - last4
        - fingerprint
        - bin
      properties:
        type:
          type: string
          description: The payment source type.
          enum:
            - card
          example: card
        id:
          type: string
          description: The payment source identifier that can be used for subsequent payments. For new sources, this will only be returned if the payment was approved
          example: 'src_nwd3m4in3hkuddfpjsaevunhdy'
        billing_address:
          description: The payment source owner's billing address
          allOf:
            - $ref: '#/components/schemas/Address'
        phone:
          description: The payment source owner's phone number
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        expiry_month:
          type: integer
          description: The expiry month
          minimum: 1
          minLength: 1
          maxLength: 2
          example: 6
        expiry_year:
          type: integer
          description: The expiry year
          minLength: 4
          maxLength: 4
          example: 2025
        name:
          type: string
          description: The cardholder's name
          example: 'Bruce Wayne'
        scheme:
          type: string
          description: The card scheme
          example: 'VISA'
        scheme_local:
          type: string
          deprecated: true
          description: |
            Replaced by `local_schemes`
            The local co-branded card scheme.
          example: 'Cartes_Bancaires'
        local_schemes:
          type: array
          items:
            type: string
          description: The local co-branded card schemes.
          example: ['cartes_bancaires', 'visa']
        last4:
          type: string
          description: The last four digits of the card number
          example: '9996'
        fingerprint:
          type: string
          description: Uniquely identifies this particular card number. You can use this to compare cards across customers.
          example: 'F639CAB2745BEE4140BF86DF6B6D6'
        bin:
          type: string
          description: The card issuer's Bank Identification Number (BIN)
          maxLength: 8
          example: '45434748'
        card_type:
          type: string
          description: The card type
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
            - DEFERRED DEBIT
          example: CREDIT
        card_category:
          type: string
          description: The card category
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        card_wallet_type:
          type: string
          description: The card wallet type
          enum:
            - applepay
            - googlepay
        issuer:
          type: string
          description: The name of the card issuer
          example: 'GOTHAM STATE BANK'
        issuer_country:
          type: string
          maxLength: 2
          minLength: 2
          description: The card issuer's country (<a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">two-letter ISO code</a>)
          example: 'US'
        product_id:
          type: string
          description: The issuer/card scheme product identifier
          example: 'F'
        product_type:
          type: string
          description: The issuer/card scheme product type
          example: CLASSIC
        avs_check:
          type: string
          description: The Address Verification System check result
          example: S
        cvv_check:
          type: string
          description: The card verification value (CVV) check result
          example: Y
        payment_account_reference:
          type: string
          description: A unique reference to the underlying card for network tokens (e.g., Apple Pay, Google Pay)
          example: 'EUNIX9AX7THOOJIEJ2AP6OOFAHGH4'
        encrypted_card_number:
          type: string
          description: The JWE encrypted full card number that has been updated by <a href="https://www.checkout.com/docs/payments/manage-payments/real-time-account-updater" target="_blank">real-time account updater</a>.
          example: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUz...'
        account_update_status:
          type: string
          description: Specifies what card information was updated by the <a href="https://www.checkout.com/docs/payments/manage-payments/real-time-account-updater#Retrieve_card_updates" target="_blank">Real-Time Account Updater</a>.
          enum:
            - card_updated
            - card_expiry_updated
            - card_closed
            - contact_cardholder
          example: card_updated
        account_update_failure_code:
          type: string
          description: Provides the <a href="https://www.checkout.com/docs/developer-resources/codes/real-time-account-updater-response-codes" target="_blank">failure code</a> if the <a href="https://checkout.com/docs/payments/store-and-manage-credentials/update-stored-credentials/real-time-account-updater" target="_blank">Real-Time Account Updater</a> fails to update the card information.
          example: VAU009
        account_holder:
          type: object
          description: Information about the account holder of the card
          discriminator:
            propertyName: type
            mapping:
              individual: '#/components/schemas/01_ResponseSources_AccountHolderIndividual'
              corporate: '#/components/schemas/02_ResponseSources_AccountHolderCorporate'
              government: '#/components/schemas/03_ResponseSources_AccountHolderGovernment'
          required:
            - type
          properties:
            type:
              type: string
              example: 'individual'
    01_ResponseSources_AccountHolderIndividual:
      type: object
      description: Information about the individual that owns the account.
      required:
        - type
        - first_name
        - last_name
        - account_name_inquiry
      properties:
        type:
          type: string
          description: The type of the card account holder
          example: 'individual'
        first_name:
          type: string
          description: |
            The card account holder's first name
      
            *A valid and legal name must be populated in this field. The populated value cannot be only one character or all non-alphabet.*
          maxLength: 35
        middle_name:
          type: string
          description: |
            The card account holder's middle name
            
            ***Conditional*** - required when the [card metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response) `issuer_country` = `ZA` (South Africa)
          maxLength: 35    
        last_name:
          type: string
          description: |
            The card account holder's last name
      
            *A valid and legal name must be populated in this field. The populated value cannot be only one character or all non-alphabet.*
          maxLength: 35
        account_name_inquiry:
          type: string
          enum: ["full_match", "partial_match", "no_match", "not_performed", "not_supported"]
          description: |
            The result of the Account Name Inquiry check.
        account_name_inquiry_details:
          type: object
          description: Details of the Account Name Inquiry check.
          allOf:
            - $ref: '#/components/schemas/ResponseSources_AccountHolderIndividual_Names_Enquiry'
    02_ResponseSources_AccountHolderCorporate:
      type: object
      description: Information about the corporate account holder of the card
      required:
        - type
        - company_name
        - account_name_inquiry
      properties:
        type:
          type: string
          description: The type of the card account holder
          example: 'corporate'  
        company_name:
          type: string
          description: |
            The card account holder's company name
      
            *A valid and legal name must be populated in this field. The populated value cannot be only one character or all non-alphabet.*
          maxLength: 35
        account_name_inquiry:
          type: string
          enum: ["full_match", "partial_match", "no_match", "not_performed", "not_supported"]
          description: |
            The Account Name Inquiry check result.
    03_ResponseSources_AccountHolderGovernment:
      type: object
      description: Information about the government account holder of the card
      required:
        - type
        - company_name
        - account_name_inquiry
      properties:
        type:
          type: string
          description: The type of the card account holder
          example: 'government'  
        company_name:
          type: string
          description: |
            The card account holder's company name
      
            *A valid and legal name must be populated in this field. The populated value cannot be only one character or all non-alphabet.*
          maxLength: 35
        account_name_inquiry:
          type: string
          enum: ["full_match", "partial_match", "no_match", "not_performed", "not_supported"]
          description: |
            The Account Name Inquiry check result.
    ResponseSources_AccountHolderIndividual_Names_Enquiry:
      type: object
      description: The granular results of the Account Name Inquiry check performed on the individual that owns the account.
      properties:
        first_name:
          type: string
          enum: [ "full_match", "partial_match", "no_match" ]
          description: |
            The result of the first name check.
        middle_name:
          type: string
          enum: [ "full_match", "partial_match", "no_match" ]
          description: |
            The result of the middle name check.
        last_name:
          type: string
          enum: [ "full_match", "partial_match", "no_match" ]
          description: |
            The result of the last name check.
    RetryGetResponse:
      type: object
      required:
        - enabled
      description: |
        Configuration relating to asynchronous retries
      properties:
        enabled:
          type: boolean
          description: Indicates whether asynchronous retries are enabled for the payment.
        attempts_made:
          type: integer
          description: The number of retries attempted so far.
          minimum: 0
        max_attempts:
          type: integer
          description: The maximum number of authorization retry attempts, excluding the initial authorization.
          default: 6
          minimum: 1
          maximum: 15
        ends_on:
          description: A timestamp that details the date on which the retry schedule expires, in ISO 8601 format.
          allOf:
            - $ref: '#/components/schemas/Timestamp'
        next_attempt_on:
          description: A timestamp that details the date on which the next authorization attempt will take place, in ISO 8601 format.
          allOf:
            - $ref: '#/components/schemas/Timestamp'
    RetryPostResponse:
      type: object
      required:
        - enabled
      description: |
        Configuration relating to asynchronous retries
      properties:
        enabled:
          type: boolean
          description: Indicates whether asynchronous retries are enabled for the payment.
        max_attempts:
          type: integer
          description: The maximum number of authorization retry attempts, excluding the initial authorization.
          default: 6
          minimum: 1
          maximum: 15
        ends_on:
          description: A timestamp that details the date on which the retry schedule expires, in ISO 8601 format.
          allOf:
            - $ref: '#/components/schemas/Timestamp'
        next_attempt_on:
          description: A timestamp of the date on which the next authorization attempt will take place, in ISO 8601 format.
          allOf:
            - $ref: '#/components/schemas/Timestamp'
    RetryRequest:
      type: object
      required:
        - enabled
      description: |
        Configuration of asynchronous retries.
        For more information about asynchronous retries and supported response codes, see [Configure scheduled retries](https://www.checkout.com/docs/payments/manage-payments/configure-scheduled-retries).
      properties:
        enabled:
          type: boolean
          description: Indicates whether asynchronous retries are enabled for the payment.
        dunning:
          description: Configuration of asynchronous Dunning retries.
          allOf:
            - $ref: '#/components/schemas/DunningRetryRequest'
        downtime:
          description: Configuration of asynchronous Downtime retries.
          allOf:
            - $ref: '#/components/schemas/DowntimeRetryRequest'
    RiskRequest:
      type: object
      description: Configures the risk assessment performed during the processing of the payment
      properties:
        enabled:
          type: boolean
          description: Whether a risk assessment should be performed
          default: true
          example: false
        device_session_id:
          type: string
          description: Device session ID collected from our standalone Risk.js package. If you integrate using our [Frames](https://www.checkout.com/docs/integrate/frames) solution, this ID is not required.
          example: "dsid_ipsmclhxwq72phhr32iwfvrflm"
          pattern: "^(dsid)_(\\w{26})$"
        device:
          $ref: '#/components/schemas/DeviceDetails'
    Ach:
      description: The ACH payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            account_type:
              type: string
              description: The type of Direct Debit account.
              enum:
                - savings
                - current
                - cash
            account_holder:
              type: object
              description: The account holder details.
              properties:
                type:
                  type: string
                  description: The type of account holder.
                  enum:
                    - individual
                    - corporate
                    - government
                first_name:
                  type: string
                  description: The first name of the account holder.
                last_name:
                  type: string
                  description: The last name of the account holder.
                company_name:
                  type: string
                  description: The legal name of a registered company that holds the account.
                date_of_birth:
                  type: string
                  description: The account holder's date of birth.
                identification:
                  writeOnly: true
                  type: object
                  description: The account holder's government document identification, for example a Social Security Number (SSN).
                  properties:
                    type:
                      type: string
                      description: The document type.
                    issuing_country:
                      type: string
                      description: The country where the document was issued.
                    number:
                      type: string
                      description: The document number.
            account_number:
              writeOnly: true
              type: string
              description: The account number of the Direct Debit account.
              minLength: 4
              maxLength: 17
            bank_code:
              writeOnly: true
              type: string
              description: The bank code of the Direct Debit account.
              minLength: 8
              maxLength: 9
            country:
              type: string
              description: The two-letter ISO country code of the bank account.
              minLength: 2
              maxLength: 2
    AlipayCn:
      description: The Alipay CN payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            terminal_type:
              allOf:
                - $ref: '#/components/schemas/TerminalType'
            os_type:
              allOf:
                - $ref: '#/components/schemas/OsType'
    AlipayHK:
      description: The Alipay HK payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            terminal_type:
              allOf:
                - $ref: '#/components/schemas/TerminalType'
            os_type:
              allOf:
                - $ref: '#/components/schemas/OsType'
    Alma:
      description: The Alma payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    ApplePay:
      description: The Apple Pay payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            token_data:
              type: object
              writeOnly: true
              properties:
                version:
                  type: string
                  description: The version of the payment token. The token uses `EC_v1` for ECC-encrypted data, and `RSA_v1` for RSA-encrypted data.
                  writeOnly: true
                data:
                  type: string
                  description: The encrypted payment data, Base64-encoded.
                  writeOnly: true
                signature:
                  type: string
                  description: The signature of the payment and header data. The signature includes the signing certificate, its intermediate CA certificate, and information about the signing algorithm.
                  writeOnly: true
                header:
                  type: object
                  description: Additional version-dependent information used to decrypt and verify the payment.
                  writeOnly: true
                  properties:
                    ephemeral_public_key:
                      type: string
                      writeOnly: true
                    public_key_hash:
                      type: string
                      writeOnly: true
                    transaction_id:
                      type: string
                      writeOnly: true
            token:
              type: object
              description: The Checkout.com Apple Pay token.
              required:
                - id
              properties:
                id:
                  type: string
                  description: The token identifier, prefixed by `tok_`.
                  pattern: ^(tok)_(\w{26})$
                expires_on:
                  type: string
                  format: date-time
                  description: The date and time the token expires, in ISO 8601 format.
            store_for_future_use:
              type: boolean
              description: Set to `true` if you intend to reuse the payment credentials in subsequent payments. If set to `false`, a payment instrument will not be included in the payment response.
              writeOnly: true
            phone:
              type: object
              description: The customer's phone number.
              allOf:
                - $ref: '#/components/schemas/PaymentSetupPhone'
            account_holder:
              allOf:
                - $ref: '#/components/schemas/PaymentSetupAccountHolder'
            schemes:
              type: array
              description: The list of supported card scheme names.
              readOnly: true
              items:
                type: string
                description: The supported card scheme name.
                enum:
                  - accel
                  - amex
                  - cartes_bancaires
                  - china_union_pay
                  - diners
                  - discover
                  - jcb
                  - mada
                  - maestro
                  - mastercard
                  - nyce
                  - omannet
                  - pulse
                  - shazam
                  - star
                  - upi
                  - visa
            preferred_scheme:
              type: string
              description: The preferred card scheme to process the payment.
              enum:
                - visa
                - mastercard
                - cartes_bancaires
    Bacs:
      description: The Bacs payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - $ref: '#/components/schemas/PaymentMethodInitialization'
        - type: object
          properties:
            instrument_id:
              type: string
              description: The ID of the Bacs instrument used for the payment.
              example: src_wkq7552u245upl5h75x24554xy
              readOnly: true
            account_holder:
              type: object
              description: The account holder details.
              properties:
                type:
                  type: string
                  description: The type of account holder.
                  enum:
                    - individual
                    - corporate
                first_name:
                  type: string
                  description: The first name of the account holder.
                last_name:
                  type: string
                  description: The last name of the account holder.
                company_name:
                  type: string
                  description: The legal name of a registered company that holds the account.
                email:
                  type: string
                  description: The email address of the account holder.
                  example: john.smith@example.com
            account_number:
              writeOnly: true
              type: string
              description: The account number of the Bacs Direct Debit account.
            bank_code:
              writeOnly: true
              type: string
              description: The sort code of the Bacs Direct Debit account.
            country:
              type: string
              description: The account's country, as an ISO 3166-1 alpha-2 code.
              minLength: 2
              maxLength: 2
            currency:
              type: string
              description: The account holder's account currency.
            allow_partial_match:
              type: boolean
              description: Whether vault may accept a partial match when looking up an existing Bacs instrument for the supplied account details.
              default: false
    Bancontact:
      description: The Bancontact payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            account_holder_name:
              type: string
              description: The account holder's name.
              minLength: 3
              maxLength: 100
    Benefit:
      description: The Benefit payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    Bizum:
      description: The Bizum payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    Blik:
      description: The Blik payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            partner_code:
              type: string
              writeOnly: true
              description: The 6-digit BLIK code generated by the customer's banking app.
              pattern: ^[0-9]{6}$
              example: '999111'
    Card:
      description: The Card payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            token:
              type: object
              properties:
                id:
                  type: string
                  description: The Checkout.com card token identifier.
            details:
              type: object
              properties:
                number:
                  type: string
                  description: The card number (without separators).
                  writeOnly: true
                last4:
                  type: string
                  description: The last four digits of the card number.
                  readOnly: true
                bin:
                  type: string
                  description: The card issuer's Bank Identification Number (BIN).
                  readOnly: true
                scheme:
                  type: string
                  description: The card scheme.
                  readOnly: true
                expiry_month:
                  type: integer
                  description: The expiry month of the card.
                expiry_year:
                  type: integer
                  description: The expiry year of the card.
                name:
                  type: string
                  description: The cardholder's name.
                  writeOnly: true
                cvv:
                  type: string
                  description: The card verification value/code. 3 digits, except for American Express (4 digits).
                  writeOnly: true
                stored:
                  type: boolean
                  description: Indicates whether this card is being submitted from your own stored card-on-file system, rather than being entered by the customer at the time of payment. Set to `true` when you provide card details that you already have on file for the customer.
                  writeOnly: true
                expires_on:
                  type: string
                  format: date-time
                  description: The time by which the card details must be confirmed.
                  readOnly: true
                allow_update:
                  type: boolean
                  description: Indicates whether to use the Real-Time Account Updater to update the card information.
            store_for_future_use:
              type: boolean
              description: Set to `true` if you intend to reuse the payment credentials in subsequent payments. If set to `false`, a payment instrument will not be included in the payment response.
              writeOnly: true
            phone:
              type: object
              description: The customer's phone number.
              allOf:
                - $ref: '#/components/schemas/PaymentSetupPhone'
            account_holder:
              allOf:
                - $ref: '#/components/schemas/PaymentSetupAccountHolder'
            schemes:
              type: array
              description: The list of supported card scheme names.
              readOnly: true
              items:
                type: string
                description: The supported card scheme name.
                enum:
                  - accel
                  - amex
                  - cartes_bancaires
                  - china_union_pay
                  - diners
                  - discover
                  - jcb
                  - mada
                  - maestro
                  - mastercard
                  - nyce
                  - omannet
                  - pulse
                  - shazam
                  - star
                  - upi
                  - visa
            preferred_scheme:
              type: string
              description: The preferred card scheme to process the payment.
              enum:
                - visa
                - mastercard
                - cartes_bancaires
    CardPresent:
      description: The Card Present payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            track2:
              type: string
              description: The Track 2 data read from card or device.
              writeOnly: true
            emv:
              type: string
              description: The EMV data read from the card or device.
              writeOnly: true
            entry_mode:
              type: string
              description: The mode used to capture the card details at the point of sale.
              writeOnly: true
            pin:
              type: object
              description: The encrypted PIN block details.
              writeOnly: true
              required:
                - key_set_id
                - block
                - block_format
              properties:
                key_serial_number:
                  type: string
                  description: The Key Serial Number (KSN) used by the HSM to decrypt the PIN block.
                  example: FFFF9876543210E00001
                  pattern: ^([0-9a-fA-F]{20}|[0-9a-fA-F]{24})$
                  writeOnly: true
                block:
                  type: string
                  description: The encrypted PIN block.
                  writeOnly: true
                block_format:
                  type: string
                  description: The format of the encrypted PIN block.
                  writeOnly: true
                key_set_id:
                  type: string
                  description: The identifier of the key set used to encrypt the PIN block.
                  writeOnly: true
            store_for_future_use:
              type: boolean
              description: Set to `true` if you intend to reuse the payment credentials in subsequent payments.
              writeOnly: true
            name:
              type: string
              description: The cardholder's name.
              writeOnly: true
    Dana:
      description: The Dana payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            terminal_type:
              allOf:
                - $ref: '#/components/schemas/TerminalType'
            os_type:
              allOf:
                - $ref: '#/components/schemas/OsType'
    Eps:
      description: The EPS payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    GCash:
      description: The GCash payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            terminal_type:
              allOf:
                - $ref: '#/components/schemas/TerminalType'
            os_type:
              allOf:
                - $ref: '#/components/schemas/OsType'
    GooglePay:
      description: The Google Pay payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            token_data:
              type: object
              writeOnly: true
              properties:
                protocol_version:
                  type: string
                  description: The encryption and signing scheme used to create this message. If not set, the default is `ECv0`.
                  writeOnly: true
                signature:
                  type: string
                  description: The signature that verifies the message came from Google, created using `ECDSA`.
                  writeOnly: true
                signed_message:
                  type: string
                  description: A serialized JSON string containing the `encryptedMessage`, `ephemeralPublicKey`, and `tag`. To simplify the signature verification process, this value is serialized.
                  writeOnly: true
                tokenization_key:
                  type: string
                  description: The public key provided to the Google API in the `tokenizationSpecification.parameters.gatewayMerchantId` field.
                  writeOnly: true
            token:
              type: object
              description: The Checkout.com Google Pay token.
              required:
                - id
              properties:
                id:
                  type: string
                  description: The token identifier, prefixed by `tok_`.
                  pattern: ^(tok)_(\w{26})$
                expires_on:
                  type: string
                  format: date-time
                  description: The date and time the token expires, in ISO 8601 format.
            store_for_future_use:
              type: boolean
              description: Set to `true` if you intend to reuse the payment credentials in subsequent payments. If set to `false`, a payment instrument will not be included in the payment response.
              writeOnly: true
            phone:
              type: object
              description: The customer's phone number.
              allOf:
                - $ref: '#/components/schemas/PaymentSetupPhone'
            account_holder:
              allOf:
                - $ref: '#/components/schemas/PaymentSetupAccountHolder'
            schemes:
              type: array
              description: The list of supported card scheme names.
              readOnly: true
              items:
                type: string
                description: The supported card scheme name.
                enum:
                  - accel
                  - amex
                  - china_union_pay
                  - diners
                  - discover
                  - jcb
                  - mada
                  - maestro
                  - mastercard
                  - nyce
                  - omannet
                  - pulse
                  - shazam
                  - star
                  - upi
                  - visa
            preferred_scheme:
              type: string
              description: The preferred card scheme to process the payment.
              enum:
                - visa
                - mastercard
    Ideal:
      description: The iDEAL payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            description:
              type: string
              description: A description of the products or services being paid for. Do not include HTML tags or special characters, as these are rejected by iDEAL.
              example: 2 t-shirts
              maxLength: 35
    KakaoPay:
      description: The KakaoPay payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            terminal_type:
              allOf:
                - $ref: '#/components/schemas/TerminalType'
            os_type:
              allOf:
                - $ref: '#/components/schemas/OsType'
    Klarna:
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - $ref: '#/components/schemas/PaymentMethodInitialization'
        - type: object
          description: The Klarna payment method's details and configuration.
          properties:
            action:
              type: object
              readOnly: true
              description: The next available action for the payment method.
              properties:
                type:
                  type: string
                  description: The type of action.
                  enum:
                    - sdk
                client_token:
                  type: string
                  description: The client token for the Klarna SDK.
                  example: >-
                    eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJzZXNzaW9uX2lkIiA6ICIw
                session_id:
                  type: string
                  description: The session ID.
                  example: 0b1d9815-165e-42e2-8867-35bc03789e00
            account_holder:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/KlarnaAccountHolder'
            iban:
              type: string
              readOnly: true
              description: The IBAN of the account used to complete Klarna verification.
              example: DE89370400440532013000
    KlarnaAccountHolder:
      type: object
      description: The account holder details returned by Klarna after the shopper completes verification.
      properties:
        name:
          type: string
          description: The full name of the account holder.
    Knet:
      description: The KNET payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            language:
              type: string
              description: |
                The customer's preferred language, as an ISO 639-1 code. For example, the language selected on your site, if the issuer's site supports it.
      
                - `ar` - Arabic
                - `en` - English
              enum:
                - en
                - ar
    MBWay:
      description: The MBWay payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    MobilePay:
      description: The MobilePay payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    Multibanco:
      description: The Multibanco payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            account_holder_name:
              type: string
              description: The account holder's name.
              minLength: 3
              maxLength: 100
    Octopus:
      description: The Octopus payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    OrderItem:
      type: object
      description: A line item from the customer's order.
      properties:
        name:
          type: string
          description: The descriptive name of the line item.
          example: Battery Power Pack
        quantity:
          type: integer
          description: The quantity of the line item.
          example: 1
        unit_price:
          type: number
          description: The unit price of the line item, in <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="_blank">minor currency units</a>.
          example: 1000
        total_amount:
          type: number
          description: |
            The total cost of the line item, in <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="_blank">minor currency units</a>.
      
            Include any tax and discounts applied, using the formula: `value = (quantity x unit_price) - discount_amount`.
          example: 1000
        reference:
          type: string
          description: The line item reference or product stock keeping unit (SKU).
          example: BA67A
        discount_amount:
          type: number
          description: The discount applied to each invoice line item.
          example: 150
        url:
          type: string
          description: Link to the line item's product page.
          maxLength: 1024
          example: https://example.com/products/my-item
        image_url:
          type: string
          description: Link to the item image to show in the order confirmation.
          maxLength: 1024
          example: https://example.com/products/my-item/image
        type:
          type: string
          description: The item type. For example, physical or digital.
          example: digital
    OsType:
      type: string
      enum:
        - android
        - ios
      description: The customer's operating system type. Required when `terminal_type` is not `web`.
      example: android
    P24:
      description: The P24 (Przelewy24) payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            account_holder:
              type: object
              description: The account holder's details.
              properties:
                name:
                  type: string
                  description: The account holder's name.
                  minLength: 3
                  maxLength: 100
                email:
                  type: string
                  format: email
                  description: The account holder's email address.
                  maxLength: 254
    PayByBank:
      description: The Pay by Bank (Open Banking) payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            bank_id:
              type: string
              description: The identifier of the bank the customer has selected for the payment.
              example: ob-natwest
            action:
              type: object
              readOnly: true
              description: The next available action for the payment method.
              properties:
                type:
                  type: string
                  description: The type of action.
                  enum:
                    - select_bank
                banks:
                  type: array
                  description: The list of banks available for the customer to select.
                  items:
                    type: object
                    properties:
                      bank_id:
                        type: string
                        description: The unique identifier of the bank.
                        example: ob-natwest
                      display_name:
                        type: string
                        description: The display name of the bank.
                        example: NatWest
                      logo_url:
                        type: string
                        description: The URL of the bank's logo.
                        example: https://cdn.token.io/banks/natwest.png
                      available:
                        type: boolean
                        description: Whether the bank is currently available for selection.
                        example: true
    PaymentMethodFlags:
      type: array
      description: The list of error codes or indicators that highlight missing or invalid information.
      readOnly: true
      items:
        type: string
        description: Flags relating to the payment method option.
    PaymentMethodInitialization:
      type: object
      properties:
        initialization:
          enum:
            - disabled
            - enabled
          type: string
          description: |
            The initialization state of the payment method. 
      
            When you create a Payment Setup, this defaults to `disabled`.
          default: disabled
    PaymentMethodStatus:
      type: string
      description: The payment method status.
      enum:
        - unavailable
        - action_required
        - ready
        - initialization_required
        - invalid
      readOnly: true
      example: ready
    PaymentSetup:
      type: object
      required:
        - processing_channel_id
        - amount
        - currency
      properties:
        id:
          type: string
          readOnly: true
        processing_channel_id:
          pattern: ^(pc)_(\w{26})$
          type: string
          description: The processing channel to use for the payment.
          example: pc_q4dbxom5jbgudnjzjpz7j2z6uq
        amount:
          type: number
          description: The payment amount, in the <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="_blank">minor currency unit</a>.
          example: 10000
        currency:
          type: string
          description: The currency of the payment, as a three-letter <a href="https://www.checkout.com/docs/developer-resources/codes/currency-codes" target="_blank">ISO currency code</a>.
          example: GBP
        presentment_details:
          $ref: '#/components/schemas/PaymentSetupPresentmentDetails'
        payment_type:
          enum:
            - regular
            - recurring
            - moto
            - installment
            - pay_later
            - unscheduled
          type: string
          description: |
            The type of payment.
      
            You must provide this field for card payments in which the cardholder is not present. For example, if the transaction is a recurring payment, or a mail order/telephone order (MOTO) payment.
          default: regular
          example: regular
        reference:
          type: string
          description: A reference you can use to identify the payment. For example, an order number.
          maxLength: 80
          example: REF-0987-475
        description:
          type: string
          description: A description of the payment.
          maxLength: 100
          example: Set of 3 t-shirts
        payment_methods:
          type: object
          description: The payment methods that are enabled on your account and available for use.
          properties:
            auto_confirm:
              type: string
              description: The payment method that automatically confirms the payment when it is ready.
              example: card
            instrument:
              $ref: '#/components/schemas/PaymentSetupInstrument'
            klarna:
              $ref: '#/components/schemas/Klarna'
            stcpay:
              $ref: '#/components/schemas/StcPay'
            tabby:
              $ref: '#/components/schemas/Tabby'
            bizum:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/Bizum'
            paynow:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/PayNow'
            qpay:
              $ref: '#/components/schemas/Qpay'
            eps:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/Eps'
            ideal:
              $ref: '#/components/schemas/Ideal'
            knet:
              $ref: '#/components/schemas/Knet'
            bancontact:
              $ref: '#/components/schemas/Bancontact'
            benefit:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/Benefit'
            blik:
              $ref: '#/components/schemas/Blik'
            vipps:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/Vipps'
            twint:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/Twint'
            alipay_cn:
              $ref: '#/components/schemas/AlipayCn'
            alipay_hk:
              $ref: '#/components/schemas/AlipayHK'
            gcash:
              $ref: '#/components/schemas/GCash'
            tng:
              $ref: '#/components/schemas/Tng'
            dana:
              $ref: '#/components/schemas/Dana'
            mobilepay:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/MobilePay'
            tamara:
              $ref: '#/components/schemas/Tamara'
            mbway:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/MBWay'
            multibanco:
              $ref: '#/components/schemas/Multibanco'
            wechatpay:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/WeChatPay'
            kakaopay:
              $ref: '#/components/schemas/KakaoPay'
            truemoney:
              $ref: '#/components/schemas/TrueMoney'
            octopus:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/Octopus'
            p24:
              $ref: '#/components/schemas/P24'
            alma:
              $ref: '#/components/schemas/Alma'
            swish:
              $ref: '#/components/schemas/Swish'
            sequra:
              $ref: '#/components/schemas/Sequra'
            ach:
              $ref: '#/components/schemas/Ach'
            sepa:
              $ref: '#/components/schemas/Sepa'
            bacs:
              $ref: '#/components/schemas/Bacs'
            paybybank:
              $ref: '#/components/schemas/PayByBank'
            paypal:
              $ref: '#/components/schemas/PayPal'
            googlepay:
              $ref: '#/components/schemas/GooglePay'
            applepay:
              $ref: '#/components/schemas/ApplePay'
            card:
              $ref: '#/components/schemas/Card'
            card_present:
              $ref: '#/components/schemas/CardPresent'
            stablecoin:
              $ref: '#/components/schemas/Stablecoin'
        available_payment_methods:
          type: array
          readOnly: true
          description: |
            An ordered list of available payment method names. The order indicates
            the recommended presentation priority, with the first item being the
            highest priority.
          items:
            type: string
          example:
            - card
            - klarna
            - stcpay
            - stablecoin
        settings:
          type: object
          description: Settings for the Payment Setup.
          properties:
            success_url:
              maxLength: 255
              type: string
              description: |
                The URL to redirect the customer to, if the payment is successful.
      
                For payment methods with a redirect, this value overrides the default success redirect URL configured on your account.
              format: uri
              example: https://example.com/payments/success
            failure_url:
              maxLength: 255
              type: string
              description: |
                The URL to redirect the customer to, if the payment is unsuccessful.
      
                For payment methods with a redirect, this value overrides the default failure redirect URL configured on your account.
              format: uri
              example: https://example.com/payments/fail
            capture:
              type: boolean
              description: Indicates whether to capture the payment immediately.
              default: true
              example: true
            excluded_payment_methods:
              type: array
              description: The list of payment methods excluded from the Payment Setup.
              items:
                type: string
              example:
                - card
                - klarna
                - stcpay
        risk:
          type: object
          description: Risk assessment settings for the Payment Setup.
          properties:
            enabled:
              type: boolean
              description: Indicates whether a risk assessment should be performed.
              default: true
              example: true
        customer:
          type: object
          description: The customer's details.
          properties:
            country:
              type: string
              minLength: 2
              maxLength: 2
              description: The two-letter ISO country code of the customer for this payment.
              example: GB
            id:
              type: string
              description: The unique identifier of the customer.
              example: cus_123456789
            email:
              type: object
              description: Details of the customer's email.
              properties:
                address:
                  type: string
                  description: The customer's email address.
                  example: johnsmith@example.com
                verified:
                  type: boolean
                  description: Specifies whether the customer's email address is verified.
                  example: true
            name:
              type: string
              description: The customer's full name.
              maxLength: 100
              example: John Smith
            tax_number:
              type: string
              description: The customer's tax identification number.
              example: GB123456789
            phone:
              allOf:
                - $ref: '#/components/schemas/PaymentSetupPhone'
            device:
              type: object
              description: Details of the customer's device.
              properties:
                locale:
                  type: string
                  description: The locale of the device.
                  example: en_GB
            merchant_account:
              allOf:
                - $ref: '#/components/schemas/PaymentSetupMerchantAccount'
        order:
          type: object
          description: The customer's order details.
          properties:
            items:
              type: array
              description: A list of items in the order.
              items:
                allOf:
                  - $ref: '#/components/schemas/OrderItem'
            shipping:
              allOf:
                - $ref: '#/components/schemas/PaymentSetupShipping'
            sub_merchants:
              type: array
              description: The details of the sub-merchants.
              items:
                allOf:
                  - $ref: '#/components/schemas/PaymentSetupSubMerchant'
            invoice_id:
              type: string
              description: The unique identifier for the invoice.
              example: inv_123456789
            shipping_amount:
              type: integer
              description: The total shipping amount for the order.
              minimum: 0
              example: 5
            discount_amount:
              type: integer
              description: The discount amount the merchant applied to the transaction.
              minimum: 0
              example: 10
            tax_amount:
              type: integer
              description: The total tax amount for the order.
              minimum: 0
              example: 2
            tipping_amount:
              type: integer
              format: int64
              description: The total tipping amount for the order.
              minimum: 0
              example: 2
            surcharge_amount:
              type: integer
              format: int64
              description: The total surcharge amount for the order.
              minimum: 0
              example: 2
            amount_allocations:
              type: array
              description: The sub-entities that the payment is being processed on behalf of.
              minItems: 1
              maxItems: 50
              items:
                allOf:
                  - $ref: '#/components/schemas/PaymentSetupAmountAllocation'
        billing:
          $ref: '#/components/schemas/PaymentSetupBilling'
        industry:
          type: object
          description: Industry-specific information.
          properties:
            airline:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/PaymentSetupAirline'
            accommodation:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/PaymentSetupAccommodation'
        account_funding_transaction:
          allOf:
            - $ref: '#/components/schemas/PaymentSetupAccountFundingTransaction'
        terminal:
          allOf:
            - $ref: '#/components/schemas/PaymentSetupTerminal'
        billing_descriptor:
          $ref: '#/components/schemas/PaymentSetupBillingDescriptor'
        metadata:
          type: object
          description: A set of key/value pairs you can attach to a payment. It can be useful for storing additional information about the payment.
          maxProperties: 20
          additionalProperties:
            oneOf:
              - type: string
                maxLength: 255
              - type: number
              - type: boolean
        latest_payment:
          type: object
          readOnly: true
          description: The latest payment response from the gateway, populated when auto-confirm succeeds during setup creation. For the full response schema, see <a href="https://api-reference.checkout.com/tag/Payments#operation/requestAPaymentOrPayout" target="_blank">Request a Payment or Payout</a>.
    PaymentSetupAccommodation:
      type: object
      properties:
        name:
          type: string
          description: >-
            For lodging, contains the lodging name that appears on the
      
            storefront/customer receipts. For cruise, contains the ship name booked for the cruise.
          example: Checkout Lodge
        booking_reference:
          type: string
          description: A unique identifier for the booking.
          example: REF9083748
        check_in_date:
          type: string
          description: >-
            For lodging bookings, the customer's check-in date.
      
            For cruise bookings, the cruise departure date. Also referred to as the sail date.
          format: date
          example: '2025-04-11'
        check_out_date:
          type: string
          description: >-
            For lodging bookings, the customer's check-out date.
      
            For cruise bookings, the cruise return date.
          format: date
          example: '2025-04-18'
        address:
          type: object
          description: The accommodation's address.
          properties:
            address_line1:
              type: string
              description: The first line of the address.
              example: 123 High Street
            city:
              type: string
              description: The address city.
              example: London
            state:
              type: string
              description: The address state or county.
              example: Greater London
            country:
              type: string
              description: The address country, in ISO 3166-1 alpha-2 format.
              example: GB
            zip:
              type: string
              description: The zip code or postal code.
              example: NE1 1CK
        number_of_rooms:
          type: integer
          description: The total number of rooms booked for the accommodation.
          example: 2
        guests:
          type: array
          description: The list of guests staying at the accommodation.
          items:
            type: object
            properties:
              first_name:
                type: string
                description: The guest's first name.
                example: John
              last_name:
                type: string
                description: The guest's last name.
                example: Smith
              date_of_birth:
                type: string
                description: The guest's date of birth.
                format: date
                example: '1970-03-19'
        room:
          type: array
          description: The list of rooms booked by the customer.
          items:
            type: object
            properties:
              rate:
                type: number
                description: The rate or cost of the room per day.
                example: 42.3
              number_of_nights:
                type: integer
                description: The number of nights the room is booked for.
                example: 5
    PaymentSetupAccountFundingTransaction:
      type: object
      description: Account funding transaction details for the payment.
      properties:
        enabled:
          type: boolean
          description: Whether to process this payment as an account funding transaction.
          example: true
        purpose:
          type: string
          description: Specifies the purpose of the account funding transaction.
          enum:
            - donations
            - education
            - emergency_need
            - expatriation
            - family_support
            - financial_services
            - gifts
            - income
            - insurance
            - investment
            - it_services
            - leisure
            - loan_payment
            - medical_treatment
            - other
            - pension
            - royalties
            - savings
            - travel_and_tourism
          example: financial_services
        sender:
          type: object
          description: Account funding transaction sender details.
          properties:
            date_of_birth:
              type: string
              format: date
              description: Date of birth of the sender (yyyy-mm-dd).
              example: '2000-01-01'
            reference:
              type: string
              description: The unique reference for the sender of the payment.
              example: 0fc88634-78c1-4286-9cb6-6ca358730c8c
            identification:
              type: object
              description: Sender identification details.
              properties:
                type:
                  type: string
                  description: The type of identification used to identify the sender.
                  enum:
                    - passport
                    - driving_license
                    - national_id
                number:
                  type: string
                  description: The identification number.
                  example: '1234567890'
                issuing_country:
                  type: string
                  description: The two-letter ISO country code of the country that issued the identification
                  example: US
        recipient:
          type: object
          description: Account funding transaction recipient details.
          properties:
            date_of_birth:
              type: string
              format: date
              description: Date of birth of the recipient (yyyy-mm-dd).
              example: '2000-01-01'
            account_number:
              type: string
              maxLength: 34
              description: Any identifier like part of the PAN (first six digits and last four digits), an IBAN, an internal account number, or a phone number related to the primary recipient's account
            first_name:
              type: string
              maxLength: 50
              description: The recipient's first name.
            last_name:
              type: string
              maxLength: 50
              description: The recipient's last name.
            address:
              allOf:
                - $ref: '#/components/schemas/PaymentSetupAddress'
    PaymentSetupAccountHolder:
      type: object
      description: Account holder details for the payment.
      properties:
        type:
          type: string
          description: The card account holder type.
          enum:
            - individual
            - government
            - corporate
        first_name:
          type: string
          description: The card account holder's first name.
        last_name:
          type: string
          description: The card account holder's last name.
        middle_name:
          type: string
          description: The card account holder's middle name.
        company_name:
          type: string
          description: The card account holder's company name.
        account_name_inquiry:
          type: boolean
          description: Indicates whether the ANI (account name inquiry) check is performed with the card scheme (Visa or Mastercard).
    PaymentSetupAddress:
      type: object
      description: A physical address.
      properties:
        address_line1:
          type: string
          description: The first line of the address.
          maxLength: 200
          example: 10 Canterbury Road
        address_line2:
          type: string
          description: The second line of the address.
          maxLength: 200
          example: Flat 2
        city:
          type: string
          description: The address city.
          maxLength: 50
          example: London
        state:
          type: string
          description: The address state or county.
          maxLength: 50
          example: Greater London
        zip:
          type: string
          description: The postal or zip code.
          maxLength: 50
          example: NE1 1KO
        country:
          type: string
          description: The address country, in ISO 3166-1 alpha-2 format.
          maxLength: 2
          example: GB
    PaymentSetupAirline:
      type: object
      description: Details about the airline ticket and flights the customer booked.
      properties:
        ticket:
          type: object
          description: Details about the airline ticket.
          properties:
            number:
              type: string
              description: The ticket's unique identifier.
              example: '0742464639523'
            issue_date:
              type: string
              description: The date the airline ticket was issued.
              format: date
              example: '2025-05-01'
            issuing_carrier_code:
              type: string
              description: The carrier code of the ticket issuer.
              example: '042'
            travel_package_indicator:
              type: string
              description: |
                The travel package indicator, as one of the following codes:
      
                  - `A` - Airline flight reservation
                  - `B` - Car rental and airline reservation
                  - `C` - Car rental reservation
                  - `N` - Unknown
              example: A
            travel_agency_name:
              type: string
              description: The name of the travel agency.
              example: Checkout Travel Agents
            travel_agency_code:
              type: string
              description: The IATA or ARC unique identifier for the travel agency that issues the ticket.
              example: '91114362'
        passengers:
          type: array
          description: The list of passengers on the flight.
          items:
            type: object
            properties:
              first_name:
                type: string
                description: The passenger's first name.
                example: John
              last_name:
                type: string
                description: The passenger's last name.
                example: Smith
              date_of_birth:
                type: string
                description: The passenger's date of birth.
                format: date
                example: '1990-10-31'
              address:
                type: object
                description: Details about the passenger's address.
                properties:
                  country:
                    type: string
                    description: The two-letter ISO country code of the passenger's country of residence.
                    example: GB
        flight_leg_details:
          type: array
          description: The list of flight legs booked by the customer.
          items:
            allOf:
              - $ref: '#/components/schemas/PaymentSetupFlightLegDetails'
    PaymentSetupAmountAllocation:
      type: object
      required:
        - id
        - amount
      title: Amount Allocations
      description: An amount allocation representing a sub-entity on whose behalf the payment is being processed.
      properties:
        id:
          type: string
          description: The id of the sub-entity.
          example: ent_w4jelhppmfiufdnatam37wrfc4
        amount:
          type: integer
          description: |
            The split amount - this will be credited to your sub-entity's currency account. The sum of all split amounts must be equal to the payment amount.
      
            The amount must be provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
          minimum: 0
          format: int64
          maximum: 9999999999
          example: 1000
        reference:
          type: string
          description: A reference you can later use to identify this split, such as an order number.
          maxLength: 50
          example: ORD-5023-4E89
        commission:
          type: object
          title: Commission
          description: |
            Commission you'd like to collect from this split - this will be credited to your currency account. The commission cannot exceed the split amount.
      
            Commission = (`amount` * `commission.percentage`) + `commission.amount`
          properties:
            amount:
              type: integer
              format: int64
              description: |
                Optional fixed amount of commission to collect.
      
                The amount must be provided in the <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency unit</a>.
              minimum: 0
              example: 1000
            percentage:
              type: number
              description: |
                Optional percentage of commission to collect.
      
                Supports up to 8 decimal places.
              minimum: 0
              maximum: 100
              example: 1.125
    PaymentSetupBilling:
      type: object
      description: The billing details for the payment.
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/PaymentSetupAddress'
    PaymentSetupBillingDescriptor:
      type: object
      description: The billing descriptor for payment.
      properties:
        name:
          type: string
          description: A dynamic description of the payment.
          maxLength: 25
          example: Checkout.com
        city:
          type: string
          description: The city from which the payment was made.
          maxLength: 13
          example: London
        reference:
          type: string
          description: The reference shown on the statement.
          maxLength: 50
          example: Payment for order 123456
    PaymentSetupFlightLegDetails:
      type: object
      properties:
        flight_number:
          type: string
          description: The flight identifier.
          example: BA1483
        carrier_code:
          type: string
          description: The IATA 2-letter accounting code (PAX) that identifies the carrier. Required if the airline data includes leg details.
          example: BA
        class_of_travelling:
          type: string
          description: |
            A one-letter identifier for the travel class. For example:
      
            - `F` - First class
            - `J` - Business class
            - `W` - Premium economy class
            - `Y` - Economy class
          example: W
        departure_airport:
          type: string
          description: The IATA three-letter airport code for the departure airport. Required if the airline data includes leg details.
          example: LHR
        departure_date:
          type: string
          format: date
          description: The date of the scheduled take-off.
          example: '2025-10-13'
        departure_time:
          type: string
          description: The time of the scheduled take-off.
          example: '18:30'
        arrival_airport:
          type: string
          description: The IATA three-letter airport code for the destination airport. Required if the airline data includes leg details.
          example: JFK
        stop_over_code:
          type: string
          description: |
            A one-letter code that indicates whether the passenger is entitled to make a stopover. Specify `O` or a blank space if the passenger is entitled. Specify `X` if the passenger is not entitled.
          example: X
        fare_basis_code:
          type: string
          description: The alphanumeric fare basis code.
          example: WUP14B
    PaymentSetupInstrument:
      description: The instrument payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            id:
              type: string
              description: The unique identifier of the selected instrument.
              example: src_wmlfc3zttb4uzmk6snpwb43jbi
            type:
              type: string
              readOnly: true
              description: The type of the instrument.
              example: bacs
            action:
              type: object
              readOnly: true
              description: The next available action for the payment method.
              properties:
                type:
                  enum:
                    - set_instrument
                  type: string
                  description: The type of action.
    PaymentSetupMerchantAccount:
      type: object
      description: Details of the account the customer holds with the merchant.
      properties:
        id:
          type: string
          description: The merchant's unique identifier for the customer's account.
          example: '1234'
        registration_date:
          type: string
          description: The date the customer registered their account with the merchant.
          format: date
          example: '2023-05-01'
        last_modified:
          type: string
          description: The date the customer's account with the merchant was last modified.
          format: date
          example: '2023-05-01'
        returning_customer:
          type: boolean
          description: Specifies if the customer is a returning customer.
        first_transaction_date:
          type: string
          description: The date of the customer's first transaction.
          format: date
          example: '2023-09-15'
        last_transaction_date:
          type: string
          description: The date of the customer's most recent transaction.
          format: date
          example: '2025-03-28'
        total_order_count:
          type: integer
          description: The total number of orders made by the customer.
          example: 6
        last_payment_amount:
          type: number
          description: The payment amount of the customer's most recent transaction.
          example: 55.99
    PaymentSetupPaymentMethod:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodStatus'
        flags:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodFlags'
    PaymentSetupPhone:
      type: object
      description: The customer's phone number.
      properties:
        country_code:
          maxLength: 7
          minLength: 1
          type: string
          description: |
            The phone number's <a
            href="https://www.checkout.com/docs/resources/codes/country-codes"
            target="_blank">international country calling code</a>.
          example: '+44'
        number:
          maxLength: 25
          minLength: 6
          type: string
          description: The phone number.
          example: 207 946 0000
    PaymentSetupPresentmentDetails:
      type: object
      description: |
        The amount and currency to present to the customer, when the settlement
        currency differs from the customer-facing currency.
      properties:
        amount:
          type: integer
          format: int64
          description: The presentment amount, in the minor currency unit.
          example: 110
        currency:
          type: string
          description: The presentment currency, as a three-letter ISO currency code.
          example: EUR
    PaymentSetupResponse:
      allOf:
        - required:
            - id
          type: object
        - $ref: '#/components/schemas/PaymentSetup'
    PaymentSetupShipping:
      type: object
      description: The customer's shipping details.
      properties:
        first_name:
          type: string
          description: The customer's first name.
          maxLength: 50
          example: Jane
        last_name:
          type: string
          description: The customer's last name.
          maxLength: 50
          example: Doe
        email:
          type: string
          description: The customer's email address.
          maxLength: 100
          example: jane.doe@example.com
        phone:
          allOf:
            - $ref: '#/components/schemas/PaymentSetupPhone'
        address:
          allOf:
            - $ref: '#/components/schemas/PaymentSetupAddress'
        method:
          type: string
          description: |
            The shipping method the customer selected. 
      
            For more information on which values you can specify, refer to the payment method's external API reference.
        delay:
          type: integer
          description: The number of days between the order date and the expected delivery date.
          example: 3
          minimum: 0
          maximum: 365
    PaymentSetupSubMerchant:
      type: object
      description: Details about a sub-merchant in the order.
      properties:
        id:
          type: string
          description: The unique identifier for the sub-merchant.
          example: SUB12345
        product_category:
          type: string
          description: The product category for the sub-merchant.
          example: Electronics
        number_of_sales:
          type: integer
          description: The number of orders the sub-merchant has processed.
          example: 500
        registration_date:
          type: string
          description: The date the sub-merchant was registered.
          format: date
          example: '2023-01-15'
    PaymentSetupTerminal:
      type: object
      description: Terminal details.
      properties:
        id:
          type: string
          description: Terminal identifier.
          maxLength: 8
          minLength: 8
          example: '12345678'
        local_date_time:
          type: string
          format: date-time
          description: The local date and time on the terminal, in ISO 8601 format.
          example: '2026-05-26T13:05:14+01:00'
    PaymentSetupValidationError:
      type: object
      description: The validation errors flagged with the request.
      properties:
        request_id:
          type: string
          description: The unique identifier of the flagged request.
          example: 0HL80RJLS76I7
        error_type:
          type: string
          description: The type of error flagged.
          example: request_invalid
        error_codes:
          type: array
          description: The error codes returned by the failed request.
          items:
            type: string
            example: amount_required
    PayNow:
      description: The PayNow payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    PayPal:
      description: The PayPal payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - $ref: '#/components/schemas/PaymentMethodInitialization'
        - type: object
          properties:
            user_action:
              type: string
              description: |
                The user action for the PayPal widget.
      
                - `pay_now` - After the customer clicks the PayPal button, the customer is redirected to a page to enter payment details and immediately directed to finalize the payment.
                - `continue` - After the customer clicks the PayPal button, the customer is redirected to a page to enter payment details and then redirected back to the merchant's site to review and finalize the payment.
              enum:
                - pay_now
                - continue
              example: pay_now
            brand_name:
              type: string
              description: The brand name to display in the PayPal checkout experience.
              maxLength: 127
              example: Acme Corporation
            shipping_preference:
              type: string
              description: |
                Where to obtain the shipping information.
      
                - `no_shipping` - Redacts the shipping address from the PayPal pages.
                - `get_from_file` - Obtains the shipping address from the customer's PayPal account.
                - `set_provided_address` - Uses the shipping address provided by the merchant.
              enum:
                - no_shipping
                - get_from_file
                - set_provided_address
              example: no_shipping
            action:
              type: object
              readOnly: true
              description: The next available action for the payment method.
              properties:
                type:
                  type: string
                  description: The type of action.
                  example: sdk
                  enum:
                    - sdk
                order_id:
                  type: string
                  description: The PayPal order ID to use with the PayPal SDK.
                  example: dd4b1a85-31de-404b-99f4-f143f8ba35ba
    Qpay:
      description: The QPay payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            national_id:
              type: string
              writeOnly: true
              description: The Qatari national ID. Must start with 2 or 3, followed by 10 digits.
              example: '21234567890'
            description:
              type: string
              description: A description of the payment order. Alphanumeric characters only.
              maxLength: 255
    Sepa:
      description: The SEPA payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            account_holder:
              type: object
              description: The account holder details.
              properties:
                type:
                  type: string
                  description: The type of account holder.
                  enum:
                    - individual
                    - corporate
                first_name:
                  type: string
                  description: The first name of the account holder.
                last_name:
                  type: string
                  description: The last name of the account holder.
                company_name:
                  type: string
                  description: The legal name of a registered company that holds the account.
            account_number:
              writeOnly: true
              type: string
              description: The account holder's IBAN.
            country:
              type: string
              description: The account's country, as an ISO 3166-1 alpha-2 code.
              minLength: 2
              maxLength: 2
            currency:
              type: string
              description: The account holder's account currency.
            mandate:
              type: object
              description: The mandate details.
              properties:
                id:
                  type: string
                  description: The ID of the mandate.
                type:
                  type: string
                  description: The type of mandate.
                  enum:
                    - core
                    - b2b
                date_of_signature:
                  type: string
                  format: date
                  description: The date the mandate was signed.
    Sequra:
      description: The Sequra payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    Stablecoin:
      description: The Stablecoin payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    StcPay:
      description: The stc pay payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - $ref: '#/components/schemas/PaymentMethodInitialization'
        - type: object
          properties:
            otp:
              type: string
              writeOnly: true
              description: The one-time password (OTP) for stc pay.
              example: '123456'
            action:
              type: object
              readOnly: true
              description: The next available action for the payment method.
              properties:
                type:
                  type: string
                  enum:
                    - otp
                  description: The type of action.
    Swish:
      description: The Swish payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            billing_descriptor:
              type: string
              description: A description that appears on the customer's billing statement.
            account_holder:
              type: object
              description: The account holder's details.
              properties:
                first_name:
                  type: string
                  description: The account holder's first name.
                  minLength: 1
                  example: John
                last_name:
                  type: string
                  description: The account holder's last name.
                  minLength: 1
                  example: Smith
    Tabby:
      description: The Tabby payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - $ref: '#/components/schemas/PaymentMethodInitialization'
        - type: object
          properties:
            payment_types:
              type: array
              description: The available payment types for Tabby (For example, `installments`).
              items:
                type: string
              example:
                - pay_later
    Tamara:
      description: The Tamara payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    TerminalType:
      type: string
      enum:
        - web
        - wap
        - app
      description: The client-side terminal type. Indicates whether the customer is using a PC browser, mobile browser, or mobile application.
      example: web
    Tng:
      description: The TNG payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            terminal_type:
              allOf:
                - $ref: '#/components/schemas/TerminalType'
            os_type:
              allOf:
                - $ref: '#/components/schemas/OsType'
    TrueMoney:
      description: The TrueMoney payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
          properties:
            terminal_type:
              allOf:
                - $ref: '#/components/schemas/TerminalType'
            os_type:
              allOf:
                - $ref: '#/components/schemas/OsType'
    Twint:
      description: The Twint payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    Vipps:
      description: The Vipps payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    WeChatPay:
      description: The WeChatPay payment method's details and configuration.
      allOf:
        - $ref: '#/components/schemas/PaymentSetupPaymentMethod'
        - type: object
    Shipping:
      type: object
      description: The shipping details.
      properties:
        first_name:
          type: string
          description: The first name of the person receiving the goods or the service.
          example: 'John'
          maxLength: 300
        last_name:
          type: string
          description: The last name of the person receiving the goods or the service.
          example: 'Smith'
          maxLength: 300
        email:
          type: string
          description: The email address associated with the shipping order.
          example: 'john.smith@example.com'
          maxLength: 255
        address:
          description: The shipping address.
          allOf:
            - $ref: '#/components/schemas/Address'
        phone:
          description: The phone number associated with the shipping address.
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        from_address_zip:
          type: string
          description: The postal code or zip code of the location being shipped from.
          example: '123456'
          maxLength: 10
        timeframe:
          type: string
          description: Indicates the merchandise delivery timeframe. The following values will be supported by Checkout.com, otherwise your specific value will be passed through to the provider.
          enum:
            - ElectronicDelivery
            - SameDay
            - Overnight
            - TwoDayOrMore
          example: 'SameDay'
        method:
          type: string
          description: Indicates the shipping method chosen for the transaction. The following values will be supported by Checkout.com, otherwise your specific value will be passed through to the provider.
          enum:
            - Digital
            - PickUp
            - BillingAddress
            - OtherAddress
          example: 'BillingAddress'
        delay:
          type: integer
          description: The number of days by which the shipping is delayed.
          example: 5
          minimum: 0
    Subscription:
      type: object
      title: Subscription
      description: The details of the subscription.
      properties:
        id:
          type: string
          description: The ID or reference linking a series of recurring payments together.
          maxLength: 50
    TrackingInfo:
      type: object
      properties:
        return_shipping_company:
          description: Name of the shipping company for the return shipment (as specific as possible).
          maxLength: 100
          type: string
          example: DHL US
        return_tracking_number:
          description: Tracking number for the return shipment. 
          maxLength: 100
          type: string
          example: GM275322484009027685
        return_tracking_uri:
          description: URL where the customer can track the return shipment.
          maxLength: 1024
          type: string
          example: https://example.com/tracking/GM275322484009027685
        shipping_company:
          description: Name of the shipping company (as specific as possible)
          maxLength: 100
          type: string
          example: DHL US
        tracking_number:
          description: Tracking number for the shipment. 
          maxLength: 100
          type: string
          example: GM275322484009027685
        tracking_uri:
          description: URI where the customer can track their shipment. 
          maxLength: 1024
          type: string
          example: https://example.com/tracking/GM275322484009027685
    TrustedListing:
      type: object
      title: TrustedListing
      description: The details of the trusted listing status of the merchant
      properties:
        status:
          type: string
          description: >
            Enables the communication of trusted beneficiary status between the Access Control Server (ACS), the Directory Server (DS), and the 3D Secure (3DS) Requestor.<br/><br/>
            
            • Y = 3DS Requestor is allowlisted by cardholder<br/>
            • N = 3DS Requestor is not allowlisted by cardholder<br/>
            • E = Not eligible as determined by issuer<br/>
            • P = Pending confirmation by cardholder<br/>
            • R = Cardholder rejected<br/>
            • U = Allowlist status unknown, unavailable, or does not apply
          enum:
            - Y
            - N
            - E
            - P
            - R
            - U
          example: Y
        source:
          type: string
          description: >
            The system setting trusted beneficiary status<br/><br/>
            
            • 01 = 3DS Server <br/>
            • 02 = DS <br/>
            • 03 = ACS <br/>
            • 80-99 = DS-specific values <br/>
          example: '01'
    UnreferencedRefundRequest:
      title: Unreferenced Refund
      type: object
      required:
        - source
        - destination
        - amount
        - currency
        - payment_type
        - processing_channel_id
      properties:
        source:
          type: object
          description: The source of the unreferenced refund.
          required:
            - type
            - id
          properties:
            type:
              type: string
              description: The unreferenced refund source type.
              enum:
                - currency_account
            id:
              type: string
              description: The ID of the currency account that will fund the unreferenced refund.
              pattern: '^(ca)_(\w{26})$'
              maxLength: 29
              minLength: 29
        destination:
          $ref: '#/components/schemas/UnreferencedRefundRequestDestination'
        instruction:
          type: object
          description: Additional details about the unreferenced refund instruction.
          properties:
            funds_transfer_type:
              type: string
              description: |
                **Required** if `processing.processing_speed` is `fast`.
                
                Value of this field should be based on the destination card scheme: 
                  - For Visa, use `MI`
                  - For Mastercard, use `C60`
            purpose:
              type: string
              description: |
                The purpose of the unreferenced refund.
              
                This field is required if the card's `issuer_country` is one of:
      
                  - `AR` (Argentina)
                  - `BD` (Bangladesh)
                  - `CL` (Chile)
                  - `CO` (Colombia)
                  - `EG` (Egypt)
                  - `IN` (India)
                  - `MX` (Mexico)
                
                To view a card's `issuer_country`, [retrieve the card's metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response).
              enum:
                - family_support
                - expatriation
                - travel_and_tourism
                - education
                - medical_treatment
                - emergency_need
                - leisure
                - savings
                - gifts
                - donations
                - financial_services
                - it_services
                - investment
                - insurance
                - loan_payment
                - pension
                - royalties
                - other
                - income
        amount:
          description: 'The amount in minor currency'
          allOf:
            - $ref: '#/components/schemas/Amount'
            - minimum: 1
              maximum: 9999999999
        currency:
          type: string
          description: The three-letter <a href="https://www.checkout.com/docs/developer-resources/codes/currency-codes" target="blank">ISO currency code</a> of the payment.<br>
          example: GBP
          maxLength: 3
          minLength: 3
        payment_type:
          type: string
          description: The type of the payment
          enum: ['UnreferencedRefund']
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: The processing channel identifier
        reference:
          type: string
          description: An internal reference you can later use to identify this payment
        metadata:
          type: object
          description: |
            A set of key-value pairs that you can attach to the refund request. It can be useful for storing additional information in a structured format. **Note**: This object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays.
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
        previous_payment_id:
          type: string
          description: |
            The previous related payment identifier. This could be the ID of the payment that you want to refund.
          example: 'pay_fun26akvvjjerahhctaq2uzhu4'
        segment:
          $ref: '#/components/schemas/Segment'
        processing:
          type: object
          description: Returns information related to the processing of the payment.
          properties:
            processing_speed:
              type: string
              description: |
                The speed at which the unreferenced refund is processed. 
                
                Only applicable for <a href="https://www.checkout.com/docs/payments/manage-payments/refund-a-payment/refund-a-payment-without-a-reference">unreferenced refunds</a>.
              enum:
                - "fast"
    VoidAcceptedResponse:
      type: object
      description: Void response
      required:
        - action_id
      properties:
        action_id:
          description: The unique identifier for the void action
          allOf:
            - $ref: '#/components/schemas/ActionId'
        reference:
          type: string
          description: Your reference for the void request
          example: 'ORD-5023-4E89'
        _links:
          type: object
          description: The links related to the void
          readOnly: true
          minItems: 2
          properties:
            payment:
              type: object
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: 'https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44'
          required:
            - payment
    VoidRequest:
      type: object
      properties:
        reference:
          type: string
          description: A reference you can later use to identify this void request.<br>For Amex, the string limit is 30 characters.
          maxLength: 80
          example: 'ORD-5023-4E89'
        metadata:
          type: object
          description: |
            A set of key-value pairs to attach to the authorization request. You can use this to store additional information in a structured format. 
            
            The `metadata` object only supports primitive data types. Objects and arrays are not supported.
          example:
            coupon_code: 'NY2018'
            partner_id: 123989
    BankPayout:
      title: Bank payout
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the payout.
          example: pay_mbabizu24mvu3mela5njyhpit4
        requested_on:
          type: string
          description: 'The UTC date and time the payment was requested, in ISO 8601 format.'
          example: '2023-08-24T14:15:22Z'
        destination:
          type: object
          properties:
            type:
              type: string
              description: The payout destination type.
              example: bank_account
            id:
              type: string
              description: The unique identifier of the payment instrument.
              example: src_4pakgjwmv5re5m5ivqohsqpxnm
            bank_code:
              type: string
              description: The code that identifies the bank.
              example: 123-456
            branch_code:
              type: string
              description: The code that identifies the bank branch.
              example: '6443'
            iban:
              type: string
              description: The International Bank Account Number (IBAN) of the account.
              example: HU93116000060000000012345676
            country:
              type: string
              description: 'The country where the account is based, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).'
              example: GB
            account_holder:
              type: object
              properties:
                first_name:
                  type: string
                  description: The account holder's first name.
                  example: Jia
                last_name:
                  type: string
                  description: The account holder's last name.
                  example: Tsang
              description: The account holder's details.
          description: The destination of the payout.
        amount:
          type: number
          description: The original payout amount.
          example: 10000
        currency:
          type: string
          description: 'The currency of the payout, as a [three-letter ISO currency code](https://www.checkout.com/docs/developer-resources/codes/currency-codes).'
          example: GBP
        reference:
          type: string
          description: The reference for the payout.
          example: ORD-5023-4E89
        billing_descriptor:
          type: object
          properties:
            reference:
              type: string
              description: The reference displayed on the payout recipient's bank statement.
              example: BANK-REF
          description: The billing descriptor details.
        status:
          type: string
          description: The status of the payout.
          example: Pending
        processing_channel_id:
          type: string
          description: The unique identifier of the processing channel that was used for the payout.
          example: pc_vxt6yftthv4e5flqak6w2i7rim
        sender:
          type: object
          properties:
            first_name:
              type: string
              description: The sender's first name.
              example: Ali
            last_name:
              type: string
              description: The sender's last name.
              example: Farid
          description: The payout sender's details.
        actions:
          type: array
          items:
            type: object
            properties:
              id:
                maxLength: 30
                minLength: 30
                pattern: '^(act)_(\w{26})$'
                type: string
                description: The unique identifier of the payment action.
              type:
                enum:
                  - Payout
                  - Return
                type: string
                description: The type of action.
              processed_on:
                type: string
                description: The date and time the action was processed.
                format: date-time
              response_code:
                type: string
                description: The response code.
              response_summary:
                type: string
                description: The response summary.
              reference:
                type: string
                description: The reference for the payout.
          example:
            - type: Return
              processed_on: '2023-08-24T14:15:25.3448464+00:00'
              status: Returned
            - id: act_m4wvaqkqdzferpgpw32ykoxvuq
              type: Payout
              processed_on: '2023-08-24T14:15:23.3448464+00:00'
              status: Approved
              response_code: '10000'
              response_summary: Approved
            - id: act_4crmhihaknzuvhjclvxu7bni24
              type: Payout
              processed_on: '2023-08-24T14:15:22.3448464+00:00'
              status: Pending
              reference: fd45gyh7-6y74-3gt6-bb3d-fd167854bc3c
    BankPayoutResponse:
      title: BankPayout Response
      type: object
      properties:
        data:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/BankPayout'
        _links:
          $ref: '#/components/schemas/Links'
    CardPayout:
      title: Card payout
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the payout.
          example: pay_mbabizu24mvu3mela5njyhpit4
        requested_on:
          type: string
          description: 'The UTC date and time the payment was requested, in ISO 8601 format.'
          example: '2023-08-24T14:15:22Z'
        destination:
          type: object
          properties:
            type:
              type: string
              description: The payout destination type.
              example: card
            id:
              type: string
              description: The unique identifier of the payment source.
              example: ca_y3oqhf46pyzuxjbcn2giaqnb44
            expiry_year:
              type: string
              description: The card expiration year.
              example: '2024'
            expiry_month:
              type: string
              description: The card expiration month.
              example: '04'
            account_holder:
              type: object
              properties:
                first_name:
                  type: string
                  description: "The account holder's first name.\n\nThis field is only returned if `destination.account_holder.type` is `individual`.\n"
                  example: Jia
                last_name:
                  type: string
                  description: "The account holder's last name.\n\nThis field is only returned if `destination.account_holder.type` is `individual`.\n"
                  example: Tsang
              description: The account holder's details.
            scheme:
              type: string
              description: The card scheme.
              example: Visa
            last4:
              type: string
              description: The last four digits of the card number.
              example: '1212'
            issuer:
              type: string
              description: The issuer name.
              example: issuer
            issuer_country:
              type: string
              description: 'The issuer country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).'
              example: issuer
          description: The destination of the payout.
        amount:
          type: number
          description: The original payout amount.
          example: 10000
        currency:
          type: string
          description: 'The currency of the payout, as a [three-letter ISO currency code](https://www.checkout.com/docs/developer-resources/codes/currency-codes).'
          example: GBP
        reference:
          type: string
          description: The reference for the payout.
          example: ORD-5023-4E89
        billing_descriptor:
          type: object
          properties:
            reference:
              type: string
              description: The reference displayed on the payout recipient's bank statement.
              example: CARD-REF
          description: The billing descriptor details.
        status:
          type: string
          description: The status of the payout.
          example: Paid
        processing_channel_id:
          type: string
          description: The unique identifier of the processing channel that was used for the payout.
          example: pc_vxt6yftthv4e5flqak6w2i7rim
        sender:
          type: object
          properties:
            type:
              type: string
              description: "The sender type. \n\nThis field is only returned for payout requests for some [funds transfer types](https://www.checkout.com/docs/payments/request-payouts/card-payouts#Fund_Transfer_Types).\n"
              example: individual
            first_name:
              type: string
              description: "The sender's first name.\n\nThis field is only returned if `sender.type` is `individual`.\n"
              example: Ali
            last_name:
              type: string
              description: "The sender's last name.\n\nThis field is only returned if `sender.type` is `individual`.\n"
              example: Farid
          description: The payout sender's details.
        metadata:
          type: object
          description: 'A set of key-value pairs attached to the payout, used to store additional information.'
        actions:
          type: array
          items:
            type: object
            properties:
              id:
                maxLength: 30
                minLength: 30
                pattern: '^(act)_(\w{26})$'
                type: string
                description: The unique identifier of the payment action.
              type:
                enum:
                  - Payout
                type: string
                description: The type of action.
              processed_on:
                type: string
                description: The date and time the action was processed.
                format: date-time
              processing:
                type: object
                properties:
                  acquirer_reference_number:
                    type: string
                    description: A unique identifier for the payout that is submitted to the card scheme during processing.
              response_code:
                type: string
                description: The response code.
              response_summary:
                type: string
                description: The response summary.
              reference:
                type: string
                description: The reference for the payout.
              sanction_screening:
                type: string
                description: The outcome of sanction screening.
          example:
            - id: act_obwnktnk6i2e5bcp5i7xq673se
              type: Payout
              processed_on: '2023-08-24T14:15:23.3448464+00:00'
              status: Approved
              response_code: '10000'
              response_summary: Approved
              sanction_screening: Pass
              processing:
                acquirer_reference_number: '232810098064'
            - id: act_rdqbtrhinozuza3wbnhi3n7noa
              type: Payout
              processed_on: '2023-08-24T14:15:22.3448464+00:00'
              status: Pending
              reference: fd45gyh7-6y74-3gt6-bb3d-fd167854bc3c
    CardPayoutResponse:
      title: CardPayout Response
      type: object
      properties:
        data:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/CardPayout'
        _links:
          $ref: '#/components/schemas/Links'
    Links:
      title: Links
      type: object
      description: Links related to the search.
      properties:
        next:
          type: object
          maxLength: 2048
          minLength: 1
          allOf:
            - $ref: '#/components/schemas/Link'
          description: | 
            A link to the next page of results, if the search returned more results than the value specified in `limit`.
            
            Pagination links expire after 24 hours. If you attempt to access the link after this time, you receive a `404 Not Found` response code.
      example:
        next:
          href: 'https://{prefix}.api.checkout.com/payments/search/nGd7-altGkOfSl3fJptLxA?token=MTc0MDUwMjE2MjQxOCxlN2NiNTdmYy04MDA5LTQ3YmMtOTYzNi0zNDEyOWRmZTkwZTI'
    Payin:
      title: Payin
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the payment.
          example: pay_mbabizu24mvu3mela5njyhpit4
        requested_on:
          type: string
          description: 'The UTC date and time the payment was requested, in ISO 8601 format.'
          example: '2023-08-24T14:15:22Z'
        source:
          type: object
          properties:
            type:
              type: string
              description: "The payment source type. \n\nFor payment request sources that result in a card token, this will be `card`. For example, a token or source ID.\n"
              example: card
            expiry_month:
              type: string
              description: The card expiration month.
              example: '04'
            expiry_year:
              type: string
              description: The card expiration year.
              example: '2024'
            name:
              type: string
              description: The cardholder's name.
              example: Jia Tsang
            scheme:
              type: string
              description: The card scheme.
              example: Visa
            local_schemes:
              type: array
              items:
                type: string
              description: The local co-branded card scheme.
              example:
                - cartes bancaires
            last4:
              type: string
              description: The last four digits of the card number.
              example: '3131'
            fingerprint:
              type: string
              description: "The card's unique fingerprint.\n\nYou can use the card fingerprint to compare cards across customers.\n"
              example: B16D9C2EF0C861A8825C9BD59CCE9171D84EBC45E89CC792B5D1D2D0DDE3DAB7
            bin:
              type: string
              description: The card issuer's Bank Identification Number (BIN).
              example: '313131'
            card_type:
              type: string
              description: The card type.
              example: credit
            card_wallet_type:
              type: string
              description: The card wallet type.
              example: googlepay
            issuer:
              type: string
              description: The card issuer.
              example: 'GE CAPITAL FINANCIAL, INC'
            issuer_country:
              type: string
              description: 'The issuer country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).'
              example: US
            avs_check:
              type: string
              description: The result of the Address Verification System (AVS) check.
              example: G
          description: The source of the payment.
        amount:
          type: number
          description: The original payment amount.
          example: 10000
        amount_requested:
          type: number
          description: 'The full amount from the original authorization, if a partial authorization was requested.'
          example: 10000
        currency:
          type: string
          description: 'The currency of the payment, as a [three-letter ISO currency code](https://www.checkout.com/docs/developer-resources/codes/currency-codes).'
          example: GBP
        payment_type:
          type: string
          description: "The type of payment.\n\nThis field is returned for card payments where the cardholder was not present. For example, recurring payments or mail order / telephone order (MOTO) payments.\n"
          example: regular
        processing_channel_id:
          type: string
          description: The unique identifier of the processing channel that was used for the payment.
          example: pc_vxt6yftthv4e5flqak6w2i7rim
        reference:
          type: string
          description: The reference for the payment.
          example: ORD-5023-4E89
        status:
          type: string
          description: The status of the payment.
          example: captured
        balances:
          type: object
          properties:
            total_authorized:
              type: number
              description: The total amount that was authorized.
              example: 200
            total_captured:
              type: number
              description: The total amount that was captured.
              example: 150
            total_refunded:
              type: number
              description: The total amount that was refunded.
              example: 50
          description: The payment's balances.
        3ds:
          type: object
          properties:
            eci:
              type: string
              description: The Electronic Commerce Indicator (ECI).
              example: '02'
            version:
              type: string
              description: The version of 3DS that was used for authentication.
              example: '2.1.0'
          description: Details relating to payments processed with 3D Secure (3DS).
        risk:
          type: object
          properties:
            flagged:
              type: boolean
              description: Specifies whether the payment was flagged by a risk check.
              example: false
            score:
              type: string
              description: "The risk score calculated by our Fraud Detection engine.\n\nThis field is only returned if sufficient data was provided to Fraud Detection.\n"
              example: '22'
          description: The payment's risk assessment results.
        customer:
          type: object
          properties:
            email:
              type: string
              description: The customer's email address.
              example: jia.tsang@checkout.com
            name:
              type: string
              description: The customer's name.
              example: Jia Tsang
          description: The customer linked to the payment.
        billing_descriptor:
          type: object
          properties:
            name:
              type: string
              description: The reference displayed on the customer's bank statement.
              example: Purchase
            city:
              type: string
              description: The city from which the payment originated.
              example: London
          description: "An optional description displayed on the customer's statement identifying a purchase.\n\nApplies to card payments only.\n"
        metadata:
          type: object
          description: 'A set of key-value pairs attached to the payout, used to store additional information.'
        actions:
          type: array
          items:
            type: object
            properties:
              id:
                maxLength: 30
                minLength: 30
                pattern: '^(act)_(\w{26})$'
                type: string
                description: 'The unique identifier of the payment action, including authentication and disputes.'
              type:
                enum:
                  - Authentication
                  - Authorization
                  - Card Verification
                  - Void
                  - Capture
                  - Partial Capture
                  - Partial Refund
                  - Refund
                  - Cancelation
                  - Request
                  - Pending
                  - Dispute
                type: string
                description: The type of action.
              status:
                type: string
                description: The action outcome.
              processed_on:
                type: string
                description: The date and time the action was processed.
                format: date-time
              amount:
                type: integer
                description: The action amount in minor currency units.
              auth_code:
                type: string
                description: The issuer authorization code for cards.
              response_code:
                type: string
                description: The response code.
              response_summary:
                type: string
                description: The response summary.
              reference:
                type: string
                description: Your reference for the action.
              processing:
                type: object
                properties:
                  acquirer_reference_number:
                    type: string
                    description: A unique identifier for the capture that is submitted to the card scheme during processing.
              fraud_score:
                type: string
                description: The risk score calculated by our Fraud Detection engine. This field is only returned if sufficient data was provided to Fraud Detection.
              response_status_reason:
                type: string
                description: The reason for the response status. This is only available as a result of a 3DS2 authentication.
              authentication_experience:
                type: string
                description: The authentication type used.
              reason_code:
                type: string
                description: The reason code provided by the card scheme. This only applies to disputes.
          example:
            - id: act_egiv5753bwmexj6ip3tlpog6gq
              type: Dispute
              processed_on: '2023-08-25T14:15:24Z'
              status: Evidence Required
              amount: 1310
              reason_code: '13.1'
            - id: act_i3cd3w3lcooexmyrtlgulk3d7a
              type: Capture
              processed_on: '2023-08-24T14:15:26Z'
              status: Approved
              amount: 1310
              auth_code: '983647'
              response_code: '10000'
              response_summary: Approved
              reference: REF-7HR-IYW
              processing:
                acquirer_reference_number: '25651432189281252509653'
            - id: act_2uwlm6xyeszerhroqhfnotmiwu
              type: Authorization
              processed_on: '2023-08-24T14:15:25Z'
              status: Approved
              amount: 1310
              auth_code: '983647'
              response_code: '10000'
              response_summary: Approved
              reference: REF-7HR-IYW
              processing:
                acquirer_reference_number: '25651432189281252509653'
            - id: act_mscwxewzdldefh2rbbnhm6aeqi
              type: Authorization
              processed_on: '2023-08-24T14:15:24Z'
              status: Pending
              amount: 1310
              reference: REF-7HR-IYW
            - id: act_qocmjw6skb4u3c4wd3avpot64y
              type: Authentication
              processed_on: '2023-08-24T14:15:34Z'
              status: Approved
              authentication_experience: 3ds
              authentication_transaction_id: f05af960-f718-428d-b856-068f6cb9a3b4
            - id: act_qocmjw6skb4u3c4wd3avpot64y
              type: Authentication
              processed_on: '2023-08-24T14:15:22Z'
              status: Pending
              reference: REF-7HR-IYW
    PayinResponse:
      title: Payin Response
      type: object
      properties:
        data:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/Payin'
        _links:
          $ref: '#/components/schemas/Links'
    SearchError:
      title: Search error
      type: object
      properties:
        request_id:
          type: string
          example: 0HL80RJLS76I7
        error_type:
          type: string
          example: request_invalid
        error_codes:
          type: array
          items:
            type: string
            example: unknown_attribute
    SearchRequest:
      title: Search request
      type: object
      properties:
        query:
          maxLength: 1024
          type: string
          description: "The query string.\n\nFor more information on how to build out your query, see the <a href=\"https://www.checkout.com/docs/payments/manage-payments/search-and-filter-payments#Search_through_your_payments\" target=\"blank\">Search and filter payments</a> documentation."
          example: id:'pay_mbabizu24mvu3mela5njyhpit4'
        limit:
          maximum: 1000
          minimum: 1
          type: integer
          description: The number of results to return per page.
          default: 10
          example: 10
        from:
          type: string
          description: The UTC date and time for the query start in ISO 8601 format. Required if `to` is provided.
          example: '2023-08-24T14:15:22Z'
        to:
          type: string
          description: The UTC date and time for the query end in ISO 8601 format. Required if `from` is provided.
          example: '2023-08-24T14:15:22Z'
    CreateAndSubmitPaymentSessionsActionRequiredResponse:
      type: object
      required:
        - id
        - status
        - type
        - action
        - payment_session_id
        - payment_session_secret
      description: Response for an action required payment session payment.
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentId'
        status:
          type: string
          description: The payment's status.
          enum:
            - Action Required
        type:
          type: string
          description: The payment method name.
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPaymentMethod'
        action:
          type: object
          description: Instruction for further payment action.
        payment_session_id:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionId'
        payment_session_secret:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionSecret'
    CreateAndSubmitPaymentSessionsProcessedResponse:
      type: object
      required:
        - id
        - status
        - type
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentId'
        status:
          type: string
          description: The payment's status.
          enum:
            - Approved
            - Declined
        type:
          type: string
          description: The payment method name.
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPaymentMethod'
      discriminator:
        propertyName: status
        mapping:
          Approved: '#/components/schemas/CreateAndSubmitPaymentSessionsProcessedResponseStatusApproved'
          Declined: '#/components/schemas/CreateAndSubmitPaymentSessionsProcessedResponseStatusDeclined'
    CreateAndSubmitPaymentSessionsProcessedResponseStatusApproved:
      type: object
      required:
        - id
        - status
        - type
        - payment_session_id
        - payment_session_secret
      description: Response for an approved payment session payment.
      allOf:
        - $ref: '#/components/schemas/CreateAndSubmitPaymentSessionsProcessedResponse'
        - type: object
          properties:
            status:
              type: string
              enum: [Approved]
              description: The payment was approved.
            payment_session_id:
              allOf:
                - $ref: '#/components/schemas/PaymentSessionId'
            payment_session_secret:
              allOf:
                - $ref: '#/components/schemas/PaymentSessionSecret'
    CreateAndSubmitPaymentSessionsProcessedResponseStatusDeclined:
      type: object
      required:
        - id
        - status
        - type
        - decline_reason
      description: Response for a declined payment session payment.
      allOf:
        - $ref: '#/components/schemas/CreateAndSubmitPaymentSessionsProcessedResponse'
        - type: object
          properties:
            status:
              type: string
              enum: [Declined]
              description: The payment was declined.
            decline_reason:
              type: string
              description: The reason for the payment decline.
    CreateAndSubmitPaymentSessionsRequest:
      type: object
      allOf:
        # Keep this first to ensure session_data comes first in the request body
        - type: object
          required:
            - session_data
          properties:
            session_data:
              allOf:
                - $ref: '#/components/schemas/PaymentSessionsSessionData'
        - $ref: '#/components/schemas/CreatePaymentSessionsBaseRequest'
    CreatePaymentSessionsBaseRequest:
      type: object
      required:
        - amount
        - currency
        - billing
        - success_url
        - failure_url
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsAmount'
        currency:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionCurrency'
        payment_type:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionPaymentType'
        authorization_type:
          type: string
          description: The authorization type.
          enum:
            - Final
            - Estimated
          default: Final
          example: 'Estimated'
        billing:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionBilling'
        billing_descriptor:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsBillingDescriptor'
        reference:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesReference'
        description:
          maxLength: 100
          example: Payment for gold necklace
          description: A description for the payment.
          type: string
        customer:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionCustomer'
        shipping:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionShipping'
        recipient:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesRecipient'
        processing:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesProcessing'
        instruction:
          type: object
          description: Details about the payment instruction.
          properties:
            purpose:
              allOf:
                - $ref: '#/components/schemas/Purpose'
        processing_channel_id:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionProcessingChannelId'
        items:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsItems'
        amount_allocations:
          description: The sub-entities that the payment is being processed on behalf of.
          minItems: 1
          maxItems: 50
          type: array
          items:
            description: The sub-entities that the payment is being processed on behalf of.
            type: object
            properties:
              id:
                description: The sub-entity's ID.
                type: string
              amount:
                type: integer
                description: The split amount, in <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a>. The sum of all split amounts must be equal to the payment amount. The split amount will be credited to your sub-entity's currency account.
                minimum: 0
                example: 1
              reference:
                description: A reference you can use to identify the split. For example, an order number.
                maxLength: 50
                example: ORD-123A
                type: string
              commission:
                description: |
                  The commission you'd like to collect from the split, calculated using the formula: `commission = (amount * commission.percentage) + commission.amount`. The commission cannot exceed the split amount. Commission will be credited to your currency account.
                type: object
                properties:
                  amount:
                    type: integer
                    description: An optional commission to collect, as a fixed amount in <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a>.
                    minimum: 0
                    example: 10
                  percentage:
                    description: An optional commission to collect, as a percentage value with up to eight decimal places.
                    minimum: 0
                    maximum: 100
                    example: 12.5
                    type: number
            required:
              - id
              - amount
        risk:
          description: Configures the risk assessment performed during payment processing.
          type: object
          properties:
            enabled:
              description: Specifies whether to perform a risk assessment.
              default: true
              example: false
              type: boolean
          required:
            - enabled
        display_name:
          description: The merchant's display name.
          maxLength: 255
          type: string
        success_url:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsSuccessUrl'
        failure_url:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsFailureUrl'
        metadata:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionMetadata'
        locale:
          description: Creates a translated version of the page in the specified language.
          default: en-GB
          type: string
          enum:
            - ar
            - da-DK
            - de-DE
            - el
            - en-GB
            - es-ES
            - fi-FI
            - fil-PH
            - fr-FR
            - hi-IN
            - id-ID
            - it-IT
            - ja-JP
            - ko-KR
            - ms-MY
            - nb-NO
            - nl-NL
            - pt-PT
            - sv-SE
            - th-TH
            - vi-VN
            - zh-CN
            - zh-HK
            - zh-TW
        3ds:
          allOf:
            - $ref: '#/components/schemas/PaymentSessions3DS'
        sender:
          description: The sender of the payment.
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesSender'
        capture:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionCapture/properties/capture'
        capture_on:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionCapture/properties/capture_on'
        payment_plan:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionPaymentPlanRecurring'
    CreatePaymentSessionsRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/CreatePaymentSessionsBaseRequest'
        - type: object
          properties:
            expires_on:
              description: A timestamp specifying when the `PaymentSession` should expire, as an ISO 8601 code. If no value is provided, expiry is set to 24 hours after the `PaymentSession` is created. You cannot set the session expiry to more than 60 days after the `PaymentSession` is created.
              format: date-time
              type: string
              example: '2024-01-01T09:15:30Z'
            enabled_payment_methods:
              allOf:
                - $ref: '#/components/schemas/PaymentInterfacesPaymentMethods'
              example: ["card", "applepay", "googlepay"]
              description: |
                Specifies which payment method options to present to the customer.
          
                The values in this field override any equivalent values in `disabled_payment_methods`.
            disabled_payment_methods:
              allOf:
                - $ref: '#/components/schemas/PaymentInterfacesPaymentMethods'
              example: ["eps", "ideal", "knet"]
              description: |
                Specifies which payment method options to not present to the customer.
          
                If you specify the same payment method in this field and in `enabled_payment_methods`, the `disabled_payment_methods` value will be overridden.
      
                Any payment method options not explicitly specified in this field will be presented to the customer by default.
            payment_method_configuration:
              allOf:
                - $ref: '#/components/schemas/PaymentSessionsPaymentMethodConfigurationBase'
                - type: object
                  properties:
                    applepay:
                      type: object
                      properties:
                        account_holder:
                          type: object
                          description: The account holder's details.
                          discriminator:
                            propertyName: type
                            mapping:
                              individual: '#/components/schemas/01_PaymentSessionRequest_AccountHolderIndividual'
                              corporate: '#/components/schemas/02_PaymentSessionRequest_AccountHolderCorporate'
                              government: '#/components/schemas/03_PaymentSessionRequest_AccountHolderGovernment'
                          properties:
                            type:
                              type: string
                              example: 'individual'
                        total_type:
                          description: The [type](https://developer.apple.com/documentation/applepayontheweb/applepaylineitemtype) of the Apple Pay payment [total line item](https://developer.apple.com/documentation/applepayontheweb/applepaypaymentrequest/total).
                          default: final
                          type: string
                          enum:
                            - pending
                            - final
                    card:
                      type: object
                      properties:
                        account_holder:
                          type: object
                          description: The account holder's details.
                          discriminator:
                            propertyName: type
                            mapping:
                              individual: '#/components/schemas/01_PaymentSessionRequest_AccountHolderIndividual'
                              corporate: '#/components/schemas/02_PaymentSessionRequest_AccountHolderCorporate'
                              government: '#/components/schemas/03_PaymentSessionRequest_AccountHolderGovernment'
                          properties:
                            type:
                              type: string
                              example: 'individual'
                    googlepay:
                      type: object
                      properties:
                        account_holder:
                          type: object
                          description: The account holder's details.
                          discriminator:
                            propertyName: type
                            mapping:
                              individual: '#/components/schemas/01_PaymentSessionRequest_AccountHolderIndividual'
                              corporate: '#/components/schemas/02_PaymentSessionRequest_AccountHolderCorporate'
                              government: '#/components/schemas/03_PaymentSessionRequest_AccountHolderGovernment'
                          properties:
                            type:
                              type: string
                              example: 'individual'
                        total_price_status:
                          description: The status of the Google Pay payment [total price](https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo).
                          default: final
                          type: string
                          enum:
                            - estimated
                            - final
                    stored_card:
                      description: Configuration options specific to stored card payments.
                      type: object
                      properties:
                        customer_id:
                          pattern: ^(cus)_(\w{26})$
                          description: |
                            The unique identifier for an existing [customer](https://api-reference.checkout.com/#tag/Customers). Enables the stored card payment method if the customer has one or more payment instruments stored.
      
                            This value takes precedence over `payment_method_configuration.stored_card.instrument_ids` when choosing the stored cards to present to the customer.
                          type: string
                        instrument_ids:
                          description: |
                            The unique identifiers for card instruments. Enables stored card payment method if any  exists.
      
                            The first valid payment instrument in the list is shown to the customer as the default option.  <br/>
                            Alternatively, you can specify a default payment instrument by providing its ID in the `payment_method_configuration.stored_card.default_instrument_id` field.
                          minItems: 1
                          maxItems: 10
                          type: array
                          items:
                            pattern: ^(src)_(\w{26})$
                            type: string
                        default_instrument_id:
                          pattern: ^(src)_(\w{26})$
                          description: The unique identifier for the payment instrument to present to the customer as the default option.
                          type: string
            customer_retry:
              description: Configuration for asynchronous retries.
              type: object
              properties:
                max_attempts:
                  description: The maximum number of authorization retry attempts, excluding the initial authorization.
                  example: 2
                  default: 5
                  minimum: 0
                  maximum: 5
                  type: integer
              required:
                - max_attempts
            ip_address:
              deprecated: true
              description: The Customers IP address. Only IPv4 and IPv6 addresses are accepted.
              allOf:
                - $ref: '#/components/schemas/IPAddress'
    CreatePaymentSessionsResponse:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionId'
        payment_session_token:
          type: string
          description: | 
            A unique token representing the payment session, which you must provide when you initialize [Flow](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/get-started-with-flow#Step_2:_Initialize_and_mount_Flow_).
            
            Do not log or store this value.
        payment_session_secret:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionSecret'
        _links:
          type: object
          description: "The links related to the Payment Session."
          properties:
            self:
              type: object
              description: "The URI of the Payment Session."
              properties:
                href:
                  type: string
                  description: "The link URL"
                  example: "https://{prefix}.api.sandbox.checkout.com/payment-sessions/ps_2Un6I6lRpIAiIEwQIyxWVnV9CqQ"
              required:
                - href
          required:
            - self
      required:
        - id
        - payment_session_token
        - payment_session_secret
        - _links
    PaymentSessionsRateLimitedResponse:
      type: object
      properties:
        request_id:
          type: string
        error_type:
          type: string
        error_codes:
          type: array
          items:
            type: string
      required:
        - request_id
        - error_type
        - error_codes
    PaymentSessionsValidationErrorResponse:
      type: object
      properties:
        request_id:
          type: string
        error_type:
          type: string
        error_codes:
          type: array
          items:
            type: string
      required:
        - request_id
        - error_type
        - error_codes
    PaymentSessionBilling:
      type: object
      description: The billing details.
      required:
        - address
      properties:
        address:
          description: The billing address.
          allOf:
            - $ref: '#/components/schemas/Address'
          required:
            - country
        phone:
          description: The phone number associated with the billing address
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPhoneNumber'
    PaymentSessionCapture:
      type: object
      properties:
        capture:
          description: Specifies whether to capture the payment, if applicable.
          example: true
          default: true
          type: boolean
        capture_on:
          description: A timestamp specifying when to capture the payment, as an ISO 8601 code. If a value is provided, `capture` is automatically set to `true`.
          format: date-time
          type: string
          example: '2024-01-01T09:15:30Z'
    PaymentSessionCurrency:
      description: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a>.
      type: string
      example: USD
      maxLength: 3
      minLength: 3
    PaymentSessionCustomer:
      description: The customer's details. Required if `source.type` is `tamara`.
      type: object
      properties:
        email:
          format: email
          maxLength: 255
          example: jia.tsang@example.com
          description: The customer's email address. Required if `source.type` is `tamara`.
          type: string
        name:
          maxLength: 255
          example: Jia Tsang
          description: The customer's name. Required if `source.type` is `tamara`.
          type: string
        id:
          pattern: ^(cus)_(\w{26})$
          description: The unique identifier for an existing customer.
          type: string
        phone:
          description: The customer's phone number. Required if `source.type` is `tamara`.
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPhoneNumber'
        tax_number:
          maxLength: 13
          description: The customer's value-added tax (VAT) registration number.
          type: string
        summary:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesCustomerSummary'
    PaymentSessionId:
      type: string
      pattern: "^(ps)_(\\w{27})$"
      description: The Payment Sessions unique identifier
      maxLength: 30
      minLength: 30
      example: "ps_2Un6I6lRpIAiIEwQIyxWVnV9CqQ"
    PaymentSessionMetadata:
      type: object
      description: |
        Allows you to store additional information about a transaction with custom fields and up to five user-defined fields, which can be used for reporting purposes. You can supply fields of type `string`, `number`, and `boolean` within the `metadata` object. Arrays and objects are not supported.
      
        You can provide up to 18 metadata fields per API call, but the value of each field must not exceed 255 characters in length.
      
        You can also reference [`metadata` properties](https://www.checkout.com/docs/business-operations/prevent-fraud/understand-fraud-detection#Metadata) in your custom rules for Fraud Detection. For example, `$coupon_code = '1234'`.
      example:
        coupon_code: 'NY2018'
      maxProperties: 18
    PaymentSessionPaymentPlanRecurring:
      description: The information to process a recurring payment request. To be used when the payment_type is Recurring.
      type: object
      properties:
        amount_variability:
          description: Specifies whether the amount is fixed or variable for each recurrence.
          type: string
          enum:
            - Fixed
            - Variable
          example: Variable
        days_between_payments:
          description: Indicates the minimum number of days between payments.
          type: integer
          example: 28
        total_number_of_payments:
          description: Indicates the agreed total number of payments.
          type: integer
          example: 5
        current_payment_number:
          description: The number of the current installment payment.
          type: integer
          example: 3
        expiry:
          description: The date after which no further payments will be performed, in the format YYYYMMDD.
          type: string
          example: '20251031'
        name:
          description: |
            The name of the payment plan.
      
            Required when `source.type` is `blik`. For Blik merchant-initiated requests using an external `partner_agreement_id`, this value is used as the Blik Alias Label.
          type: string
          maxLength: 35
          example: 'Subscription 1234'
        start_date:
          type: string
          description: |
            The date on which the first payment will be taken, in `YYYYMMDD` format.
      
            Required when `source.type` is `blik` and the recurring agreement is created without an initial payment (`amount` set to `0`).
          example: '20260507'
        amount:
          type: integer
          description: |
            The amount to charge for each payment in the plan, in the [minor currency unit](https://www.checkout.com/docs/resources/calculating-the-amount).
      
            Required when `source.type` is `blik`, `payment_plan.amount_variability` is `Fixed`, and the recurring agreement is created without an initial payment (`amount` set to `0`).
          minimum: 1
          example: 1234
    PaymentSessionPaymentType:
      description: Must be specified for card-not-present (CNP) payments. For example, a recurring mail order / telephone order (MOTO) payment.
      default: Regular
      type: string
      enum:
        - Regular
        - Recurring
        - MOTO
        - Installment
        - Unscheduled
      
    PaymentSessionProcessingChannelId:
      description: The processing channel to use for the payment.
      type: string
      pattern: "^(pc)_(\\w{26})$"
    PaymentSessions3DS:
      type: object
      description: Information required for 3D Secure authentication payments.
      anyOf:
        - $ref: '#/components/schemas/PaymentSessions3DSIntegrated'
        - $ref: '#/components/schemas/PaymentSessions3DSThirdParty'
    PaymentSessions3DSAccountInfo:
      type: object
      title: AccountInfo
      description: >
        Additional information about the cardholder's account
      properties:
        purchase_count:
          type: number
          description: >
            The number of purchases with this cardholder's account during the last six months
          example: 10
          minimum: 0
          maximum: 9999
        account_age:
          type: string
          description: >
            The length of time that the payment account was enrolled in the cardholder's account
          enum:
            - no_account
            - created_during_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        add_card_attempts:
          type: number
          description: >
            The number of _Add Card_ attempts in the last 24 hours
          example: 10
          minimum: 0
          maximum: 999
        shipping_address_age:
          type: string
          description: >
            Indicates when the shipping address for this transaction was first used
          enum:
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        account_name_matches_shipping_name:
          type: boolean
          description: >
            Indicates if the cardholder name on the account is identical to the shipping name used for this transaction
          example: true
        suspicious_account_activity:
          type: boolean
          description: >
            Indicates whether suspicious activity on the cardholder account has been observed
          example: true
        transactions_today:
          type: number
          description: >
            The number of transactions (successful and abandoned) for the cardholder account across all payment accounts in the previous 24 hours
          minimum: 0
          maximum: 999
          example: 10
        authentication_method:
          type: string
          description: >
            Information about how the cardholder was authenticated before or during the transaction
          enum:
            - no_authentication
            - own_credentials
            - federated_id
            - issuer_credentials
            - third_party_authentication
            - fido
        cardholder_account_age_indicator:
          type: string
          description: The length of time the cardholder has held the account with the 3DS Requestor
          enum:
            - no_account
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        account_change:
          type: string
          format: date-time
          description: |
            The UTC date and time the cardholder’s account with the 3DS Requestor was last changed, in ISO 8601 format.
            
            Changes that affect this value include:
            - updating the billing or shipping address
            - adding a new payment account
            - adding a new user
        account_change_indicator:
          type: string
          description: |
            The amount of time since the cardholder’s account information with the 3DS Requestor was last changed.
            
            Changes that affect this value include:
            - updating the billing or shipping address
            - adding a new payment account
            - adding a new user
          enum:
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        account_date:
          type: string
          format: date-time
          description: The UTC date and time the cardholder opened the account with the 3DS Requestor, in ISO 8601 format.
        account_password_change:
          type: string
          format: date-time
          description: The UTC date and time the cardholder’s account with the 3DS Requestor was last reset or had a password change, in ISO 8601 format.
        account_password_change_indicator:
          type: string
          description: The amount of time since the cardholder’s account with the 3DS Requestor was last reset or had a password change.
          enum:
            - no_change
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        transactions_per_year:
          type: integer
          description:  |
            The number of transactions associated with the cardholder's account with the 3DS Requestor in the previous year. This value includes both successful and abandoned transactions, across all payment accounts. 
          
            Set this value to `999` if the number of transactions is `1000` or greater.
          example: 2
          maximum: 999
        payment_account_age:
          type: string
          format: date-time
          description: The UTC date and time the payment account was enrolled in the cardholder’s account with the 3DS Requestor, in ISO 8601 format.
        shipping_address_usage:
          type: string
          format: date-time
          description: The UTC date and time the shipping address used for the transaction was first used with the 3DS Requestor, in ISO 8601 format.
        account_type:
          type: string
          description: The type of account, in the case of a card product with multiple accounts.
          enum:
            - not_applicable
            - credit
            - debit
        account_id:
          type: string
          description: Additional information about the account optionally provided by the 3DS Requestor
          maxLength: 64
    PaymentSessions3DSIntegrated:
      type: object
      title: Integrated authentication
      description: Required information to process a 3DS authentication with the payment request
      discriminator:
        propertyName: enabled
        mapping:
          'false': '#/components/schemas/PaymentSessions3DSIntegratedNonEnabled'
          'true': '#/components/schemas/PaymentSessions3DSIntegratedEnabled'
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: Whether to process this payment as a 3D Secure payment. Payments where `merchant_initiated` is `true` will be processed as <a href="https://www.checkout.com/docs/payments/authenticate-payments/3d-secure/request-3ri-authentication" target="_blank">3DS Requestor Initiated.</a>
          example: true
        challenge_indicator:
          type: string
          description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge.
          enum:
            - no_preference
            - no_challenge_requested
            - challenge_requested
            - challenge_requested_mandate
          default: no_preference
    PaymentSessions3DSIntegratedEnabled:
      type: object
      description: 3DS authentication enabled
      required:
        - enabled
      allOf:
        - $ref: '#/components/schemas/PaymentSessions3DSIntegrated'
        - type: object
          properties:
            attempt_n3d:
              type: boolean
              description: |
                Applies only when `3ds.enabled` is set to `true`. Set to `true` to attempt the payment without 3DS when the issuer, card, or network doesn’t support 3DS.
              default: false
              example: true
            exemption:
              type: string
              enum:
                - low_value
                - trusted_listing
                - trusted_listing_prompt
                - transaction_risk_assessment
                - data_share
              description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://docs.checkout.com/four/payments/regulation-support/sca-compliance-guide#SCAcomplianceguide-PossibleSCAexemptionsexemptions" target="_blank">SCA compliance guide</a>
              example: 'low_value'
            account_info:
              type: object
              description: Additional information about the cardholder's account
              allOf:
                - $ref: '#/components/schemas/PaymentSessions3DSAccountInfo'
    PaymentSessions3DSIntegratedNonEnabled:
      type: object
      description: 3DS authentication not enabled
      required:
        - enabled
      allOf:
        - $ref: '#/components/schemas/PaymentSessions3DSIntegrated'
        - type: object
          properties:
            allow_upgrade:
              type: boolean
              description: Indicates whether to process this payment as 3D Secure if the authorization was soft declined due to 3DS authentication required. For processing channels created before October 12, 2022, the value will default to `false`.
              default: true
              example: true
            exemption:
              type: string
              enum:
                - low_value
                - trusted_listing
                - trusted_listing_prompt
                - transaction_risk_assessment
                - 3ds_outage
                - sca_delegation
                - out_of_sca_scope
                - low_risk_program
                - recurring_operation
                - data_share
                - other
              description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://docs.checkout.com/four/payments/regulation-support/sca-compliance-guide#SCAcomplianceguide-PossibleSCAexemptionsexemptions" target="_blank">SCA compliance guide</a>
              example: 'low_value'
    PaymentSessions3DSThirdParty:
      type: object
      title: Third party authentication
      description: Required information to process a payment that has been 3DS authenticated using a <a href="https://www.checkout.com/docs/risk-management/3d-secure/sessions#Non-hosted" target="_blank">Third Party provider</a>
      
      required:
        - enabled
        - eci
        - cryptogram
        - xid
        - version
      
      properties:
        enabled:
          type: boolean
          description: Whether to process this payment as a 3D Secure payment
          enum: [true]
          example: true
        eci:
          type: string
          description: The Electronic Commerce Indicator security level associated with the 3D Secure enrollment result. Required if using a third-party merchant plug-in (MPI)
          maxLength: 2
          example: '05'
        cryptogram:
          type: string
          description: A Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the cardholder authentication result (3D Secure). Required if using an external MPI
          maxLength: 100
          example: AgAAAAAAAIR8CQrXcIhbQAAAAAA=
        xid:
          type: string
          description: The 3D Secure transaction identifier. Required if using an external MPI with 3D Secure 2.X.X and a Mastercard card, or with 3D Secure 1.X.X for any supported card scheme
          maxLength: 100
          example: MDAwMDAwMDAwMDAwMDAwMzIyNzY=
        version:
          type: string
          description: Indicates the version of 3D Secure that was used for authentication. Defaults to 1.0.0 if not provided
          maxLength: 10
          example: '2.0.1'
        exemption:
          type: string
          enum:
            - low_value
            - secure_corporate_payment
            - trusted_listing
            - transaction_risk_assessment
            - 3ds_outage
            - sca_delegation
            - out_of_sca_scope
            - other
            - low_risk_program
            - recurring_operation
          description: Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://docs.checkout.com/four/payments/regulation-support/sca-compliance-guide#SCAcomplianceguide-PossibleSCAexemptionsexemptions" target="_blank">SCA compliance guide</a>
          example: 'low_value'
    01_PaymentSessionRequest_AccountHolderIndividual:
      type: object
      description: The account holder's details.
      required:
        - type
        - first_name
        - last_name
      properties:
        type:
          type: string
          description: |
            The account holder type.
          example: 'individual'
        first_name:
          type: string
          description: |
            The account holder's first name.
            
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
            This must be a valid legal name. The following formats for the `first_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
             
            - a single character
            - all non-alphabetic characters
          maxLength: 35
        middle_name:
          type: string
          description: |
            The account holder's middle name.
            
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
            This field is required if the `issuer_country` value returned in the [card metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response) response is `ZA`.
          maxLength: 35
        last_name:
          type: string
          description: |
            The account holder's last name.
      
            The combination of `first_name`, `middle_name`, and `last_name` should exceed 3 letters in length.
            This must be a valid legal name. The following formats for the `last_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
             
              - a single character
              - all non-alphabetic characters
          maxLength: 35
        account_name_inquiry:
          type: boolean
          description: |
            Specifies whether to perform an account name inquiry (ANI) check with the scheme. 
            
            This is only valid for Visa and Mastercard payments.
    02_PaymentSessionRequest_AccountHolderCorporate:
      type: object
      description: The account holder's details.
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The account holder type.
          example: 'corporate'  
        company_name:
          type: string
          description: |
            The account holder's company name.
            
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
             
              - a single character
              - all non-alphabetic characters
          maxLength: 35
        account_name_inquiry:
          type: boolean
          description: |
            Specifies whether to perform an account name inquiry (ANI) check with the scheme. 
            
            This is only valid for Visa and Mastercard payments.
    03_PaymentSessionRequest_AccountHolderGovernment:
      type: object
      description: The account holder's details.
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The account holder type.
          example: 'government'  
        company_name:
          type: string
          description: |
            The account holder's company name.
      
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
             
              - a single character
              - all non-alphabetic characters
          maxLength: 35
        account_name_inquiry:
          type: boolean
          description: |
            Specifies whether to perform an account name inquiry (ANI) check with the scheme. 
            
            This is only valid for Visa and Mastercard payments.
    PaymentSessionsAmount:
      type: integer
      description: |
        The payment amount. Provide a value of `0` to perform a card verification.
      
        The amount must be provided in the <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="blank">minor currency unit</a>.
      minimum: 0
      example: 1000 
    PaymentSessionsBillingDescriptor:
      description: A description of the purchase, which is displayed on the customer's statement.
      type: object
      properties:
        name:
          description: A description for the payment, which will be displayed on the customer's card statement. Only applicable for card payments.
          maxLength: 25
          type: string
        city:
          description: The city from which the payment originated. Only applicable for card payments.
          minLength: 1
          maxLength: 13
          type: string
        reference:
          description: The reference to display on the customer's bank statement. Required for payouts to bank accounts.
          maxLength: 50
          type: string
      required:
        - name
        - city
        
    PaymentSessionSecret:
      type: string
      description: |
        The secret used by Flow to authenticate payment session requests.
        
        Do not log or store this value.
      example: "pss_9823241e-2cec-4c98-b23d-7b29ow4e2e34"
    PaymentSessionsFailureUrl:
      format: uri
      description: Overrides the default failure redirect URL configured on your account, for payment methods that require a redirect.
      maxLength: 1024
      example: https://example.com/payments/failure
      type: string
    PaymentSessionShipping:
      type: object
      description: The shipping details
      properties:
        address:
          description: The shipping address
          allOf:
            - $ref: '#/components/schemas/Address'
        phone:
          description: The phone number associated with the shipping address.
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPhoneNumber'
    PaymentSessionsItems:
      type: array
      description: The line items in the order.
      minItems: 1
      maxItems: 1000
      items:
        type: object
        properties:
          reference:
            description: The item reference or product stock keeping unit (SKU).
            maxLength: 255
            type: string
          commodity_code:
            description: A code identifying a commodity for value-added tax (VAT) purposes.
            maxLength: 12
            type: string
          unit_of_measure:
            description: The unit in which the item is measured, as a Unit of Measure (UoM) code.
            maxLength: 12
            type: string
          total_amount:
            type: integer
            description: |
              The total cost of the line item, in <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="blank">minor currency units</a>. The value should include any tax and discounts applied using the formula: `value = (quantity x unit_price) - discount_amount`.
            minimum: 0
            example: 1000
          tax_amount:
            type: integer
            description: The total amount of sales tax or value-added tax (VAT) on the total purchase amount. Tax should be included in the total purchase amount.
            minimum: 0
            example: 1000
          discount_amount:
            type: integer
            description: The discount applied to each invoice line item.
            minimum: 0
            example: 1000
          url:
            description: Link to the line item's product page.
            maxLength: 1024
            type: string
          image_url:
            description: Link to the line item's product image.
            maxLength: 1024
            type: string
          name:
            description: The descriptive name of the line item.
            example: Gold Necklace
            maxLength: 255
            type: string
          quantity:
            type: integer
            description: The number of line items.
            minimum: 1
            example: 1
          unit_price:
            type: integer
            description: The unit price of the item, in <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="blank">minor currency units</a>.
            minimum: 0
            example: 1000
        required:
          - name
          - quantity
          - unit_price 
    PaymentSessionsPaymentMethodConfigurationBase:
      description: Configurations for payment method-specific settings.
      type: object
      properties:
        applepay:
          description: Configuration options specific to Apple Pay payments.
          type: object
          properties:
            store_payment_details:
              $ref: '#/components/schemas/PaymentSessionsStorePaymentDetails'
        card:
          description: Configuration options specific to card payments.
          type: object
          properties:
            store_payment_details:
              $ref: '#/components/schemas/PaymentSessionsStorePaymentDetailsCard'
        googlepay:
          description: Configuration options specific to Google Pay payments.
          type: object
          properties:
            store_payment_details:
              $ref: '#/components/schemas/PaymentSessionsStorePaymentDetails'
    PaymentSessionsSessionData:
      type: string
      description: |
        A unique token representing the additional customer data captured by Flow, as received from the <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/flow-library-reference/flowcomponent#handleSubmit(FlowComponent,_SubmitData)">handleSubmit</a> callback.
        
        Do not log or store this value.
    PaymentSessionsStorePaymentDetails:
      description: |
        Specifies whether you intend to store the cardholder's payment details.
      
        If you set this field to `enabled`, you must:
      
        - have obtained consent from the cardholder to store their payment details
        - provide a customer ID or email address in the request
      
        If the request's `payment_type` is set to one of the following values, you do not need to provide this field:
      
         - `Installment`
         - `Recurring`
         - `Unscheduled`
      default: disabled
      type: string
      enum:
        - disabled
        - enabled
    PaymentSessionsStorePaymentDetailsCard:
      description: |
        Specifies whether you intend to store the cardholder's payment details.
      
        If you set this field to `enabled` or `collect_consent`, you must:
      
        - Have obtained consent from the cardholder to store their payment details
        - Provide `customer.id` or `customer.email` in the request
      
        You do not need to provide this field if `payment_type` is set to one of the following values:
      
         - `Installment`
         - `Recurring`
         - `Unscheduled`
      default: disabled
      type: string
      enum:
        - disabled
        - enabled
        - collect_consent
    PaymentSessionsSuccessUrl:
      format: uri
      description: Overrides the default success redirect URL configured on your account, for payment methods that require a redirect.
      maxLength: 1024
      example: https://example.com/payments/success
      type: string
    SubmitPaymentSessionsActionRequiredResponse:
      type: object
      required:
        - id
        - status
        - type
        - action
      description: Response for an action required payment session payment.
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentId'
        status:
          type: string
          description: The payment's status.
          enum:
            - Action Required
        type:
          type: string
          description: The payment method name.
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPaymentMethod'
        action:
          type: object
          description: Instruction for further payment action.
    SubmitPaymentSessionsProcessedResponse:
      type: object
      required:
        - id
        - status
        - type
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentId'
        status:
          type: string
          description: The payment's status.
          enum:
            - Approved
            - Declined
        type:
          type: string
          description: The payment method name.
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesPaymentMethod'
      discriminator:
        propertyName: status
        mapping:
          Approved: '#/components/schemas/SubmitPaymentSessionsProcessedResponseStatusApproved'
          Declined: '#/components/schemas/SubmitPaymentSessionsProcessedResponseStatusDeclined'
    SubmitPaymentSessionsProcessedResponseStatusApproved:
      type: object
      required:
        - id
        - status
        - type
      description: Response for an approved payment session payment.
      allOf:
        - $ref: '#/components/schemas/SubmitPaymentSessionsProcessedResponse'
        - type: object
          properties:
            status:
              type: string
              enum: [Approved]
              description: The payment was approved.
    SubmitPaymentSessionsProcessedResponseStatusDeclined:
      type: object
      required:
        - id
        - status
        - type
        - decline_reason
      description: Response for a declined payment session payment.
      allOf:
        - $ref: '#/components/schemas/SubmitPaymentSessionsProcessedResponse'
        - type: object
          properties:
            status:
              type: string
              enum: [Declined]
              description: The payment was declined.
            decline_reason:
              type: string
              description: The reason for the payment decline.
    SubmitPaymentSessionsRequest:
      type: object
      required:
        - session_data
      properties:
        session_data:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsSessionData'
        amount:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsAmount'
        currency:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionCurrency'
        billing:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionBilling'
        success_url:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsSuccessUrl'
        failure_url:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsFailureUrl'
        payment_type:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionPaymentType'
        billing_descriptor:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsBillingDescriptor'
        reference:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesReference'
        customer:
          description: The customer's details.
          allOf:
            - $ref: '#/components/schemas/PaymentSessionCustomer'
        shipping:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionShipping'
        items:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsItems'
        3ds:
          allOf:
            - $ref: '#/components/schemas/PaymentSessions3DS'
        ip_address:
          deprecated: true
          description: The Customer's IP address. Only IPv4 and IPv6 addresses are accepted.
          allOf:
            - $ref: '#/components/schemas/IPAddress'
        payment_method_configuration:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionsPaymentMethodConfigurationBase'
        recipient:
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesRecipient'
        instruction:
          type: object
          description: Details about the payment instruction.
          properties:
            purpose:
              allOf:
                - $ref: '#/components/schemas/Purpose'
        processing_channel_id:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionProcessingChannelId'
        metadata:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionMetadata'
        sender:
          description: The sender of the payment.
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesSender'
        capture:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionCapture/properties/capture'
        capture_on:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionCapture/properties/capture_on'
        processing:
          description: Use the processing object to influence or override the data sent during card processing
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentInterfacesProcessingBase'
        
    PhoneNumber:
      type: object
      description: A phone number
      properties:
        country_code:
          type: string
          description: The international <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">country calling code</a>. Required if `source.type` is `tamara`.
          minLength: 1
          maxLength: 7
          example: '+1'
        number:
          type: string
          description: The phone number. Required if `source.type` is `tamara`.
          minLength: 6
          maxLength: 25
          example: 415 555 2671
    EEACompanyFull2-0:
      type: object
      title: Create & Submit EEA Company (V2.0)
      required:
        - reference
        - company
        - contact_details
        - profile
        - documents
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity.
        status:
          type: string
          readOnly: true
        is_draft:
          type: boolean
          description: >-
            Specifies whether the sub-entity details are in draft.
      
      
            Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
          writeOnly: true
        profile:
          title: Profile
          required:
          - urls
          - mccs
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\//\S{2,293}$
                type: string
                description: The URL of the company's website.
                format: uri
              description: A collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                description: The merchant category code (4-digit ISO 18245).
              description: Select the categories that most closely describe the business
            default_holding_currency:
              title: Main currency
              description: The default holding currency code (iso-4217)
              format: iso-4217
            holding_currencies:
              title: Currencies
              items:
                title: Currency
                type: string
                enum:
                - AED
                - AUD
                - CAD
                - CHF
                - CZK
                - DKK
                - EUR
                - GBP
                - HKD
                - JPY
                - NOK
                - NZD
                - PLN
                - RON
                - SEK
                - SGD
                - USD
                - ZAR
                description: The currency code (iso-4217)
              description: Incoming funds are held in your selected currencies
              default:
              - EUR
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          required:
          - phone
          - email_addresses
          type: object
          properties:
            phone:
              title: Phone
              required:
              - number
              type: object
              properties:
                number:
                  title: Phone number
                  maximum: 9999999999999999
                  minimum: 10000000
                  maxLength: 16
                  minLength: 8
                  pattern: ^[1-9][0-9]{7,15}$
                  description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
              description: The phone number of the sub-entity.
            email_addresses:
              required:
              - primary
              type: object
              properties:
                primary:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: Email addresses for this sub-entity.
            invitee:
              title: Invitee
              type: object
              properties:
                email:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: The details of the user responsible for onboarding the sub-entity.
          description: Contact details of this sub-entity.
        capabilities:
          title: Capabilities
          type: object
          description: The capabilities of the entity.
          readOnly: true
        requirements_due:
          title: Requirements Due
          minItems: 0
          type: array
          items:
            title: Requirements due entry
            type: object
            properties:
              field:
                title: Field
                type: string
                description: The field that is needs to be addressed.
              reason:
                title: Reason
                type: string
                description: The reason behind the field needing attention.
            description: A list of fields which require attention
            readOnly: true
          description: List of requirements due in order to be onboarded.
          readOnly: true
        instruments:
          type: array
          items:
            type: object
          readOnly: true
        company:
          title: Company
          required:
          - legal_name
          - trading_name
          - registered_address
          - principal_address
          - representatives
          - business_registration_number
          - business_type
          - financial_details
          type: object
          properties:
            legal_name:
              title: Legal name
              maxLength: 300
              minLength: 2
              type: string
              description: The legal name of the sub-entity.
            trading_name:
              title: Trading name
              maxLength: 300
              minLength: 2
              type: string
              description: The trading name of the sub-entity, also referred to as 'doing business as'.
            business_registration_number:
              title: Registration Number
              maxLength: 39
              minLength: 2
              description: The sub-entity's Business Registration Number. This can be a Commercial Registration or Ministry of Commerce certificate number, or any other equivalent registration number. For sub-entities based in France, this must be a SIRET number.
            principal_address:
              title: Principal Address
              required:
              - address_line1
              - city
              - zip
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: State
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                zip:
                  title: Postal code
                  maxLength: 16
                  minLength: 1
                  pattern: ^[a-zA-Z0-9-\s]+$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The primary location of the company where business is performed.
            registered_address:
              title: Registered Address
              required:
              - address_line1
              - city
              - zip
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: State
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                zip:
                  title: EU Postal Code
                  maxLength: 16
                  minLength: 1
                  pattern: ^[a-zA-Z0-9]+[-\s]?[a-zA-Z0-9]+$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The registered address of the company.
            representatives:
              title: Representative List
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Representative
                required:
                - first_name
                - last_name
                - address
                - date_of_birth
                - place_of_birth
                - roles
                - documents
                type: object
                properties:
                  id:
                    maxLength: 30
                    minLength: 30
                    pattern: ^rep_[a-z0-9]{26}$
                    description: The representative's id.
                  first_name:
                    title: First name
                    maxLength: 50
                    minLength: 2
                    type: string
                    description: The representative's first name.
                  middle_name:
                    title: Middle name
                    maxLength: 50
                    minLength: 2
                    type: string
                    description: The representative's middle name. Required if appears in official docs
                  last_name:
                    title: Last name
                    maxLength: 50
                    minLength: 2
                    type: string
                    description: The representative's last name.
                  date_of_birth:
                    title: Date of birth
                    required:
                    - day
                    - month
                    - year
                    type: object
                    properties:
                      day:
                        maximum: 31
                        minimum: 1
                        type: integer
                        description: The calendar day of the month they were born.
                      month:
                        maximum: 12
                        minimum: 1
                        type: integer
                        description: The month of the year they were born.
                      year:
                        maximum: 2999
                        minimum: 1900
                        type: integer
                        description: The year they were born.
                    description: The date of birth of the person according to the Gregorian calendar.
                  phone:
                    title: Phone
                    required:
                    - number
                    type: object
                    properties:
                      number:
                        title: Phone number
                        maximum: 9999999999999999
                        minimum: 10000000
                        maxLength: 16
                        minLength: 8
                        pattern: ^[1-9][0-9]{7,15}$
                        description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                    description: The phone number of the sub-entity.
                  address:
                    title: Address
                    required:
                    - country
                    - address_line1
                    - city
                    - zip
                    type: object
                    properties:
                      address_line1:
                        title: Address line 1
                        maxLength: 300
                        minLength: 1
                        pattern: '\S'
                        type: string
                        description: The first line of the address.
                      address_line2:
                        title: Address line 2
                        maxLength: 300
                        description: The second line of the address.
                      city:
                        title: City
                        maxLength: 300
                        minLength: 2
                        type: string
                        description: The address city.
                      state:
                        title: State
                        maxLength: 300
                        minLength: 1
                        pattern: '\S'
                        type: string
                        description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                      zip:
                        title: Postal code
                        maxLength: 16
                        minLength: 1
                        pattern: ^[a-zA-Z0-9-\s]+$
                        type: string
                        description: The address zip/postal code.
                      country:
                        title: Country
                        maxLength: 2
                        minLength: 2
                        pattern: '[a-zA-Z]{2}'
                        type: string
                        description: The country code (iso-3166-1 alpha-2)
                        format: iso-3166-1-alpha-2
                    description: The representative's address.
                  place_of_birth:
                    title: Place of Birth
                    required:
                    - country
                    properties:
                      country:
                        title: Country
                        maxLength: 2
                        minLength: 2
                        pattern: '[a-zA-Z]{2}'
                        type: string
                        description: The country code (iso-3166-1 alpha-2)
                        format: iso-3166-1-alpha-2
                    description: The place of birth of the person.
                  roles:
                    title: Roles within company
                    maxItems: 2
                    minItems: 1
                    uniqueItems: true
                    type: array
                    items:
                      title: Representative Role
                      enum:
                      - ubo
                      - legal_representative
                      type: string
                      description: The representative's roles within the company
                    description: The individual's roles within the company
                  documents:
                    title: Document
                    required:
                    - identity_verification
                    type: object
                    properties:
                      identity_verification:
                        title: Document
                        required:
                        - type
                        - front
                        type: object
                        properties:
                          type:
                            title: Document type
                            enum:
                            - passport
                            - national_identity_card
                            - driving_license
                            - citizen_card
                            - residence_permit
                            - electoral_id
                            type: string
                            description: The type of document used for identity verification
                          front:
                            title: Front
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the front side of the document as represented within Checkout.com systems.
                          back:
                            title: Back
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the back side of the document as represented within Checkout.com systems.
                        description: The document to use to confirm the individual's identity.
                    description: A legal document used to verify identity
                description: Information about representatives of this company.
              description: Information about representatives of this company.
            financial_details:
              title: Processing Details
              required:
              - annual_processing_volume
              - average_transaction_value
              - highest_transaction_value
              type: object
              properties:
                annual_processing_volume:
                  title: Estimated annual processing volume
                  minimum: 0
                  type: integer
                  description: The estimated annual processing volume. In minor units without decimals.
                average_transaction_value:
                  title: Average sales price
                  minimum: 0
                  type: integer
                  description: The expected average transaction value. In minor units without decimals.
                highest_transaction_value:
                  title: Highest transaction value
                  minimum: 0
                  type: integer
                  description: The expected highest transaction value. In minor units without decimals.
                currency:
                  title: Currency
                  enum:
                  - EUR
                  type: string
                  description: The currency used for the processing details provided.
              description: Seller financial questions and supporting documents.
            business_type:
              title: Business structure
              enum:
              - general_partnership
              - limited_partnership
              - public_limited_company
              - limited_company
              - professional_association
              - unincorporated_association
              - auto_entrepreneur
              type: string
              description: The legal type of the company
            date_of_incorporation:
              title: Date of Incorporation
              required:
              - month
              - year
              type: object
              properties:
                day:
                  maximum: 31
                  minimum: 1
                  type: integer
                  description: The day of the month the company was incorporated.
                month:
                  maximum: 12
                  minimum: 1
                  type: integer
                  description: The month the company was incorporated.
                year:
                  maximum: 2999
                  minimum: 1500
                  type: integer
                  description: The year the company was incorporated.
              description: The date the company was incorporated.
          description: Information about the company represented by the sub-entity.
        documents:
          title: Documents
          required:
          - company_verification
          type: object
          properties:
            company_verification:
              title: Company Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - incorporation_document
                  type: string
                  description: The type of document used for company verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Certified by a power of attorney within the last 3 months
            bank_verification:
              title: Bank Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - bank_statement
                  type: string
                  description: The type of document being used as bank verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A document showing transactions from last 3 months
            financial_verification:
              title: Financial Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - financial_statement
                  type: string
                  description: The type of the file.
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Financial statement document becomes mandatory depending on the answer provided for annual_processing_volume. The status of your sub-entity will change to requirements_due stating when this is necessary.
          description: The documents used to support the identity of a company.
    EEACompanyFull3-0:
      type: object
      title: Create & Submit EEA Company (V3.0)
      required:
      - reference
      - company
      - profile
      - documents
      - processing_details
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity.
        status:
          type: string
          readOnly: true
        is_draft:
          type: boolean
          description: >-
            Specifies whether the sub-entity details are in draft.
      
      
            Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
          writeOnly: true
        profile:
          title: Profile
          required:
          - urls
          - mccs
          - default_holding_currency
          - holding_currencies
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\//\S{2,293}$
                type: string
                description: The URL of the company's website.
                format: uri
              description: A collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                description: The merchant category code (4-digit ISO 18245).
              description: Select the categories that most closely describe the business
            default_holding_currency:
              title: Main currency
              description: The default holding currency code (iso-4217)
              format: iso-4217
            holding_currencies:
              title: Currencies
              type: array
              minItems: 1
              items:
                title: Currency
                type: string
                enum:
                - AED
                - AUD
                - CAD
                - CHF
                - CZK
                - DKK
                - EUR
                - GBP
                - HKD
                - JPY
                - NOK
                - NZD
                - PLN
                - RON
                - SEK
                - SGD
                - USD
                - ZAR
                description: The currency code (iso-4217)
              description: Incoming funds are held in your selected currencies
              default:
              - EUR
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          type: object
          properties:
            phone:
              title: Phone number
              required:
              - country_code
              - number
              type: object
              properties:
                country_code:
                  title: Country calling code
                  enum:
                  - GR
                  - NL
                  - BE
                  - FR
                  - ES
                  - PT
                  - LU
                  - IE
                  - IS
                  - MT
                  - CY
                  - FI
                  - BG
                  - HU
                  - LT
                  - LV
                  - EE
                  - AD
                  - HR
                  - SI
                  - IT
                  - RO
                  - CZ
                  - SK
                  - LI
                  - AT
                  - DK
                  - SE
                  - NO
                  - PL
                  - DE
                  type: string
                  description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                number:
                  title: Phone number
                  maxLength: 13
                  minLength: 6
                  pattern: ^[0-9]{6,13}$
                  type: string
                  description: The phone number without the country calling code
              description: Phone number
            email_addresses:
              required:
              - primary
              type: object
              properties:
                primary:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: Email addresses for this sub-entity.
            invitee:
              title: Invitee
              type: object
              properties:
                email:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: The details of the user responsible for onboarding the sub-entity.
          description: Contact details of this sub-entity.
        capabilities:
          title: Capabilities
          type: object
          description: The capabilities of the entity.
          readOnly: true
        requirements_due:
          title: Requirements Due
          minItems: 0
          type: array
          items:
            title: Requirements due entry
            type: object
            properties:
              field:
                title: Field
                type: string
                description: The field that is needs to be addressed.
              reason:
                title: Reason
                type: string
                description: The reason behind the field needing attention.
              message:
                title: Message
                type: string
                description: A more descriptive message.
            description: A list of fields which require attention
            readOnly: true
          description: List of requirements due in order to be onboarded.
          readOnly: true
        company:
          title: Company
          required:
          - legal_name
          - trading_name
          - business_registration_number
          - date_of_incorporation
          - principal_address
          - registered_address
          - representatives
          - business_type
          type: object
          properties:
            legal_name:
              title: Legal name
              maxLength: 300
              minLength: 2
              type: string
              description: The legal name of the sub-entity.
            trading_name:
              title: Trading name
              maxLength: 300
              minLength: 2
              type: string
              description: The trading name of the sub-entity, also referred to as 'doing business as'.
            business_registration_number:
              title: Registration Number
              maxLength: 39
              minLength: 2
              description: The sub-entity's Business Registration Number. This can be a Commercial Registration or Ministry of Commerce certificate number, or any other equivalent registration number. For sub-entities based in France, this must be a SIRET number.
            date_of_incorporation:
              title: Date of Incorporation
              required:
              - month
              - year
              type: object
              properties:
                day:
                  maximum: 31
                  minimum: 1
                  type: integer
                  description: The day of the month the company was incorporated.
                month:
                  maximum: 12
                  minimum: 1
                  type: integer
                  description: The month the company was incorporated.
                year:
                  maximum: 2999
                  minimum: 1500
                  type: integer
                  description: The year the company was incorporated.
              description: The date the company was incorporated.
            regulatory_licence_number:
              title: Regulatory Licence Number
              maxLength: 32
              minLength: 4
              pattern: ^[a-zA-Z0-9\-]+$
              description: The regulatory licence number of the company.
            principal_address:
              title: Principal Address
              required:
              - address_line1
              - city
              - zip
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: State
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                zip:
                  title: EU Postal Code
                  maxLength: 16
                  minLength: 1
                  pattern: ^[a-zA-Z0-9]+[-\s]?[a-zA-Z0-9]+$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The primary location of the company where business is performed.
            registered_address:
              title: Registered Address
              required:
              - address_line1
              - city
              - zip
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: State
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                zip:
                  title: EU Postal Code
                  maxLength: 16
                  minLength: 1
                  pattern: ^[a-zA-Z0-9]+[-\s]?[a-zA-Z0-9]+$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The registered address of the company.
            representatives:
              title: Representative List
              maxItems: 25
              minItems: 1
              type: array
              items:
                title: Representative
                type: object
                oneOf:
                - title: Person of Interest
                  required:
                  - individual
                  - roles
                  type: object
                  properties:
                    id:
                      maxLength: 30
                      minLength: 30
                      pattern: ^rep_[a-z0-9]{26}$
                      description: The representative's id.
                    individual:
                      title: Individual
                      type: object
                      allOf:
                      - title: Individual
                        required:
                        - first_name
                        - last_name
                        - date_of_birth
                        - place_of_birth
                        - address
                        type: object
                        properties:
                          first_name:
                            title: First name
                            maxLength: 50
                            minLength: 2
                            type: string
                            description: The representative's first name.
                          middle_name:
                            title: Middle name
                            maxLength: 50
                            minLength: 2
                            type: string
                            description: The representative's middle name. Required if appears in official docs
                          last_name:
                            title: Last name
                            maxLength: 50
                            minLength: 2
                            type: string
                            description: The representative's last name.
                          date_of_birth:
                            title: Date of birth
                            required:
                            - day
                            - month
                            - year
                            type: object
                            properties:
                              day:
                                maximum: 31
                                minimum: 1
                                type: integer
                                description: The calendar day of the month they were born.
                              month:
                                maximum: 12
                                minimum: 1
                                type: integer
                                description: The month of the year they were born.
                              year:
                                maximum: 2999
                                minimum: 1900
                                type: integer
                                description: The year they were born.
                            description: The date of birth of the person according to the Gregorian calendar.
                          place_of_birth:
                            title: Place of Birth
                            required:
                            - country
                            properties:
                              country:
                                title: Country
                                maxLength: 2
                                minLength: 2
                                pattern: '[a-zA-Z]{2}'
                                type: string
                                description: The country code (iso-3166-1 alpha-2)
                                format: iso-3166-1-alpha-2
                            description: The place of birth of the person.
                          national_id_number:
                            title: Social security number (SSN or ITIN) - US Residents Only
                            maxLength: 9
                            minLength: 9
                            pattern: ^\d{9}$
                            description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                          email_address:
                            title: Email
                            description: The main email address for this sub-entity.
                            format: email
                          phone:
                            title: Phone number
                            required:
                            - country_code
                            - number
                            type: object
                            properties:
                              country_code:
                                title: Country calling code
                                enum:
                                - AF
                                - AL
                                - DZ
                                - AS
                                - AD
                                - AO
                                - AI
                                - AG
                                - AR
                                - AM
                                - AW
                                - AU
                                - AT
                                - AZ
                                - BS
                                - BH
                                - BD
                                - BB
                                - BY
                                - BE
                                - BZ
                                - BJ
                                - BM
                                - BT
                                - BO
                                - BA
                                - BW
                                - BR
                                - BN
                                - BG
                                - BF
                                - BI
                                - CV
                                - KH
                                - CM
                                - CA
                                - KY
                                - CF
                                - TD
                                - CL
                                - CN
                                - CO
                                - KM
                                - CD
                                - CG
                                - CK
                                - CR
                                - HR
                                - CU
                                - CW
                                - CY
                                - CZ
                                - DK
                                - DJ
                                - DM
                                - DO
                                - EC
                                - EG
                                - SV
                                - GQ
                                - ER
                                - EE
                                - SZ
                                - ET
                                - FO
                                - FJ
                                - FI
                                - FR
                                - GF
                                - PF
                                - GA
                                - GM
                                - GE
                                - DE
                                - GH
                                - GI
                                - GR
                                - GL
                                - GD
                                - GP
                                - GU
                                - GT
                                - GG
                                - GN
                                - GW
                                - GY
                                - HT
                                - HN
                                - HK
                                - HU
                                - IS
                                - IN
                                - ID
                                - IR
                                - IQ
                                - IE
                                - IM
                                - IL
                                - IT
                                - JM
                                - JP
                                - JE
                                - JO
                                - KZ
                                - KE
                                - KI
                                - KP
                                - KR
                                - KW
                                - KG
                                - LA
                                - LV
                                - LB
                                - LS
                                - LR
                                - LY
                                - LI
                                - LT
                                - LU
                                - MO
                                - MG
                                - MW
                                - MY
                                - MV
                                - ML
                                - MT
                                - MH
                                - MQ
                                - MR
                                - MU
                                - MX
                                - FM
                                - MD
                                - MC
                                - MN
                                - ME
                                - MS
                                - MA
                                - MZ
                                - MM
                                - NA
                                - NR
                                - NP
                                - NL
                                - NC
                                - NZ
                                - NI
                                - NE
                                - NG
                                - NU
                                - NF
                                - MK
                                - MP
                                - NO
                                - OM
                                - PK
                                - PW
                                - PA
                                - PG
                                - PY
                                - PE
                                - PH
                                - PL
                                - PT
                                - PR
                                - QA
                                - RE
                                - RO
                                - RU
                                - RW
                                - BL
                                - SH
                                - KN
                                - LC
                                - PM
                                - VC
                                - WS
                                - SM
                                - ST
                                - SA
                                - SN
                                - RS
                                - SC
                                - SL
                                - SG
                                - BQ
                                - SX
                                - SK
                                - SI
                                - SB
                                - SO
                                - ZA
                                - GS
                                - SS
                                - ES
                                - LK
                                - SD
                                - SR
                                - SE
                                - CH
                                - SY
                                - TW
                                - TJ
                                - TZ
                                - TH
                                - TL
                                - TG
                                - TK
                                - TO
                                - TT
                                - TN
                                - TR
                                - TM
                                - TC
                                - TV
                                - UG
                                - UA
                                - AE
                                - GB
                                - US
                                - UY
                                - UZ
                                - VU
                                - VA
                                - VE
                                - VN
                                - VG
                                - VI
                                - WF
                                - EH
                                - YE
                                - ZM
                                - ZW
                                type: string
                                description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                              number:
                                title: Phone number
                                maxLength: 16
                                minLength: 5
                                pattern: ^[0-9]{5,16}$
                                type: string
                                description: The phone number without the country calling code
                            description: Phone number
                          address:
                            title: Address
                            required:
                            - address_line1
                            - city
                            - zip
                            - country
                            type: object
                            properties:
                              address_line1:
                                title: Address line 1
                                maxLength: 300
                                minLength: 1
                                pattern: '\S'
                                type: string
                                description: The first line of the address.
                              address_line2:
                                title: Address line 2
                                maxLength: 300
                                description: The second line of the address.
                              city:
                                title: City
                                maxLength: 300
                                minLength: 2
                                type: string
                                description: The address city.
                              state:
                                title: State
                                maxLength: 300
                                minLength: 1
                                pattern: '\S'
                                type: string
                                description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                              zip:
                                title: Postal code
                                maxLength: 16
                                minLength: 1
                                pattern: ^[a-zA-Z0-9-\s]+$
                                type: string
                                description: The address zip/postal code.
                              country:
                                title: Country
                                maxLength: 2
                                minLength: 2
                                pattern: '[a-zA-Z]{2}'
                                type: string
                                description: The country code (iso-3166-1 alpha-2)
                                format: iso-3166-1-alpha-2
                            description: The representative's address.
                        description: Information about the individual representing the sub-entity.
                      description: Information about the individual representing the sub-entity.
                    company_position:
                      title: Position within Company
                      enum:
                      - ceo
                      - cfo
                      - coo
                      - managing_member
                      - general_partner
                      - president
                      - vice_president
                      - treasurer
                      - other_senior_management
                      - other_executive_officer
                      - other_non_executive_non_senior
                      type: string
                      description: The position of the representative within the company.
                    roles:
                      title: Roles within company
                      maxItems: 10
                      minItems: 1
                      uniqueItems: true
                      type: array
                      items:
                        title: Representative Role
                        enum:
                        - ubo
                        - legal_representative
                        - authorised_signatory
                        - control_person
                        type: string
                        description: The representative's role
                      description: The individual's roles within the company
                    ownership_percentage:
                      title: Percentage of Ownership
                      maximum: 100
                      minimum: 25
                      type: integer
                      description: The percentage ownership of the UBO or controlling company (required when over 25%)
                    documents:
                      title: Documents
                      type: object
                      properties:
                        identity_verification:
                          title: Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                              type: string
                              description: The type of document used for identity verification
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                            back:
                              title: Back
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the back side of the document as represented within Checkout.com systems.
                          description: The document to use to confirm the individual's identity.
                        certified_authorised_signatory:
                          title: Certified Authorised Signatory Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - power_of_attorney
                              type: string
                              description: The type of document.
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                          description: Required when the legal representative or other role owner is not registered on certificate of incorporation
                      additionalProperties: false
                      description: Verification documents for the individual representative
                  description: Personal information about the individual representing the sub-entity.
                - title: Controlling Company
                  required:
                  - company
                  type: object
                  properties:
                    id:
                      maxLength: 30
                      minLength: 30
                      pattern: ^rep_[a-z0-9]{26}$
                      description: The representative's id.
                    company:
                      required:
                      - legal_name
                      - trading_name
                      - registered_address
                      type: object
                      properties:
                        legal_name:
                          title: Legal name
                          maxLength: 300
                          minLength: 2
                          type: string
                          description: The legal name of the sub-entity.
                        trading_name:
                          title: Trading name
                          maxLength: 300
                          minLength: 2
                          type: string
                          description: The trading name of the sub-entity, also referred to as 'doing business as'.
                        registered_address:
                          title: Address
                          required:
                          - country
                          type: object
                          properties:
                            address_line1:
                              title: Address line 1
                              maxLength: 300
                              minLength: 1
                              pattern: '\S'
                              type: string
                              description: The first line of the address.
                            address_line2:
                              title: Address line 2
                              maxLength: 300
                              description: The second line of the address.
                            city:
                              title: City
                              maxLength: 300
                              minLength: 2
                              type: string
                              description: The address city.
                            state:
                              title: State
                              maxLength: 300
                              minLength: 1
                              pattern: '\S'
                              type: string
                              description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                            zip:
                              title: Postal code
                              maxLength: 16
                              minLength: 1
                              pattern: ^[a-zA-Z0-9-\s]+$
                              type: string
                              description: The address zip/postal code.
                            country:
                              title: Country
                              maxLength: 2
                              minLength: 2
                              pattern: '[a-zA-Z]{2}'
                              type: string
                              description: The country code (iso-3166-1 alpha-2)
                              format: iso-3166-1-alpha-2
                          description: The representative's address.
                    ownership_percentage:
                      title: Percentage of Ownership
                      maximum: 100
                      minimum: 25
                      type: integer
                      description: The percentage ownership of the UBO or controlling company (required when over 25%)
                  description: Information about the controlling company
              description: Information about representatives of this company.
            business_type:
              title: Business type
              enum:
              - individual_or_sole_proprietorship
              - limited_company
              - public_limited_company
              - limited_partnership
              - general_partnership
              - government_agency
              - non_profit_entity
              - trust
              - club_or_society
              - unincorporated_association
              type: string
              description: The legal type of the company
          description: Information about the company represented by the sub-entity.
        processing_details:
          type: object
          allOf:
          - title: Processing Details
            required:
            - settlement_country
            - target_countries
            - annual_processing_volume
            - average_transaction_value
            - highest_transaction_value
            - currency
            type: object
            properties:
              settlement_country:
                title: Destination of funds
                maxLength: 2
                minLength: 2
                pattern: '[a-zA-Z]{2}'
                type: string
                description: The country code (iso-3166-1 alpha-2) where the settlement bank account is located
                format: iso-3166-1-alpha-2
              target_countries:
                title: Target countries
                maxItems: 10
                minItems: 1
                type: array
                items:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
                description: Target country codes (iso-3166-1 alpha-2) with more than 10% expected volume processing with Checkout
              annual_processing_volume:
                title: Estimated annual processing volume
                minimum: 0
                type: integer
                description: The estimated annual processing volume. In minor units without decimals.
              average_transaction_value:
                title: Average sales price
                minimum: 0
                type: integer
                description: The expected average transaction value. In minor units without decimals.
              highest_transaction_value:
                title: Highest transaction value
                minimum: 0
                type: integer
                description: The expected highest transaction value. In minor units without decimals.
              currency:
                title: Currency
                enum:
                - EUR
                type: string
                description: The currency used for the processing details provided.
        documents:
          title: Documents
          required:
          - company_verification
          - articles_of_association
          - shareholder_structure
          - bank_verification
          type: object
          properties:
            company_verification:
              title: Company Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - incorporation_document
                  type: string
                  description: The type of document used for company verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Certified by a power of attorney within the last 3 months
            articles_of_association:
              title: Memorandum or Articles of Association
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - memorandum_of_association
                  - articles_of_association
                  type: string
                  description: The type of document used for company verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Memorandum or Articles of Association document
            bank_verification:
              title: Bank Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - bank_statement
                  type: string
                  description: The type of document being used as bank verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A document showing transactions from last 3 months
            shareholder_structure:
              title: Shareholder Structure
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - certified_shareholder_structure
                  type: string
                  description: The type of document.
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Shareholder structure chart (including % of shares) certified by a competent authority individual and dated within last 3 months
            proof_of_legality:
              title: Proof of Legality
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - proof_of_legality
                  type: string
                  description: The type of document used for proof of legality
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A regulatory licence document required for the company to operate (when applicable)
            proof_of_principal_address:
              title: Address Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - proof_of_address
                  type: string
                  description: The type of document being used as address verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Proof of principal place of business
            additional_document1:
              title: Additional Documentation
              required:
              - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document2:
              title: Additional Documentation
              required:
              - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document3:
              title: Additional Documentation
              required:
              - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
          description: The documents used to support the verification of company details.
    EEACompanyLite2-0:
      type: object
      allOf:
      - title: Create & Submit regulated EEA Company (V2.0)
        required:
        - reference
        - company
        - contact_details
        - profile
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 10000000
                    maxLength: 16
                    minLength: 8
                    pattern: ^[1-9][0-9]{7,15}$
                    description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                description: The phone number of the sub-entity.
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: Email addresses for this sub-entity.
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: The details of the user responsible for onboarding the sub-entity.
            description: Contact details of this sub-entity.
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          company:
            title: Company (V2.0)
            required:
            - legal_name
            - trading_name
            - registered_address
            - principal_address
            - representatives
            type: object
            properties:
              legal_name:
                title: Legal name
                maxLength: 300
                minLength: 2
                type: string
                description: The legal name of the sub-entity.
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              business_registration_number:
                title: Registration Number
                maxLength: 39
                minLength: 2
                description: The sub-entity's Business Registration Number. This can be a Commercial Registration or Ministry of Commerce certificate number, or any other equivalent registration number. For sub-entities based in France, this must be a SIRET number.
              principal_address:
                title: Principal Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: EU Postal Code
                    maxLength: 16
                    minLength: 1
                    pattern: ^[a-zA-Z0-9]+[-\s]?[a-zA-Z0-9]+$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The primary location of the company where business is performed.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: EU Postal Code
                    maxLength: 16
                    minLength: 1
                    pattern: ^[a-zA-Z0-9]+[-\s]?[a-zA-Z0-9]+$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
              representatives:
                title: Representative List
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Representative
                  required:
                  - first_name
                  - last_name
                  - address
                  type: object
                  properties:
                    id:
                      maxLength: 30
                      minLength: 30
                      pattern: ^rep_[a-z0-9]{26}$
                      description: The representative's id.
                    first_name:
                      title: First name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's first name.
                    middle_name:
                      title: Middle name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's middle name. Required if appears in official docs
                    last_name:
                      title: Last name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's last name.
                    documents:
                      title: Document
                      required:
                      - identity_verification
                      type: object
                      properties:
                        identity_verification:
                          title: Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                              type: string
                              description: The type of document used for identity verification
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                            back:
                              title: Back
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the back side of the document as represented within Checkout.com systems.
                          description: The document to use to confirm the individual's identity.
                      description: A legal document used to verify identity
                    date_of_birth:
                      title: Date of birth
                      required:
                      - day
                      - month
                      - year
                      type: object
                      properties:
                        day:
                          maximum: 31
                          minimum: 1
                          type: integer
                          description: The calendar day of the month they were born.
                        month:
                          maximum: 12
                          minimum: 1
                          type: integer
                          description: The month of the year they were born.
                        year:
                          maximum: 2999
                          minimum: 1900
                          type: integer
                          description: The year they were born.
                      description: The date of birth of the person according to the Gregorian calendar.
                    phone:
                      title: Phone
                      required:
                      - number
                      type: object
                      properties:
                        number:
                          title: Phone number
                          maximum: 9999999999999999
                          minimum: 10000000
                          maxLength: 16
                          minLength: 8
                          pattern: ^[1-9][0-9]{7,15}$
                          description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                      description: The phone number of the sub-entity.
                    address:
                      title: Address
                      required:
                      - country
                      type: object
                      properties:
                        address_line1:
                          title: Address line 1
                          maxLength: 300
                          minLength: 1
                          pattern: '\S'
                          type: string
                          description: The first line of the address.
                        address_line2:
                          title: Address line 2
                          maxLength: 300
                          description: The second line of the address.
                        city:
                          title: City
                          maxLength: 300
                          minLength: 2
                          type: string
                          description: The address city.
                        state:
                          title: State
                          maxLength: 300
                          minLength: 1
                          pattern: '\S'
                          type: string
                          description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                        zip:
                          title: Postal code
                          maxLength: 16
                          minLength: 1
                          pattern: ^[a-zA-Z0-9-\s]+$
                          type: string
                          description: The address zip/postal code.
                        country:
                          title: Country
                          maxLength: 2
                          minLength: 2
                          pattern: '[a-zA-Z]{2}'
                          type: string
                          description: The country code (iso-3166-1 alpha-2)
                          format: iso-3166-1-alpha-2
                      description: The representative's address.
                    place_of_birth:
                      title: Place of Birth
                      required:
                      - country
                      properties:
                        country:
                          title: Country
                          maxLength: 2
                          minLength: 2
                          pattern: '[a-zA-Z]{2}'
                          type: string
                          description: The country code (iso-3166-1 alpha-2)
                          format: iso-3166-1-alpha-2
                      description: The place of birth of the person.
                    roles:
                      title: Roles within company
                      maxItems: 2
                      minItems: 1
                      uniqueItems: true
                      type: array
                      items:
                        title: Representative Role
                        enum:
                        - ubo
                        - legal_representative
                        type: string
                        description: The representative's roles within the company
                      description: The individual's roles within the company
                  description: Information about representatives of this company.
                description: Information about representatives of this company.
              financial_details:
                title: Processing Details
                type: object
                properties:
                  annual_processing_volume:
                    title: Estimated annual processing volume
                    minimum: 0
                    type: integer
                    description: The estimated annual processing volume. In minor units without decimals.
                  average_transaction_value:
                    title: Average sales price
                    minimum: 0
                    type: integer
                    description: The expected average transaction value. In minor units without decimals.
                  highest_transaction_value:
                    title: Highest transaction value
                    minimum: 0
                    type: integer
                    description: The expected highest transaction value. In minor units without decimals.
                  currency:
                    title: Currency
                    enum:
                    - EUR
                    type: string
                    description: The currency used for the processing details provided.
                description: Seller financial questions and supporting documents.
              business_type:
                title: Business structure
                enum:
                - general_partnership
                - limited_partnership
                - public_limited_company
                - limited_company
                - professional_association
                - unincorporated_association
                - auto_entrepreneur
                type: string
                description: The legal type of the company
          documents:
            title: Documents
            type: object
            properties:
              company_verification:
                title: Company Verification
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - incorporation_document
                    type: string
                    description: The type of document used for company verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                description: Certified by a power of attorney within the last 3 months
              bank_verification:
                title: Bank Verification
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - bank_statement
                    type: string
                    description: The type of document being used as bank verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                description: A document showing transactions from last 3 months
              financial_verification:
                title: Financial Verification
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - financial_statement
                    type: string
                    description: The type of the file.
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                description: Financial statement document becomes mandatory depending on the answer provided for annual_processing_volume. The status of your sub-entity will change to requirements_due stating when this is necessary.
            description: The documents used to support the identity of a company.
    EEASoleTraderFull2-0:
      type: object
      allOf:
      - title: Create & Submit EEA Individual (V2.0)
        required:
        - reference
        - individual
        - contact_details
        - profile
        - documents
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
              default_holding_currency:
                title: Main currency
                description: The default holding currency code (iso-4217)
                format: iso-4217
              holding_currencies:
                title: Currencies
                items:
                  title: Currency
                  type: string
                  enum:
                  - AED
                  - AUD
                  - CAD
                  - CHF
                  - CZK
                  - DKK
                  - EUR
                  - GBP
                  - HKD
                  - JPY
                  - NOK
                  - NZD
                  - PLN
                  - RON
                  - SEK
                  - SGD
                  - USD
                  - ZAR
                  description: The currency code (iso-4217)
                description: Incoming funds are held in your selected currencies
                default:
                - EUR
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 10000000
                    maxLength: 16
                    minLength: 8
                    pattern: ^[1-9][0-9]{7,15}$
                    description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                description: The phone number of the sub-entity.
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: Email addresses for this sub-entity.
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: The details of the user responsible for onboarding the sub-entity.
            description: Contact details of this sub-entity.
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          individual:
            title: Individual
            required:
            - first_name
            - last_name
            - date_of_birth
            - place_of_birth
            - registered_address
            - trading_name
            type: object
            properties:
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              first_name:
                title: First name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's first name.
              middle_name:
                title: Middle name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's middle name. Required if appears in official docs
              last_name:
                title: Last name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's last name.
              date_of_birth:
                title: Date of birth
                required:
                - day
                - month
                - year
                type: object
                properties:
                  day:
                    maximum: 31
                    minimum: 1
                    type: integer
                    description: The calendar day of the month they were born.
                  month:
                    maximum: 12
                    minimum: 1
                    type: integer
                    description: The month of the year they were born.
                  year:
                    maximum: 2999
                    minimum: 1900
                    type: integer
                    description: The year they were born.
                description: The date of birth of the person according to the Gregorian calendar.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: EU Postal Code
                    maxLength: 16
                    minLength: 1
                    pattern: ^[a-zA-Z0-9]+[-\s]?[a-zA-Z0-9]+$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
              place_of_birth:
                title: Place of Birth
                required:
                - country
                properties:
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The place of birth of the person.
            description: Information about the individual represented by the sub-entity.
          documents:
            title: Documents
            required:
            - identity_verification
            type: object
            properties:
              identity_verification:
                title: Document
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - passport
                    - national_identity_card
                    - driving_license
                    - citizen_card
                    - residence_permit
                    - electoral_id
                    type: string
                    description: The type of document used for identity verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                  back:
                    title: Back
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the back side of the document as represented within Checkout.com systems.
                description: The document to use to confirm the individual's identity.
            description: A legal document used to verify identity.
    EEASoleTraderFull3-0:
      type: object
      title: Create & Submit EEA Sole Trader (V3.0)
      required:
        - reference
        - company
        - profile
        - contact_details
        - documents
        - processing_details
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity.
        status:
          type: string
          readOnly: true
        is_draft:
          type: boolean
          description: >-
            Specifies whether the sub-entity details are in draft.
      
      
            Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
          writeOnly: true
        profile:
          title: Profile
          required:
            - urls
            - mccs
            - default_holding_currency
            - holding_currencies
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\//\S{2,293}$
                type: string
                description: The URL of the company's website.
                format: uri
              description: A collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                description: The merchant category code (4-digit ISO 18245).
              description: Select the categories that most closely describe the business
            default_holding_currency:
              title: Main currency
              description: The default holding currency code (iso-4217)
              format: iso-4217
            holding_currencies:
              title: Currencies
              minItems: 1
              items:
                title: Currency
                type: string
                enum:
                  - AED
                  - AUD
                  - CAD
                  - CHF
                  - CZK
                  - DKK
                  - EUR
                  - GBP
                  - HKD
                  - JPY
                  - NOK
                  - NZD
                  - PLN
                  - RON
                  - SEK
                  - SGD
                  - USD
                  - ZAR
                description: The currency code (iso-4217)
              description: Incoming funds are held in your selected currencies
              default:
                - EUR
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          type: object
          properties:
            phone:
              title: Phone number
              required:
                - country_code
                - number
              type: object
              properties:
                country_code:
                  title: Country calling code
                  enum:
                    - GR
                    - NL
                    - BE
                    - FR
                    - ES
                    - PT
                    - LU
                    - IE
                    - IS
                    - MT
                    - CY
                    - FI
                    - BG
                    - HU
                    - LT
                    - LV
                    - EE
                    - AD
                    - HR
                    - SI
                    - IT
                    - RO
                    - CZ
                    - SK
                    - LI
                    - AT
                    - DK
                    - SE
                    - NO
                    - PL
                    - DE
                  type: string
                  description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                number:
                  title: Phone number
                  maxLength: 13
                  minLength: 6
                  pattern: ^[0-9]{6,13}$
                  type: string
                  description: The phone number without the country calling code
              description: Phone number
            email_addresses:
              required:
                - primary
              type: object
              properties:
                primary:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: Email addresses for this sub-entity.
            invitee:
              title: Invitee
              type: object
              properties:
                email:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: The details of the user responsible for onboarding the sub-entity.
          description: Contact details of this sub-entity.
        capabilities:
          title: Capabilities
          type: object
          description: The capabilities of the entity.
          readOnly: true
        requirements_due:
          title: Requirements Due
          minItems: 0
          type: array
          items:
            title: Requirements due entry
            type: object
            properties:
              field:
                title: Field
                type: string
                description: The field that is needs to be addressed.
              reason:
                title: Reason
                type: string
                description: The reason behind the field needing attention.
              message:
                title: Message
                type: string
                description: A more descriptive message.
            description: A list of fields which require attention
            readOnly: true
          description: List of requirements due in order to be onboarded.
          readOnly: true
        company:
          title: Business
          required:
            - trading_name
            - date_of_incorporation
            - principal_address
            - representatives
            - business_type
          type: object
          properties:
            trading_name:
              title: Trading name
              maxLength: 300
              minLength: 2
              type: string
              description: The trading name of the sub-entity, also referred to as 'doing business as'.
            date_of_incorporation:
              title: Date of Incorporation
              required:
                - month
                - year
              type: object
              properties:
                day:
                  maximum: 31
                  minimum: 1
                  type: integer
                  description: The day of the month the company was incorporated.
                month:
                  maximum: 12
                  minimum: 1
                  type: integer
                  description: The month the company was incorporated.
                year:
                  maximum: 2999
                  minimum: 1500
                  type: integer
                  description: The year the company was incorporated.
              description: The date the company was incorporated.
            principal_address:
              title: Principal Address
              required:
                - address_line1
                - city
                - zip
                - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: State
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                zip:
                  title: EU Postal Code
                  maxLength: 16
                  minLength: 1
                  pattern: ^[a-zA-Z0-9]+[-\s]?[a-zA-Z0-9]+$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The primary location where business is performed.
            representatives:
              title: Representative List
              maxItems: 1
              minItems: 1
              type: array
              items:
                title: Person of Interest
                required:
                  - individual
                  - roles
                  - documents
                type: object
                properties:
                  id:
                    maxLength: 30
                    minLength: 30
                    pattern: ^rep_[a-z0-9]{26}$
                    description: The representative's id.
                  individual:
                    title: Individual
                    type: object
                    required:
                      - first_name
                      - last_name
                      - date_of_birth
                      - place_of_birth
                      - address
                    properties:
                      first_name:
                        title: First name
                        maxLength: 50
                        minLength: 2
                        type: string
                        description: The representative's first name.
                      middle_name:
                        title: Middle name
                        maxLength: 50
                        minLength: 2
                        type: string
                        description: The representative's middle name. Required if appears in official docs
                      last_name:
                        title: Last name
                        maxLength: 50
                        minLength: 2
                        type: string
                        description: The representative's last name.
                      date_of_birth:
                        title: Date of birth
                        required:
                          - day
                          - month
                          - year
                        type: object
                        properties:
                          day:
                            maximum: 31
                            minimum: 1
                            type: integer
                            description: The calendar day of the month they were born.
                          month:
                            maximum: 12
                            minimum: 1
                            type: integer
                            description: The month of the year they were born.
                          year:
                            maximum: 2999
                            minimum: 1900
                            type: integer
                            description: The year they were born.
                        description: The date of birth of the person according to the Gregorian calendar.
                      place_of_birth:
                        title: Place of Birth
                        required:
                          - country
                        properties:
                          country:
                            title: Country
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            type: string
                            description: The country code (iso-3166-1 alpha-2)
                            format: iso-3166-1-alpha-2
                        description: The place of birth of the person.
                      national_id_number:
                        title: Social security number (SSN or ITIN) - US Residents Only
                        maxLength: 9
                        minLength: 9
                        pattern: ^\d{9}$
                        description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                      email_address:
                        title: Email
                        description: The representative's personal email address.
                        format: email
                      phone:
                        title: Phone number
                        required:
                          - country_code
                          - number
                        type: object
                        properties:
                          country_code:
                            title: Country calling code
                            enum:
                              - AF
                              - AL
                              - DZ
                              - AS
                              - AD
                              - AO
                              - AI
                              - AG
                              - AR
                              - AM
                              - AW
                              - AU
                              - AT
                              - AZ
                              - BS
                              - BH
                              - BD
                              - BB
                              - BY
                              - BE
                              - BZ
                              - BJ
                              - BM
                              - BT
                              - BO
                              - BA
                              - BW
                              - BR
                              - BN
                              - BG
                              - BF
                              - BI
                              - CV
                              - KH
                              - CM
                              - CA
                              - KY
                              - CF
                              - TD
                              - CL
                              - CN
                              - CO
                              - KM
                              - CD
                              - CG
                              - CK
                              - CR
                              - HR
                              - CU
                              - CW
                              - CY
                              - CZ
                              - DK
                              - DJ
                              - DM
                              - DO
                              - EC
                              - EG
                              - SV
                              - GQ
                              - ER
                              - EE
                              - SZ
                              - ET
                              - FO
                              - FJ
                              - FI
                              - FR
                              - GF
                              - PF
                              - GA
                              - GM
                              - GE
                              - DE
                              - GH
                              - GI
                              - GR
                              - GL
                              - GD
                              - GP
                              - GU
                              - GT
                              - GG
                              - GN
                              - GW
                              - GY
                              - HT
                              - HN
                              - HK
                              - HU
                              - IS
                              - IN
                              - ID
                              - IR
                              - IQ
                              - IE
                              - IM
                              - IL
                              - IT
                              - JM
                              - JP
                              - JE
                              - JO
                              - KZ
                              - KE
                              - KI
                              - KP
                              - KR
                              - KW
                              - KG
                              - LA
                              - LV
                              - LB
                              - LS
                              - LR
                              - LY
                              - LI
                              - LT
                              - LU
                              - MO
                              - MG
                              - MW
                              - MY
                              - MV
                              - ML
                              - MT
                              - MH
                              - MQ
                              - MR
                              - MU
                              - MX
                              - FM
                              - MD
                              - MC
                              - MN
                              - ME
                              - MS
                              - MA
                              - MZ
                              - MM
                              - NA
                              - NR
                              - NP
                              - NL
                              - NC
                              - NZ
                              - NI
                              - NE
                              - NG
                              - NU
                              - NF
                              - MK
                              - MP
                              - NO
                              - OM
                              - PK
                              - PW
                              - PA
                              - PG
                              - PY
                              - PE
                              - PH
                              - PL
                              - PT
                              - PR
                              - QA
                              - RE
                              - RO
                              - RU
                              - RW
                              - BL
                              - SH
                              - KN
                              - LC
                              - PM
                              - VC
                              - WS
                              - SM
                              - ST
                              - SA
                              - SN
                              - RS
                              - SC
                              - SL
                              - SG
                              - BQ
                              - SX
                              - SK
                              - SI
                              - SB
                              - SO
                              - ZA
                              - GS
                              - SS
                              - ES
                              - LK
                              - SD
                              - SR
                              - SE
                              - CH
                              - SY
                              - TW
                              - TJ
                              - TZ
                              - TH
                              - TL
                              - TG
                              - TK
                              - TO
                              - TT
                              - TN
                              - TR
                              - TM
                              - TC
                              - TV
                              - UG
                              - UA
                              - AE
                              - GB
                              - US
                              - UY
                              - UZ
                              - VU
                              - VA
                              - VE
                              - VN
                              - VG
                              - VI
                              - WF
                              - EH
                              - YE
                              - ZM
                              - ZW
                            type: string
                            description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                          number:
                            title: Phone number
                            maxLength: 16
                            minLength: 5
                            pattern: ^[0-9]{5,16}$
                            type: string
                            description: The phone number without the country calling code
                        description: Phone number
                      address:
                        title: Address
                        required:
                          - address_line1
                          - city
                          - zip
                          - country
                        type: object
                        properties:
                          address_line1:
                            title: Address line 1
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            type: string
                            description: The first line of the address.
                          address_line2:
                            title: Address line 2
                            maxLength: 300
                            description: The second line of the address.
                          city:
                            title: City
                            maxLength: 300
                            minLength: 2
                            type: string
                            description: The address city.
                          state:
                            title: State
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            type: string
                            description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                          zip:
                            title: Postal code
                            maxLength: 16
                            minLength: 1
                            pattern: ^[a-zA-Z0-9-\s]+$
                            type: string
                            description: The address zip/postal code.
                          country:
                            title: Country
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            type: string
                            description: The country code (iso-3166-1 alpha-2)
                            format: iso-3166-1-alpha-2
                        description: The representative's address.
                    description: Information about the individual representing the sub-entity.
                  roles:
                    title: Roles within company
                    maxItems: 1
                    minItems: 1
                    uniqueItems: true
                    type: array
                    items:
                      title: Representative Role
                      enum:
                        - ubo
                      type: string
                      description: The representative's role
                    description: The individual's roles within the company
                  documents:
                    title: Documents
                    required:
                      - proof_of_residential_address
                      - proof_of_registration
                      - identity_verification
                    type: object
                    properties:
                      identity_verification:
                        title: Document
                        required:
                          - type
                          - front
                        type: object
                        properties:
                          type:
                            title: Document type
                            enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                            type: string
                            description: The type of document used for identity verification
                          front:
                            title: Front
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the front side of the document as represented within Checkout.com systems.
                          back:
                            title: Back
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the back side of the document as represented within Checkout.com systems.
                        description: The document to use to confirm the individual's identity.
                      proof_of_residential_address:
                        title: Document
                        required:
                          - type
                          - front
                        type: object
                        properties:
                          type:
                            title: Document type
                            enum:
                              - proof_of_address
                            type: string
                            description: The type of document being used as address verification
                          front:
                            title: Front
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the front side of the document as represented within Checkout.com systems.
                        description: Proof of residential address of the representative
                      proof_of_registration:
                        title: Document
                        required:
                          - type
                          - front
                        type: object
                        properties:
                          type:
                            title: Document type
                            enum:
                              - extract_from_trade_register
                              - other
                            type: string
                            description: The type of document being used as proof of registration
                          front:
                            title: Front
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the front side of the document as represented within Checkout.com systems.
                        description: Proof of sole traders registration e.g. extract from a trade register
                    additionalProperties: false
                    description: Verification documents for the individual representative
                description: Personal information about the individual representing the sub-entity.
              description: Information about representatives of this company.
            business_type:
              title: Business type
              enum:
                - individual_or_sole_proprietorship
                - limited_company
                - public_limited_company
                - limited_partnership
                - general_partnership
                - government_agency
                - non_profit_entity
                - trust
                - club_or_society
                - unincorporated_association
              type: string
              description: The legal type of the company
          description: Information about the sole trader's business.
        processing_details:
          type: object
          allOf:
            - title: Processing Details
              required:
                - settlement_country
                - target_countries
                - annual_processing_volume
                - average_transaction_value
                - highest_transaction_value
                - currency
              type: object
              properties:
                settlement_country:
                  title: Destination of funds
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2) where the settlement bank account is located
                  format: iso-3166-1-alpha-2
                target_countries:
                  title: Target countries
                  maxItems: 10
                  minItems: 1
                  type: array
                  items:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                  description: Target country codes (iso-3166-1 alpha-2) with more than 10% expected volume processing with Checkout
                annual_processing_volume:
                  title: Estimated annual processing volume
                  minimum: 0
                  type: integer
                  description: The estimated annual processing volume. In minor units without decimals.
                average_transaction_value:
                  title: Average sales price
                  minimum: 0
                  type: integer
                  description: The expected average transaction value. In minor units without decimals.
                highest_transaction_value:
                  title: Highest transaction value
                  minimum: 0
                  type: integer
                  description: The expected highest transaction value. In minor units without decimals.
                currency:
                  title: Currency
                  enum:
                    - EUR
                  type: string
                  description: The currency used for the processing details provided.
        documents:
          title: Documents
          required:
            - bank_verification
          type: object
          properties:
            bank_verification:
              title: Bank Verification
              required:
                - type
                - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                    - bank_statement
                  type: string
                  description: The type of document being used as bank verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A document showing transactions from last 3 months
            additional_document1:
              title: Additional Documentation
              required:
                - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document2:
              title: Additional Documentation
              required:
                - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document3:
              title: Additional Documentation
              required:
                - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
          description: The documents used to support the verification of business details.
    EEASoleTraderLite2-0:
      type: object
      allOf:
      - title: Create & Submit regulated EEA Individual (V2.0)
        required:
        - reference
        - individual
        - contact_details
        - profile
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 10000000
                    maxLength: 16
                    minLength: 8
                    pattern: ^[1-9][0-9]{7,15}$
                    description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                description: The phone number of the sub-entity.
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: Email addresses for this sub-entity.
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: The details of the user responsible for onboarding the sub-entity.
            description: Contact details of this sub-entity.
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          documents:
            title: Documents
            required:
            - identity_verification
            type: object
            properties:
              identity_verification:
                title: Document
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - passport
                    - national_identity_card
                    - driving_license
                    - citizen_card
                    - residence_permit
                    - electoral_id
                    type: string
                    description: The type of document used for identity verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                  back:
                    title: Back
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the back side of the document as represented within Checkout.com systems.
                description: The document to use to confirm the individual's identity.
            description: A legal document used to verify identity.
          individual:
            title: Individual
            required:
            - first_name
            - last_name
            - date_of_birth
            - place_of_birth
            - registered_address
            - trading_name
            type: object
            properties:
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              first_name:
                title: First name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's first name.
              middle_name:
                title: Middle name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's middle name. Required if appears in official docs
              last_name:
                title: Last name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's last name.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: EU Postal Code
                    maxLength: 16
                    minLength: 1
                    pattern: ^[a-zA-Z0-9]+[-\s]?[a-zA-Z0-9]+$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
              date_of_birth:
                title: Date of birth
                required:
                - day
                - month
                - year
                type: object
                properties:
                  day:
                    maximum: 31
                    minimum: 1
                    type: integer
                    description: The calendar day of the month they were born.
                  month:
                    maximum: 12
                    minimum: 1
                    type: integer
                    description: The month of the year they were born.
                  year:
                    maximum: 2999
                    minimum: 1900
                    type: integer
                    description: The year they were born.
                description: The date of birth of the person according to the Gregorian calendar.
              place_of_birth:
                title: Place of Birth
                required:
                - country
                properties:
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The place of birth of the person.
            description: Information about the individual represented by the sub-entity.
    EntityBasicResponseV2:
      title: Basic response
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
          example: ent_wxglze3wwywujg4nna5fb7ldli
        reference:
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify this entity.
          example: superhero1234
        capabilities:
          $ref: '#/components/schemas/EntityCapabilities'
        requirements_due:
          title: Requirements Due
          type: array
          items:
            $ref: '#/components/schemas/EntityRequirementV2'
          description: The requirements still due for this entity to unlock capabilities.
      readOnly: true
    EntityBasicResponseV3:
      title: Basic response
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
          example: ent_wxglze3wwywujg4nna5fb7ldli
        reference:
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify this entity.
          example: superhero1234
        requirements_due:
          title: Requirements Due
          type: array
          items:
            $ref: '#/components/schemas/EntityRequirementV3'
          description: The requirements still due for this entity to unlock capabilities.
      readOnly: true
    EntityBasicResponseWithLinksV2:
      title: Basic response with links
      type: object
      allOf:
      - $ref: '#/components/schemas/EntityBasicResponseV2'
      - $ref: '#/components/schemas/EntityLinks'
    EntityBasicResponseWithLinksV3:
      title: Basic response with links
      type: object
      allOf:
      - $ref: '#/components/schemas/EntityBasicResponseV3'
      - $ref: '#/components/schemas/EntityLinks'
    EntityCapabilities:
      title: Capabilities
      type: object
      properties:
        payments:
          type: object
          properties:
            available:
              type: boolean
              description: True if payments are available to the entity.
            enabled:
              type: boolean
              description: True if payments are enabled.
          description: Payment related capabilities of an entity.
          example:
            enabled: false
            available: true
        payouts:
          type: object
          properties:
            available:
              type: boolean
              description: True if payouts are available to the entity.
            enabled:
              type: boolean
              description: True if payouts are enabled.
          description: Payout related capabilities of an entity.
          example:
            enabled: false
            available: true
        issuing:
          type: object
          properties:
            available:
              type: boolean
              description: True if issuing is available to the entity.
            enabled:
              type: boolean
              description: True if issuing is enabled.
          description: Issuing related capabilities of an entity.
          example:
            enabled: false
            available: true
    EntityLinks:
      title: Links
      type: object
      properties:
        _links:
          additionalProperties:
            $ref: '#/components/schemas/Link'
          example:
            self:
              href: https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli
    EntityRequirementDetails:
      title: Requirement details
      type: object
      description: Detailed information about a single requirement.
      allOf:
        - $ref: '#/components/schemas/EntityRequirementListItem'
        - type: object
          properties:
            message:
              type: string
              description: A user-facing explanation of what is needed to resolve the requirement.
              example: Please confirm your legal company name.
            _schema:
              type: object
              nullable: true
              description: >-
                JSON Schema that the value supplied to `PUT /accounts/entities/{id}/requirements/{requirementId}`
                must conform to. The shape varies by requirement type (for example: an identity document upload,
                a free-text response, or a structured object). Validate the value client-side against this
                schema before submitting. May be `null` if no schema is registered for the requirement's field.
              additionalProperties: true
      readOnly: true
    EntityRequirementListItem:
      title: Requirement summary
      type: object
      description: A pending requirement that the sub-entity must resolve to remain compliant or unlock capabilities.
      properties:
        id:
          type: string
          description: The unique identifier of the requirement.
          example: req_5wmacwhrhbzhqkhx5hlqmzje44
        resource:
          type: string
          description: The ID of the resource (sub-entity or representative) the requirement applies to.
          example: ent_wxglze3wwywujg4nna5fb7ldli
        resource_type:
          type: string
          description: >-
            The type of resource the requirement applies to derived from the resource's URN. Common values
            include `company`, `individual`, and `representative`. Defaults to `entity` if the URN cannot be
            parsed.
          example: company
        reason:
          type: string
          description: The reason the requirement was raised.
          enum:
            - periodic_review
            - attestation
          example: periodic_review
        priority:
          type: string
          description: Priority level of this requirement. "high" by default, "critical" if deadline is within 7 days.
          enum:
            - high
            - critical
          example: high
        deadline:
          type: string
          format: date-time
          description: The date and time, in ISO 8601 UTC format, by which the requirement must be resolved.
          example: '2026-06-01T00:00:00Z'
        urn:
          type: string
          description: >-
            The schema-registry URN identifying the field this requirement applies to. Format:
            `urn:object:{resource_type}#{resource_id}#field:{field_name}`.
          example: 'urn:object:company#ent_wxglze3wwywujg4nna5fb7ldli#field:legal-name'
        field_path:
          type: string
          nullable: true
          description: >-
            Dot-notation path of the field on the resource that needs to be supplied or updated. May be `null`
            for ad-hoc requirements (such as additional documents or free-text responses) that do not map to
            a specific field on the entity.
          example: company.legal_name
        field_urn:
          type: string
          nullable: true
          description: The schema-registry URN of the field, from the public mapping definition. May be `null` if no mapping exists.
          example: 'urn:field:companies/legal-name'
        metadata:
          type: object
          nullable: true
          description: Optional metadata from the property mapping definition. Shape varies by requirement.
          additionalProperties: true
          example:
            purpose: company_verification
        _links:
          type: object
          description: Links to related resources.
          additionalProperties:
            $ref: '#/components/schemas/Link'
          example:
            self:
              href: 'https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli/requirements/req_5wmacwhrhbzhqkhx5hlqmzje44'
      readOnly: true
    EntityRequirementListResponse:
      title: Requirements list
      type: object
      description: The list of pending requirements for a sub-entity.
      properties:
        data:
          type: array
          description: The list of pending requirements for the sub-entity. Empty when no requirements are outstanding.
          items:
            $ref: '#/components/schemas/EntityRequirementListItem'
      readOnly: true
    EntityRequirementUpdateRequest:
      title: Resolve requirement request
      type: object
      description: Request body used to resolve a requirement. The shape of `value` is defined by the requirement's `_schema` (returned from `GET /accounts/entities/{id}/requirements/{requirementId}`).
      required:
        - value
      properties:
        value:
          description: >-
            The response to the requirement. The expected shape depends on the requirement and is defined
            by the JSON Schema returned in the requirement details response. Common shapes include a file
            reference (for document uploads), a primitive value, or a structured object.
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items: {}
            - type: string
            - type: number
            - type: boolean
          example:
            file_id: file_6lbss42ezvoufcb2beo76rvwly
    EntityRequirementUpdateResponse:
      title: Resolve requirement response
      type: object
      description: Acknowledges that a requirement response has been accepted for processing.
      properties:
        id:
          type: string
          description: The unique identifier of the requirement.
          example: req_5wmacwhrhbzhqkhx5hlqmzje44
        status:
          type: string
          description: Processing status of the submitted response. While the response is processing, the requirement is no longer retrievable via the GET endpoints; if validation fails downstream the requirement may reappear.
          enum:
            - processing
          example: processing
        submitted_at:
          type: string
          format: date-time
          description: The date and time, in ISO 8601 UTC format, the response was accepted.
          example: '2026-05-05T10:15:30Z'
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
          example:
            self:
              href: 'https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli/requirements/req_5wmacwhrhbzhqkhx5hlqmzje44'
            collection:
              href: 'https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli/requirements'
      readOnly: true
    EntityRequirementV2:
      title: Requirement
      type: object
      properties:
        field:
          type: string
          description: The name of the field required.
          example: individual.identification.document
        reason:
          type: string
          description: The reason the field is required.
          example: required
      readOnly: true
    EntityRequirementV3:
      title: Requirement
      type: object
      properties:
        field:
          type: string
          description: The name of the field required.
          example: individual.identification.document
        reason:
          type: string
          description: The reason the field is required.
          example: required
        message:
          type: string
          description: An additional text field for requirement reasoning.
          example: required
      readOnly: true
    GBCompanyFull2-0:
      type: object
      allOf:
      - title: Create & Submit GB Company (V2.0)
        required:
        - reference
        - company
        - contact_details
        - profile
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
              default_holding_currency:
                title: Main currency
                description: The default holding currency code (iso-4217)
                format: iso-4217
              holding_currencies:
                title: Currencies
                items:
                  title: Currency
                  type: string
                  enum:
                  - AED
                  - AUD
                  - CAD
                  - CHF
                  - CZK
                  - DKK
                  - EUR
                  - GBP
                  - HKD
                  - JPY
                  - KWD
                  - NOK
                  - NZD
                  - PLN
                  - RON
                  - SEK
                  - SGD
                  - USD
                  - ZAR
                  description: The currency code (iso-4217)
                description: Incoming funds are held in your selected currencies
                default:
                - GBP
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 10000000
                    maxLength: 16
                    minLength: 8
                    pattern: ^[1-9][0-9]{7,15}$
                    description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                description: The phone number of the sub-entity.
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: Email addresses for this sub-entity.
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: The details of the user responsible for onboarding the sub-entity.
            description: Contact details of this sub-entity.
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          company:
            title: Company
            required:
            - legal_name
            - trading_name
            - registered_address
            - principal_address
            - representatives
            - business_registration_number
            type: object
            properties:
              legal_name:
                title: Legal name
                maxLength: 300
                minLength: 2
                type: string
                description: The legal name of the sub-entity.
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              business_registration_number:
                title: Registration number
                maxLength: 8
                minLength: 8
                pattern: ^(([Aa][Cc]|[Cc][Ee]|[Ee][Nn]|[Ee][Ss]|[Ff][Cc]|[Gg][Ee]|[Gg][Nn]|[Gg][Ss]|[Ii][Cc]|[Ii][Pp]|[Ll][Pp]|[Nn][Aa]|[Nn][Cc]|[Nn][Ff]|[Nn][Ii]|[Nn][Ll]|[Nn][Oo]|[Nn][Pp]|[Nn][Rr]|[Nn][Vv]|[Nn][Zz]|[Oo][Cc]|[Rr][0]|[Rr][Cc]|[Ss][Aa]|[Ss][Cc]|[Ss][Ee]|[Ss][Ff]|[Ss][Ii]|[Ss][Ll]|[Ss][Oo]|[Ss][Pp]|[Ss][Rr]|[Ss][Zz]|[Zz][Cc]|\d{2})\d{6})$
                description: The sub-entity's Business Registration Number. This can be a Commercial Registration or Ministry of Commerce certificate number, or any other equivalent registration number.
              principal_address:
                title: Principal Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: UK Postal Code
                    maxLength: 8
                    minLength: 5
                    pattern: ^[A-Za-z]{1,2}([0-9]{1,2}|[0-9][A-Za-z])\s?[0-9][A-Za-z]{2}$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The primary location of the company where business is performed.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: UK Postal Code
                    maxLength: 8
                    minLength: 5
                    pattern: ^[A-Za-z]{1,2}([0-9]{1,2}|[0-9][A-Za-z])\s?[0-9][A-Za-z]{2}$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
              representatives:
                title: Representative List
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Representative
                  required:
                  - first_name
                  - last_name
                  - address
                  - roles
                  - date_of_birth
                  type: object
                  properties:
                    id:
                      maxLength: 30
                      minLength: 30
                      pattern: ^rep_[a-z0-9]{26}$
                      description: The representative's id.
                    first_name:
                      title: First name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's first name.
                    middle_name:
                      title: Middle name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's middle name. Required if appears in official docs
                    last_name:
                      title: Last name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's last name.
                    documents:
                      title: Document
                      required:
                      - identity_verification
                      type: object
                      properties:
                        identity_verification:
                          title: Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                              type: string
                              description: The type of document used for identity verification
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                            back:
                              title: Back
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the back side of the document as represented within Checkout.com systems.
                          description: The document to use to confirm the individual's identity.
                      description: A legal document used to verify identity
                    date_of_birth:
                      title: Date of birth
                      required:
                      - day
                      - month
                      - year
                      type: object
                      properties:
                        day:
                          maximum: 31
                          minimum: 1
                          type: integer
                          description: The calendar day of the month they were born.
                        month:
                          maximum: 12
                          minimum: 1
                          type: integer
                          description: The month of the year they were born.
                        year:
                          maximum: 2999
                          minimum: 1900
                          type: integer
                          description: The year they were born.
                      description: The date of birth of the person according to the Gregorian calendar.
                    phone:
                      title: Phone
                      required:
                      - number
                      type: object
                      properties:
                        number:
                          title: Phone number
                          maximum: 9999999999999999
                          minimum: 10000000
                          maxLength: 16
                          minLength: 8
                          pattern: ^[1-9][0-9]{7,15}$
                          description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                      description: The phone number of the sub-entity.
                    address:
                      title: Address
                      required:
                      - country
                      type: object
                      properties:
                        address_line1:
                          title: Address line 1
                          maxLength: 300
                          minLength: 1
                          pattern: '\S'
                          type: string
                          description: The first line of the address.
                        address_line2:
                          title: Address line 2
                          maxLength: 300
                          description: The second line of the address.
                        city:
                          title: City
                          maxLength: 300
                          minLength: 2
                          type: string
                          description: The address city.
                        state:
                          title: State
                          maxLength: 300
                          minLength: 1
                          pattern: '\S'
                          type: string
                          description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                        zip:
                          title: Postal code
                          maxLength: 16
                          minLength: 1
                          pattern: ^[a-zA-Z0-9-\s]+$
                          type: string
                          description: The address zip/postal code.
                        country:
                          title: Country
                          maxLength: 2
                          minLength: 2
                          pattern: '[a-zA-Z]{2}'
                          type: string
                          description: The country code (iso-3166-1 alpha-2)
                          format: iso-3166-1-alpha-2
                      description: The representative's address.
                    roles:
                      title: Roles within company
                      maxItems: 2
                      minItems: 1
                      uniqueItems: true
                      type: array
                      items:
                        title: Representative Role
                        enum:
                        - ubo
                        - authorised_signatory
                        type: string
                        description: The representative's roles within the company
                      description: The individual's roles within the company
                  description: Information about representatives of this company.
                description: Information about representatives of this company.
              date_of_incorporation:
                title: Date of Incorporation
                required:
                - month
                - year
                type: object
                properties:
                  day:
                    maximum: 31
                    minimum: 1
                    type: integer
                    description: The day of the month the company was incorporated.
                  month:
                    maximum: 12
                    minimum: 1
                    type: integer
                    description: The month the company was incorporated.
                  year:
                    maximum: 2999
                    minimum: 1500
                    type: integer
                    description: The year the company was incorporated.
                description: The date the company was incorporated.
            description: Information about the company represented by the sub-entity.
          documents:
            title: Documents
            required:
            - company_verification
            type: object
            properties:
              company_verification:
                title: Company Verification
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - incorporation_document
                    type: string
                    description: The type of document used for company verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                description: Certified by a power of attorney within the last 3 months
            description: The documents used to support the verification of company details.
    GBCompanyFull3-0:
      type: object
      title: Create & Submit GB Company (V3.0)
      required:
      - reference
      - company
      - profile
      - contact_details
      - documents
      - processing_details
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity.
        status:
          type: string
          readOnly: true
        is_draft:
          type: boolean
          description: >-
            Specifies whether the sub-entity details are in draft.
      
      
            Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
          writeOnly: true
        profile:
          title: Profile
          required:
          - urls
          - mccs
          - default_holding_currency
          - holding_currencies
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\//\S{2,293}$
                type: string
                description: The URL of the company's website.
                format: uri
              description: A collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                description: The merchant category code (4-digit ISO 18245).
              description: Select the categories that most closely describe the business
            default_holding_currency:
              title: Main currency
              description: The default holding currency code (iso-4217)
              format: iso-4217
            holding_currencies:
              title: Currencies
              minItems: 1
              items:
                title: Currency
                type: string
                enum:
                - AED
                - AUD
                - CAD
                - CHF
                - CZK
                - DKK
                - EUR
                - GBP
                - HKD
                - JPY
                - KWD
                - NOK
                - NZD
                - PLN
                - RON
                - SEK
                - SGD
                - USD
                - ZAR
                description: The currency code (iso-4217)
              description: Incoming funds are held in your selected currencies
              default:
              - GBP
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          type: object
          properties:
            phone:
              title: Phone number
              required:
              - country_code
              - number
              type: object
              properties:
                country_code:
                  title: Country calling code
                  enum:
                  - GI
                  - CH
                  - GG
                  - IM
                  - JE
                  - GB
                  type: string
                  description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                number:
                  title: Phone number
                  maxLength: 11
                  minLength: 7
                  pattern: ^[0-9]{7,11}$
                  type: string
                  description: The phone number without the country calling code
              description: Phone number
            email_addresses:
              required:
              - primary
              type: object
              properties:
                primary:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: Email addresses for this sub-entity.
            invitee:
              title: Invitee
              type: object
              properties:
                email:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: The details of the user responsible for onboarding the sub-entity.
          description: Contact details of this sub-entity.
        capabilities:
          title: Capabilities
          type: object
          description: The capabilities of the entity.
          readOnly: true
        requirements_due:
          title: Requirements Due
          minItems: 0
          type: array
          items:
            title: Requirements due entry
            type: object
            properties:
              field:
                title: Field
                type: string
                description: The field that is needs to be addressed.
              reason:
                title: Reason
                type: string
                description: The reason behind the field needing attention.
              message:
                title: Message
                type: string
                description: A more descriptive message.
            description: A list of fields which require attention
            readOnly: true
          description: List of requirements due in order to be onboarded.
          readOnly: true
        company:
          title: Company
          required:
          - legal_name
          - trading_name
          - business_registration_number
          - date_of_incorporation
          - principal_address
          - registered_address
          - representatives
          - business_type
          type: object
          properties:
            legal_name:
              title: Legal name
              maxLength: 300
              minLength: 2
              type: string
              description: The legal name of the sub-entity.
            trading_name:
              title: Trading name
              maxLength: 300
              minLength: 2
              type: string
              description: The trading name of the sub-entity, also referred to as 'doing business as'.
            business_registration_number:
              title: Registration Number
              maxLength: 8
              minLength: 8
              pattern: ^(((AC|CE|CS|FC|FE|GE|GS|IC|LP|NC|NF|NI|NL|NO|NP|OC|OE|PC|R0|RC|SA|SC|SE|SF|SG|SI|SL|SO|SR|SZ|ZC|\d{2})\d{6})|((IP|SP|RS)[A-Z\d]{6})|(SL\d{5}[\dA]))$
              description: The sub-entity's Business Registration Number. This can be a Commercial Registration or Ministry of Commerce certificate number, or any other equivalent registration number.
            date_of_incorporation:
              title: Date of Incorporation
              required:
              - month
              - year
              type: object
              properties:
                day:
                  maximum: 31
                  minimum: 1
                  type: integer
                  description: The day of the month the company was incorporated.
                month:
                  maximum: 12
                  minimum: 1
                  type: integer
                  description: The month the company was incorporated.
                year:
                  maximum: 2999
                  minimum: 1500
                  type: integer
                  description: The year the company was incorporated.
              description: The date the company was incorporated.
            principal_address:
              title: Principal Address
              required:
              - address_line1
              - city
              - zip
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: State
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                zip:
                  title: Postal code
                  maxLength: 16
                  minLength: 1
                  pattern: ^[a-zA-Z0-9-\s]+$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The primary location of the company where business is performed.
            registered_address:
              title: Registered Address
              required:
              - address_line1
              - city
              - zip
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: State
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                zip:
                  title: UK Postal Code
                  maxLength: 8
                  minLength: 5
                  pattern: ^[A-Za-z]{1,2}([0-9]{1,2}|[0-9][A-Za-z])\s?[0-9][A-Za-z]{2}$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The registered address of the company.
            representatives:
              title: Representative List
              maxItems: 25
              minItems: 1
              type: array
              items:
                title: Representative
                type: object
                oneOf:
                - title: Person of Interest
                  required:
                  - individual
                  - roles
                  type: object
                  properties:
                    id:
                      maxLength: 30
                      minLength: 30
                      pattern: ^rep_[a-z0-9]{26}$
                      description: The representative's id.
                    individual:
                      title: Individual
                      type: object
                      required:
                      - first_name
                      - last_name
                      - date_of_birth
                      - place_of_birth
                      - address
                      properties:
                        first_name:
                          title: First name
                          maxLength: 50
                          minLength: 2
                          type: string
                          description: The representative's first name.
                        middle_name:
                          title: Middle name
                          maxLength: 50
                          minLength: 2
                          type: string
                          description: The representative's middle name. Required if appears in official docs
                        last_name:
                          title: Last name
                          maxLength: 50
                          minLength: 2
                          type: string
                          description: The representative's last name.
                        date_of_birth:
                          title: Date of birth
                          required:
                          - day
                          - month
                          - year
                          type: object
                          properties:
                            day:
                              maximum: 31
                              minimum: 1
                              type: integer
                              description: The calendar day of the month they were born.
                            month:
                              maximum: 12
                              minimum: 1
                              type: integer
                              description: The month of the year they were born.
                            year:
                              maximum: 2999
                              minimum: 1900
                              type: integer
                              description: The year they were born.
                          description: The date of birth of the person according to the Gregorian calendar.
                        place_of_birth:
                          title: Place of Birth
                          required:
                          - country
                          properties:
                            country:
                              title: Country
                              maxLength: 2
                              minLength: 2
                              pattern: '[a-zA-Z]{2}'
                              type: string
                              description: The country code (iso-3166-1 alpha-2)
                              format: iso-3166-1-alpha-2
                          description: The place of birth of the person.
                        national_id_number:
                          title: Social security number (SSN or ITIN) - US Residents Only
                          maxLength: 9
                          minLength: 9
                          pattern: ^\d{9}$
                          description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                        email_address:
                          title: Email
                          description: The main email address for this sub-entity.
                          format: email
                        phone:
                          title: Phone number
                          required:
                          - country_code
                          - number
                          type: object
                          properties:
                            country_code:
                              title: Country calling code
                              enum:
                              - AF
                              - AL
                              - DZ
                              - AS
                              - AD
                              - AO
                              - AI
                              - AG
                              - AR
                              - AM
                              - AW
                              - AU
                              - AT
                              - AZ
                              - BS
                              - BH
                              - BD
                              - BB
                              - BY
                              - BE
                              - BZ
                              - BJ
                              - BM
                              - BT
                              - BO
                              - BA
                              - BW
                              - BR
                              - BN
                              - BG
                              - BF
                              - BI
                              - CV
                              - KH
                              - CM
                              - CA
                              - KY
                              - CF
                              - TD
                              - CL
                              - CN
                              - CO
                              - KM
                              - CD
                              - CG
                              - CK
                              - CR
                              - HR
                              - CU
                              - CW
                              - CY
                              - CZ
                              - DK
                              - DJ
                              - DM
                              - DO
                              - EC
                              - EG
                              - SV
                              - GQ
                              - ER
                              - EE
                              - SZ
                              - ET
                              - FO
                              - FJ
                              - FI
                              - FR
                              - GF
                              - PF
                              - GA
                              - GM
                              - GE
                              - DE
                              - GH
                              - GI
                              - GR
                              - GL
                              - GD
                              - GP
                              - GU
                              - GT
                              - GG
                              - GN
                              - GW
                              - GY
                              - HT
                              - HN
                              - HK
                              - HU
                              - IS
                              - IN
                              - ID
                              - IR
                              - IQ
                              - IE
                              - IM
                              - IL
                              - IT
                              - JM
                              - JP
                              - JE
                              - JO
                              - KZ
                              - KE
                              - KI
                              - KP
                              - KR
                              - KW
                              - KG
                              - LA
                              - LV
                              - LB
                              - LS
                              - LR
                              - LY
                              - LI
                              - LT
                              - LU
                              - MO
                              - MG
                              - MW
                              - MY
                              - MV
                              - ML
                              - MT
                              - MH
                              - MQ
                              - MR
                              - MU
                              - MX
                              - FM
                              - MD
                              - MC
                              - MN
                              - ME
                              - MS
                              - MA
                              - MZ
                              - MM
                              - NA
                              - NR
                              - NP
                              - NL
                              - NC
                              - NZ
                              - NI
                              - NE
                              - NG
                              - NU
                              - NF
                              - MK
                              - MP
                              - NO
                              - OM
                              - PK
                              - PW
                              - PA
                              - PG
                              - PY
                              - PE
                              - PH
                              - PL
                              - PT
                              - PR
                              - QA
                              - RE
                              - RO
                              - RU
                              - RW
                              - BL
                              - SH
                              - KN
                              - LC
                              - SX
                              - PM
                              - VC
                              - WS
                              - SM
                              - ST
                              - SA
                              - SN
                              - RS
                              - SC
                              - SL
                              - SG
                              - BQ
                              - SK
                              - SI
                              - SB
                              - SO
                              - ZA
                              - GS
                              - SS
                              - ES
                              - LK
                              - SD
                              - SR
                              - SE
                              - CH
                              - SY
                              - TW
                              - TJ
                              - TZ
                              - TH
                              - TL
                              - TG
                              - TK
                              - TO
                              - TT
                              - TN
                              - TR
                              - TM
                              - TC
                              - TV
                              - UG
                              - UA
                              - AE
                              - GB
                              - US
                              - UY
                              - UZ
                              - VU
                              - VA
                              - VE
                              - VN
                              - VG
                              - VI
                              - WF
                              - EH
                              - YE
                              - ZM
                              - ZW
                              type: string
                              description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                            number:
                              title: Phone number
                              maxLength: 16
                              minLength: 5
                              pattern: ^[0-9]{5,16}$
                              type: string
                              description: The phone number without the country calling code
                          description: Phone number
                        address:
                          title: Address
                          required:
                          - address_line1
                          - city
                          - zip
                          - country
                          type: object
                          properties:
                            address_line1:
                              title: Address line 1
                              maxLength: 300
                              minLength: 1
                              pattern: '\S'
                              type: string
                              description: The first line of the address.
                            address_line2:
                              title: Address line 2
                              maxLength: 300
                              description: The second line of the address.
                            city:
                              title: City
                              maxLength: 300
                              minLength: 2
                              type: string
                              description: The address city.
                            state:
                              title: State
                              maxLength: 300
                              minLength: 1
                              pattern: '\S'
                              type: string
                              description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                            zip:
                              title: Postal code
                              maxLength: 16
                              minLength: 1
                              pattern: ^[a-zA-Z0-9-\s]+$
                              type: string
                              description: The address zip/postal code.
                            country:
                              title: Country
                              maxLength: 2
                              minLength: 2
                              pattern: '[a-zA-Z]{2}'
                              type: string
                              description: The country code (iso-3166-1 alpha-2)
                              format: iso-3166-1-alpha-2
                          description: The representative's address.
                      description: Information about the individual representing the sub-entity.
                    company_position:
                      title: Position within Company
                      enum:
                      - ceo
                      - cfo
                      - coo
                      - managing_member
                      - general_partner
                      - president
                      - vice_president
                      - treasurer
                      - other_senior_management
                      - other_executive_officer
                      - other_non_executive_non_senior
                      type: string
                      description: The position of the representative within the company.
                    roles:
                      title: Roles within company
                      maxItems: 10
                      minItems: 1
                      uniqueItems: true
                      type: array
                      items:
                        title: Representative Role
                        enum:
                        - ubo
                        - authorised_signatory
                        - director
                        - control_person
                        type: string
                        description: The representative's role
                      description: The individual's roles within the company
                    ownership_percentage:
                      title: Percentage of Ownership
                      maximum: 100
                      minimum: 25
                      type: integer
                      description: The percentage ownership of the UBO or controlling company (required when over 25%)
                    documents:
                      title: Documents
                      type: object
                      properties:
                        identity_verification:
                          title: Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                              type: string
                              description: The type of document used for identity verification
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                            back:
                              title: Back
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the back side of the document as represented within Checkout.com systems.
                          description: The document to use to confirm the individual's identity.
                        certified_authorised_signatory:
                          title: Certified Authorised Signatory Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - power_of_attorney
                              type: string
                              description: The type of document.
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                          description: Required when the legal representative or other role owner is not registered on certificate of incorporation
                      additionalProperties: false
                      description: Verification documents for the individual representative
                  description: Personal information about the individual representing the sub-entity.
                - title: Controlling Company
                  required:
                  - company
                  type: object
                  properties:
                    id:
                      maxLength: 30
                      minLength: 30
                      pattern: ^rep_[a-z0-9]{26}$
                      description: The representative's id.
                    company:
                      required:
                      - legal_name
                      - trading_name
                      - registered_address
                      type: object
                      properties:
                        legal_name:
                          title: Legal name
                          maxLength: 300
                          minLength: 2
                          type: string
                          description: The legal name of the sub-entity.
                        trading_name:
                          title: Trading name
                          maxLength: 300
                          minLength: 2
                          type: string
                          description: The trading name of the sub-entity, also referred to as 'doing business as'.
                        registered_address:
                          title: Address
                          required:
                          - country
                          type: object
                          properties:
                            address_line1:
                              title: Address line 1
                              maxLength: 300
                              minLength: 1
                              pattern: '\S'
                              type: string
                              description: The first line of the address.
                            address_line2:
                              title: Address line 2
                              maxLength: 300
                              description: The second line of the address.
                            city:
                              title: City
                              maxLength: 300
                              minLength: 2
                              type: string
                              description: The address city.
                            state:
                              title: State
                              maxLength: 300
                              minLength: 1
                              pattern: '\S'
                              type: string
                              description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                            zip:
                              title: Postal code
                              maxLength: 16
                              minLength: 1
                              pattern: ^[a-zA-Z0-9-\s]+$
                              type: string
                              description: The address zip/postal code.
                            country:
                              title: Country
                              maxLength: 2
                              minLength: 2
                              pattern: '[a-zA-Z]{2}'
                              type: string
                              description: The country code (iso-3166-1 alpha-2)
                              format: iso-3166-1-alpha-2
                          description: The representative's address.
                    ownership_percentage:
                      title: Percentage of Ownership
                      maximum: 100
                      minimum: 25
                      type: integer
                      description: The percentage ownership of the UBO or controlling company (required when over 25%)
                  description: Information about the controlling company
              description: Information about representatives of this company.
            business_type:
              title: Business type
              enum:
              - individual_or_sole_proprietorship
              - limited_company
              - public_limited_company
              - limited_partnership
              - general_partnership
              - scottish_limited_partnership
              - government_agency
              - non_profit_entity
              - trust
              - club_or_society
              - unincorporated_association
              type: string
              description: The legal type of the company
          description: Information about the company represented by the sub-entity.
        processing_details:
          type: object
          title: Processing Details
          required:
          - settlement_country
          - target_countries
          - annual_processing_volume
          - average_transaction_value
          - highest_transaction_value
          - currency
          properties:
            settlement_country:
              title: Destination of funds
              maxLength: 2
              minLength: 2
              pattern: '[a-zA-Z]{2}'
              type: string
              description: The country code (iso-3166-1 alpha-2) where the settlement bank account is located
              format: iso-3166-1-alpha-2
            target_countries:
              title: Target countries
              maxItems: 10
              minItems: 1
              type: array
              items:
                title: Country
                maxLength: 2
                minLength: 2
                pattern: '[a-zA-Z]{2}'
                type: string
                description: The country code (iso-3166-1 alpha-2)
                format: iso-3166-1-alpha-2
              description: Target country codes (iso-3166-1 alpha-2) with more than 10% expected volume processing with Checkout
            annual_processing_volume:
              title: Estimated annual processing volume
              minimum: 0
              type: integer
              description: The estimated annual processing volume. In minor units without decimals.
            average_transaction_value:
              title: Average sales price
              minimum: 0
              type: integer
              description: The expected average transaction value. In minor units without decimals.
            highest_transaction_value:
              title: Highest transaction value
              minimum: 0
              type: integer
              description: The expected highest transaction value. In minor units without decimals.
            currency:
              title: Currency
              enum:
              - GBP
              type: string
              description: The currency used for the processing details provided.
          description: Seller processing details.
        documents:
          title: Documents
          required:
          - articles_of_association
          - shareholder_structure
          type: object
          properties:
            company_verification:
              title: Company Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - incorporation_document
                  type: string
                  description: The type of document used for company verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Certified by a power of attorney within the last 3 months
            articles_of_association:
              title: Memorandum or Articles of Association
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - memorandum_of_association
                  - articles_of_association
                  type: string
                  description: The type of document used for company verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Memorandum or Articles of Association document
            bank_verification:
              title: Bank Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - bank_statement
                  type: string
                  description: The type of document being used as bank verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A document showing transactions from last 3 months
            shareholder_structure:
              title: Shareholder Structure
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - certified_shareholder_structure
                  type: string
                  description: The type of document.
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Shareholder structure chart (including % of shares) certified by a competent authority individual and dated within last 3 months
            proof_of_legality:
              title: Proof of Legality
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - proof_of_legality
                  type: string
                  description: The type of document used for proof of legality
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A regulatory licence document required for the company to operate (when applicable)
            proof_of_principal_address:
              title: Address Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - proof_of_address
                  type: string
                  description: The type of document being used as address verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Proof of principal place of business
            additional_document1:
              title: Additional Documentation
              required:
              - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document2:
              title: Additional Documentation
              required:
              - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document3:
              title: Additional Documentation
              required:
              - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
          description: The documents used to support the verification of company details.
    GBCompanyLite2-0:
      type: object
      allOf:
      - title: Create & Submit regulated GB Company (V2.0)
        required:
        - reference
        - company
        - contact_details
        - profile
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 10000000
                    maxLength: 16
                    minLength: 8
                    pattern: ^[1-9][0-9]{7,15}$
                    description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                description: The phone number of the sub-entity.
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: Email addresses for this sub-entity.
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: The details of the user responsible for onboarding the sub-entity.
            description: Contact details of this sub-entity.
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          company:
            title: Company (V2.0)
            required:
            - legal_name
            - trading_name
            - registered_address
            - principal_address
            - representatives
            type: object
            properties:
              legal_name:
                title: Legal name
                maxLength: 300
                minLength: 2
                type: string
                description: The legal name of the sub-entity.
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              business_registration_number:
                title: Registration number
                maxLength: 8
                minLength: 8
                pattern: ^(([Aa][Cc]|[Cc][Ee]|[Ee][Nn]|[Ee][Ss]|[Ff][Cc]|[Gg][Ee]|[Gg][Nn]|[Gg][Ss]|[Ii][Cc]|[Ii][Pp]|[Ll][Pp]|[Nn][Aa]|[Nn][Cc]|[Nn][Ff]|[Nn][Ii]|[Nn][Ll]|[Nn][Oo]|[Nn][Pp]|[Nn][Rr]|[Nn][Vv]|[Nn][Zz]|[Oo][Cc]|[Rr][0]|[Rr][Cc]|[Ss][Aa]|[Ss][Cc]|[Ss][Ee]|[Ss][Ff]|[Ss][Ii]|[Ss][Ll]|[Ss][Oo]|[Ss][Pp]|[Ss][Rr]|[Ss][Zz]|[Zz][Cc]|\d{2})\d{6})$
                description: The sub-entity's Business Registration Number. This can be a Commercial Registration or Ministry of Commerce certificate number, or any other equivalent registration number.
              principal_address:
                title: Principal Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: UK Postal Code
                    maxLength: 8
                    minLength: 5
                    pattern: ^[A-Za-z]{1,2}([0-9]{1,2}|[0-9][A-Za-z])\s?[0-9][A-Za-z]{2}$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The primary location of the company where business is performed.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: UK Postal Code
                    maxLength: 8
                    minLength: 5
                    pattern: ^[A-Za-z]{1,2}([0-9]{1,2}|[0-9][A-Za-z])\s?[0-9][A-Za-z]{2}$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
              representatives:
                title: Representative List
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Representative
                  required:
                  - first_name
                  - last_name
                  - address
                  - roles
                  type: object
                  properties:
                    id:
                      maxLength: 30
                      minLength: 30
                      pattern: ^rep_[a-z0-9]{26}$
                      description: The representative's id.
                    first_name:
                      title: First name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's first name.
                    middle_name:
                      title: Middle name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's middle name. Required if appears in official docs
                    last_name:
                      title: Last name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's last name.
                    documents:
                      title: Document
                      required:
                      - identity_verification
                      type: object
                      properties:
                        identity_verification:
                          title: Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                              type: string
                              description: The type of document used for identity verification
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                            back:
                              title: Back
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the back side of the document as represented within Checkout.com systems.
                          description: The document to use to confirm the individual's identity.
                      description: A legal document used to verify identity
                    date_of_birth:
                      title: Date of birth
                      required:
                      - day
                      - month
                      - year
                      type: object
                      properties:
                        day:
                          maximum: 31
                          minimum: 1
                          type: integer
                          description: The calendar day of the month they were born.
                        month:
                          maximum: 12
                          minimum: 1
                          type: integer
                          description: The month of the year they were born.
                        year:
                          maximum: 2999
                          minimum: 1900
                          type: integer
                          description: The year they were born.
                      description: The date of birth of the person according to the Gregorian calendar.
                    phone:
                      title: Phone
                      required:
                      - number
                      type: object
                      properties:
                        number:
                          title: Phone number
                          maximum: 9999999999999999
                          minimum: 10000000
                          maxLength: 16
                          minLength: 8
                          pattern: ^[1-9][0-9]{7,15}$
                          description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                      description: The phone number of the sub-entity.
                    address:
                      title: Address
                      required:
                      - country
                      type: object
                      properties:
                        address_line1:
                          title: Address line 1
                          maxLength: 300
                          minLength: 1
                          pattern: '\S'
                          type: string
                          description: The first line of the address.
                        address_line2:
                          title: Address line 2
                          maxLength: 300
                          description: The second line of the address.
                        city:
                          title: City
                          maxLength: 300
                          minLength: 2
                          type: string
                          description: The address city.
                        state:
                          title: State
                          maxLength: 300
                          minLength: 1
                          pattern: '\S'
                          type: string
                          description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                        zip:
                          title: Postal code
                          maxLength: 16
                          minLength: 1
                          pattern: ^[a-zA-Z0-9-\s]+$
                          type: string
                          description: The address zip/postal code.
                        country:
                          title: Country
                          maxLength: 2
                          minLength: 2
                          pattern: '[a-zA-Z]{2}'
                          type: string
                          description: The country code (iso-3166-1 alpha-2)
                          format: iso-3166-1-alpha-2
                      description: The representative's address.
                    roles:
                      title: Roles within company
                      maxItems: 2
                      minItems: 1
                      uniqueItems: true
                      type: array
                      items:
                        title: Representative Role
                        enum:
                        - ubo
                        - authorised_signatory
                        type: string
                        description: The representative's roles within the company
                      description: The individual's roles within the company
                  description: Information about representatives of this company.
                description: Information about representatives of this company.
          documents:
            title: GB company documents (V2.0)
            type: object
            properties:
              company_verification:
                title: Company Verification
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - incorporation_document
                    type: string
                    description: The type of document used for company verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                description: Certified by a power of attorney within the last 3 months
    GBSoleTraderFull2-0:
      type: object
      allOf:
      - title: Create & Submit GB Individual (V2.0)
        required:
        - reference
        - individual
        - contact_details
        - profile
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
              default_holding_currency:
                title: Main currency
                description: The default holding currency code (iso-4217)
                format: iso-4217
              holding_currencies:
                title: Currencies
                items:
                  title: Currency
                  type: string
                  enum:
                  - AED
                  - AUD
                  - CAD
                  - CHF
                  - CZK
                  - DKK
                  - EUR
                  - GBP
                  - HKD
                  - JPY
                  - KWD
                  - NOK
                  - NZD
                  - PLN
                  - RON
                  - SEK
                  - SGD
                  - USD
                  - ZAR
                  description: The currency code (iso-4217)
                description: Incoming funds are held in your selected currencies
                default:
                - GBP
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 10000000
                    maxLength: 16
                    minLength: 8
                    pattern: ^[1-9][0-9]{7,15}$
                    description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                description: The phone number of the sub-entity.
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: Email addresses for this sub-entity.
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: The details of the user responsible for onboarding the sub-entity.
            description: Contact details of this sub-entity.
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          individual:
            title: Individual
            required:
            - first_name
            - last_name
            - date_of_birth
            - registered_address
            - trading_name
            type: object
            properties:
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              first_name:
                title: First name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's first name.
              middle_name:
                title: Middle name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's middle name. Required if appears in official docs
              last_name:
                title: Last name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's last name.
              date_of_birth:
                title: Date of birth
                required:
                - day
                - month
                - year
                type: object
                properties:
                  day:
                    maximum: 31
                    minimum: 1
                    type: integer
                    description: The calendar day of the month they were born.
                  month:
                    maximum: 12
                    minimum: 1
                    type: integer
                    description: The month of the year they were born.
                  year:
                    maximum: 2999
                    minimum: 1900
                    type: integer
                    description: The year they were born.
                description: The date of birth of the person according to the Gregorian calendar.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: UK Postal Code
                    maxLength: 8
                    minLength: 5
                    pattern: ^[A-Za-z]{1,2}([0-9]{1,2}|[0-9][A-Za-z])\s?[0-9][A-Za-z]{2}$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
            description: Information about the individual represented by the sub-entity.
          documents:
            title: Document
            required:
            - identity_verification
            type: object
            properties:
              identity_verification:
                title: Document
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - passport
                    - national_identity_card
                    - driving_license
                    - citizen_card
                    - residence_permit
                    - electoral_id
                    type: string
                    description: The type of document used for identity verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                  back:
                    title: Back
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the back side of the document as represented within Checkout.com systems.
                description: The document to use to confirm the individual's identity.
            description: A legal document used to verify identity.
    GBSoleTraderFull3-0:
      type: object
      title: Create & Submit GB Sole Trader (V3.0)
      required:
        - reference
        - company
        - profile
        - contact_details
        - documents
        - processing_details
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity.
        status:
          type: string
          readOnly: true
        is_draft:
          type: boolean
          description: >-
            Specifies whether the sub-entity details are in draft.
      
      
            Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
          writeOnly: true
        profile:
          title: Profile
          required:
            - urls
            - mccs
            - default_holding_currency
            - holding_currencies
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\//\S{2,293}$
                type: string
                description: The URL of the company's website.
                format: uri
              description: A collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                description: The merchant category code (4-digit ISO 18245).
              description: Select the categories that most closely describe the business
            default_holding_currency:
              title: Main currency
              description: The default holding currency code (iso-4217)
              format: iso-4217
            holding_currencies:
              title: Currencies
              type: array
              minItems: 1
              items:
                title: Currency
                type: string
                enum:
                  - AED
                  - AUD
                  - CAD
                  - CHF
                  - CZK
                  - DKK
                  - EUR
                  - GBP
                  - HKD
                  - JPY
                  - KWD
                  - NOK
                  - NZD
                  - PLN
                  - RON
                  - SEK
                  - SGD
                  - USD
                  - ZAR
                description: The currency code (iso-4217)
              description: Incoming funds are held in your selected currencies
              default:
                - GBP
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          type: object
          properties:
            phone:
              title: Phone number
              required:
                - country_code
                - number
              type: object
              properties:
                country_code:
                  title: Country calling code
                  enum:
                    - GI
                    - CH
                    - GG
                    - IM
                    - JE
                    - GB
                  type: string
                  description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                number:
                  title: Phone number
                  maxLength: 11
                  minLength: 7
                  pattern: ^[0-9]{7,11}$
                  type: string
                  description: The phone number without the country calling code
              description: Phone number
            email_addresses:
              required:
                - primary
              type: object
              properties:
                primary:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: Email addresses for this sub-entity.
            invitee:
              title: Invitee
              type: object
              properties:
                email:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: The details of the user responsible for onboarding the sub-entity.
          description: Contact details of this sub-entity.
        capabilities:
          title: Capabilities
          type: object
          description: The capabilities of the entity.
          readOnly: true
        requirements_due:
          title: Requirements Due
          minItems: 0
          type: array
          items:
            title: Requirements due entry
            type: object
            properties:
              field:
                title: Field
                type: string
                description: The field that is needs to be addressed.
              reason:
                title: Reason
                type: string
                description: The reason behind the field needing attention.
              message:
                title: Message
                type: string
                description: A more descriptive message.
            description: A list of fields which require attention
            readOnly: true
          description: List of requirements due in order to be onboarded.
          readOnly: true
        company:
          title: Business
          required:
            - trading_name
            - date_of_incorporation
            - principal_address
            - representatives
            - business_type
          type: object
          properties:
            trading_name:
              title: Trading name
              maxLength: 300
              minLength: 2
              type: string
              description: The trading name of the sub-entity, also referred to as 'doing business as'.
            date_of_incorporation:
              title: Date of Incorporation
              required:
                - month
                - year
              type: object
              properties:
                day:
                  maximum: 31
                  minimum: 1
                  type: integer
                  description: The day of the month the company was incorporated.
                month:
                  maximum: 12
                  minimum: 1
                  type: integer
                  description: The month the company was incorporated.
                year:
                  maximum: 2999
                  minimum: 1500
                  type: integer
                  description: The year the company was incorporated.
              description: The date the company was incorporated.
            principal_address:
              title: Principal Address
              required:
                - address_line1
                - city
                - zip
                - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: State
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                zip:
                  title: UK Postal Code
                  maxLength: 8
                  minLength: 5
                  pattern: ^[A-Za-z]{1,2}([0-9]{1,2}|[0-9][A-Za-z])\s?[0-9][A-Za-z]{2}$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The primary location where business is performed.
            representatives:
              title: Representative List
              maxItems: 1
              minItems: 1
              type: array
              items:
                title: Person of Interest
                required:
                  - individual
                  - roles
                  - documents
                type: object
                properties:
                  id:
                    maxLength: 30
                    minLength: 30
                    pattern: ^rep_[a-z0-9]{26}$
                    description: The representative's id.
                  individual:
                    title: Individual
                    type: object
                    required:
                      - first_name
                      - last_name
                      - date_of_birth
                      - place_of_birth
                      - address
                    properties:
                      first_name:
                        title: First name
                        maxLength: 50
                        minLength: 2
                        type: string
                        description: The representative's first name.
                      middle_name:
                        title: Middle name
                        maxLength: 50
                        minLength: 2
                        type: string
                        description: The representative's middle name. Required if appears in official docs
                      last_name:
                        title: Last name
                        maxLength: 50
                        minLength: 2
                        type: string
                        description: The representative's last name.
                      date_of_birth:
                        title: Date of birth
                        required:
                          - day
                          - month
                          - year
                        type: object
                        properties:
                          day:
                            maximum: 31
                            minimum: 1
                            type: integer
                            description: The calendar day of the month they were born.
                          month:
                            maximum: 12
                            minimum: 1
                            type: integer
                            description: The month of the year they were born.
                          year:
                            maximum: 2999
                            minimum: 1900
                            type: integer
                            description: The year they were born.
                        description: The date of birth of the person according to the Gregorian calendar.
                      place_of_birth:
                        title: Place of Birth
                        required:
                          - country
                        properties:
                          country:
                            title: Country
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            type: string
                            description: The country code (iso-3166-1 alpha-2)
                            format: iso-3166-1-alpha-2
                        description: The place of birth of the person.
                      national_id_number:
                        title: Social security number (SSN or ITIN) - US Residents Only
                        maxLength: 9
                        minLength: 9
                        pattern: ^\d{9}$
                        description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                      email_address:
                        title: Email
                        description: The representative's personal email address.
                        format: email
                      phone:
                        title: Phone number
                        required:
                          - country_code
                          - number
                        type: object
                        properties:
                          country_code:
                            title: Country calling code
                            enum:
                              - AF
                              - AL
                              - DZ
                              - AS
                              - AD
                              - AO
                              - AI
                              - AG
                              - AR
                              - AM
                              - AW
                              - AU
                              - AT
                              - AZ
                              - BS
                              - BH
                              - BD
                              - BB
                              - BY
                              - BE
                              - BZ
                              - BJ
                              - BM
                              - BT
                              - BO
                              - BA
                              - BW
                              - BR
                              - BN
                              - BG
                              - BF
                              - BI
                              - CV
                              - KH
                              - CM
                              - CA
                              - KY
                              - CF
                              - TD
                              - CL
                              - CN
                              - CO
                              - KM
                              - CD
                              - CG
                              - CK
                              - CR
                              - HR
                              - CU
                              - CW
                              - CY
                              - CZ
                              - DK
                              - DJ
                              - DM
                              - DO
                              - EC
                              - EG
                              - SV
                              - GQ
                              - ER
                              - EE
                              - SZ
                              - ET
                              - FO
                              - FJ
                              - FI
                              - FR
                              - GF
                              - PF
                              - GA
                              - GM
                              - GE
                              - DE
                              - GH
                              - GI
                              - GR
                              - GL
                              - GD
                              - GP
                              - GU
                              - GT
                              - GG
                              - GN
                              - GW
                              - GY
                              - HT
                              - HN
                              - HK
                              - HU
                              - IS
                              - IN
                              - ID
                              - IR
                              - IQ
                              - IE
                              - IM
                              - IL
                              - IT
                              - JM
                              - JP
                              - JE
                              - JO
                              - KZ
                              - KE
                              - KI
                              - KP
                              - KR
                              - KW
                              - KG
                              - LA
                              - LV
                              - LB
                              - LS
                              - LR
                              - LY
                              - LI
                              - LT
                              - LU
                              - MO
                              - MG
                              - MW
                              - MY
                              - MV
                              - ML
                              - MT
                              - MH
                              - MQ
                              - MR
                              - MU
                              - MX
                              - FM
                              - MD
                              - MC
                              - MN
                              - ME
                              - MS
                              - MA
                              - MZ
                              - MM
                              - NA
                              - NR
                              - NP
                              - NL
                              - NC
                              - NZ
                              - NI
                              - NE
                              - NG
                              - NU
                              - NF
                              - MK
                              - MP
                              - NO
                              - OM
                              - PK
                              - PW
                              - PA
                              - PG
                              - PY
                              - PE
                              - PH
                              - PL
                              - PT
                              - PR
                              - QA
                              - RE
                              - RO
                              - RU
                              - RW
                              - BL
                              - SH
                              - KN
                              - LC
                              - PM
                              - VC
                              - WS
                              - SM
                              - ST
                              - SA
                              - SN
                              - RS
                              - SC
                              - SL
                              - SG
                              - BQ
                              - SX
                              - SK
                              - SI
                              - SB
                              - SO
                              - ZA
                              - GS
                              - SS
                              - ES
                              - LK
                              - SD
                              - SR
                              - SE
                              - CH
                              - SY
                              - TW
                              - TJ
                              - TZ
                              - TH
                              - TL
                              - TG
                              - TK
                              - TO
                              - TT
                              - TN
                              - TR
                              - TM
                              - TC
                              - TV
                              - UG
                              - UA
                              - AE
                              - GB
                              - US
                              - UY
                              - UZ
                              - VU
                              - VA
                              - VE
                              - VN
                              - VG
                              - VI
                              - WF
                              - EH
                              - YE
                              - ZM
                              - ZW
                            type: string
                            description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                          number:
                            title: Phone number
                            maxLength: 16
                            minLength: 5
                            pattern: ^[0-9]{5,16}$
                            type: string
                            description: The phone number without the country calling code
                        description: Phone number
                      address:
                        title: Address
                        required:
                          - address_line1
                          - city
                          - zip
                          - country
                        type: object
                        properties:
                          address_line1:
                            title: Address line 1
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            type: string
                            description: The first line of the address.
                          address_line2:
                            title: Address line 2
                            maxLength: 300
                            description: The second line of the address.
                          city:
                            title: City
                            maxLength: 300
                            minLength: 2
                            type: string
                            description: The address city.
                          state:
                            title: State
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            type: string
                            description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                          zip:
                            title: Postal code
                            maxLength: 16
                            minLength: 1
                            pattern: ^[a-zA-Z0-9-\s]+$
                            type: string
                            description: The address zip/postal code.
                          country:
                            title: Country
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            type: string
                            description: The country code (iso-3166-1 alpha-2)
                            format: iso-3166-1-alpha-2
                        description: The representative's address.
                    description: Information about the individual representing the sub-entity.
                  roles:
                    title: Roles within company
                    maxItems: 1
                    minItems: 1
                    uniqueItems: true
                    type: array
                    items:
                      title: Representative Role
                      enum:
                        - ubo
                      type: string
                      description: The representative's role
                    description: The individual's roles within the company
                  documents:
                    title: Documents
                    required:
                      - identity_verification
                    type: object
                    properties:
                      identity_verification:
                        title: Document
                        required:
                          - type
                          - front
                        type: object
                        properties:
                          type:
                            title: Document type
                            enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                            type: string
                            description: The type of document used for identity verification
                          front:
                            title: Front
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the front side of the document as represented within Checkout.com systems.
                          back:
                            title: Back
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the back side of the document as represented within Checkout.com systems.
                        description: The document to use to confirm the individual's identity.
                    additionalProperties: false
                    description: Verification documents for the individual representative
                description: Personal information about the individual representing the sub-entity.
              description: Information about representatives of this company.
            business_type:
              title: Business type
              enum:
                - individual_or_sole_proprietorship
                - limited_company
                - public_limited_company
                - limited_partnership
                - general_partnership
                - scottish_limited_partnership
                - government_agency
                - non_profit_entity
                - trust
                - club_or_society
                - unincorporated_association
              type: string
              description: The legal type of the company
          description: Information about the sole trader's business.
        processing_details:
          type: object
          allOf:
            - title: Processing Details
              required:
                - settlement_country
                - target_countries
                - annual_processing_volume
                - average_transaction_value
                - highest_transaction_value
                - currency
              type: object
              properties:
                settlement_country:
                  title: Destination of funds
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2) where the settlement bank account is located
                  format: iso-3166-1-alpha-2
                target_countries:
                  title: Target countries
                  maxItems: 10
                  minItems: 1
                  type: array
                  items:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                  description: Target country codes (iso-3166-1 alpha-2) with more than 10% expected volume processing with Checkout
                annual_processing_volume:
                  title: Estimated annual processing volume
                  minimum: 0
                  type: integer
                  description: The estimated annual processing volume. In minor units without decimals.
                average_transaction_value:
                  title: Average sales price
                  minimum: 0
                  type: integer
                  description: The expected average transaction value. In minor units without decimals.
                highest_transaction_value:
                  title: Highest transaction value
                  minimum: 0
                  type: integer
                  description: The expected highest transaction value. In minor units without decimals.
                currency:
                  title: Currency
                  enum:
                    - GBP
                  type: string
                  description: The currency used for the processing details provided.
              description: Seller processing details.
        documents:
          title: Documents
          required:
            - bank_verification
          type: object
          properties:
            bank_verification:
              title: Bank Verification
              required:
                - type
                - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                    - bank_statement
                  type: string
                  description: The type of document being used as bank verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A document showing transactions from last 3 months
            additional_document1:
              title: Additional Documentation
              required:
                - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document2:
              title: Additional Documentation
              required:
                - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document3:
              title: Additional Documentation
              required:
                - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
          description: The documents used to support the verification of business details.
      
    GBSoleTraderLite2-0:
      type: object
      allOf:
      - title: Create & Submit regulated GB Individual (V2.0)
        required:
        - reference
        - individual
        - contact_details
        - profile
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 10000000
                    maxLength: 16
                    minLength: 8
                    pattern: ^[1-9][0-9]{7,15}$
                    description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                description: The phone number of the sub-entity.
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: Email addresses for this sub-entity.
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
                description: The details of the user responsible for onboarding the sub-entity.
            description: Contact details of this sub-entity.
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          documents:
            title: Document
            required:
            - identity_verification
            type: object
            properties:
              identity_verification:
                title: Document
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - passport
                    - national_identity_card
                    - driving_license
                    - citizen_card
                    - residence_permit
                    - electoral_id
                    type: string
                    description: The type of document used for identity verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                  back:
                    title: Back
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the back side of the document as represented within Checkout.com systems.
                description: The document to use to confirm the individual's identity.
            description: A legal document used to verify identity.
          individual:
            title: Individual
            required:
            - first_name
            - last_name
            - registered_address
            - trading_name
            type: object
            properties:
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              first_name:
                title: First name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's first name.
              middle_name:
                title: Middle name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's middle name. Required if appears in official docs
              last_name:
                title: Last name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's last name.
              date_of_birth:
                title: Date of birth
                required:
                - day
                - month
                - year
                type: object
                properties:
                  day:
                    maximum: 31
                    minimum: 1
                    type: integer
                    description: The calendar day of the month they were born.
                  month:
                    maximum: 12
                    minimum: 1
                    type: integer
                    description: The month of the year they were born.
                  year:
                    maximum: 2999
                    minimum: 1900
                    type: integer
                    description: The year they were born.
                description: The date of birth of the person according to the Gregorian calendar.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: State
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                  zip:
                    title: UK Postal Code
                    maxLength: 8
                    minLength: 5
                    pattern: ^[A-Za-z]{1,2}([0-9]{1,2}|[0-9][A-Za-z])\s?[0-9][A-Za-z]{2}$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
            description: Information about the individual represented by the sub-entity.
    GetScheduleResponse:
      type: object
      properties:
        GBP:
          description: The three-letter ISO currency code of the account's currency.
          type: object
          format: ISO 4217
          minLength: 3
          maxLength: 3
          properties:
            recurrence:
              type: object
              description: Information about how often the schedule takes place.
              properties:
                enabled:
                  type: boolean
                  default: false
                  description: Indicates the status of the payout schedule.
                  example: true
                threshold:
                  type: number
                  description: Minimum available balance on the account to do a payout. If the balance is less than the threshold, then the payout instruction will not send.
                  example: 100
                payment_instrument_id:
                  type: string
                  description: The ID of the platforms payment instrument used for payouts on this schedule.
                  example: ppi_w4jelhppmfiufdnatam37wrfc4
                schedule:
                  type: object
                  discriminator:
                    propertyName: frequency
                    mapping:
                      weekly: '#/components/schemas/ScheduleFrequencyWeekly'
                      daily: '#/components/schemas/ScheduleFrequencyDaily'
                      monthly: '#/components/schemas/ScheduleFrequencyMonthly'
                  description: Details about the payout schedule. Required if `enabled` is set to `true`.
                  properties:
                    frequency:
                      type: string
                      enum:
                        - weekly
                        - daily
                        - monthly
                      description: Used to indicate how often funds should be paid out to a sub-entity.
                      example: 'weekly'
                  example:
                    frequency: 'weekly'
                    by_day: ['monday']
            _links:
              additionalProperties:
                $ref: '#/components/schemas/Link'
              example:
                self:
                  href: 'https://{prefix}.api.checkout.com/accounts/entities/ent_wxglze3wwywujg4nna5fb7ldli'
    PlatformsHostedOnboardGetMembers:
      type: object
      title: Sub-entity members response
      properties:
        data:
          type: array
          title: Data
          description: The list of members of the sub-entity.
          items:
            type: object
            title: Members
            properties:
              user_id:
                type: string
                title: User id
                description: The unique ID used to identify a sub-entity member.
                example: usr_eyk754cqieqexfh6u46no5nnha
        links:
          $ref: '#/components/schemas/EntityLinks'
    PlatformsHostedOnboardInviteRequest:
      type: object
      title: Hosted Onboarding Invitation Request
      description: |
        <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p>
        Create a sub-entity and send an invite to the seller to onboard with Checkout.com. The seller will receive an email with a link to the Dashboard, where they can complete their onboarding application. Only one user can be invited to onboard the sub-entity through Hosted Onboarding.
      
        To enable the <a href="https://www.checkout.com/docs/platforms/onboard-sub-entities/onboard-with-hosted-onboarding" target="_blank">Hosted Onboarding</a> feature, contact your Account Manager.
      properties:
        reference:
          type: string
          description: A unique reference you can later use to identify the sub-entity.
          minLength: 1
          maxLength: 50
          example: superhero1234
        is_draft:
          type: boolean
          description: |
            Specifies whether the sub-entity details are in draft. 
      
            Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
        contact_details:
          title: Contact details
          type: object
          description: The contact details of the members invited to onboard the sub-entity
          properties:
            invitee:
              title: Invitee
              type: object
              description: The details of the user responsible for onboarding the sub-entity.
              properties:
                email:
                  title: Email
                  type: string
                  description: The email of the user responsible for onboarding the sub-entity.
                  format: email
                  example: 'admin@superhero1234.com'
              required:
                - email
          required:
            - invitee
      required:
        - reference
        - contact_details
        - is_draft
    PlatformsHostedOnboardReinviteRequest:
      type: object
      title: Reinvite sub-entity member
    PlatformsHostedOnboardReinviteResponse:
      type: object
      title: Reinvite sub-entity member
    PlatformsInstrumentDetailsAch:
      type: object
      title: InstrumentDetailsAch
      required:
        - account_number
        - routing_number
        - account_type
      properties:
        account_number:
          title: Account number
          description: The alphanumeric value that identifies the account.
          type: string
          example: '12345100'
        routing_number:
          title: Routing number
          description: The 9-digit American Bankers Association (ABA) routing number that identifies the financial institution.
          type: string
          pattern: '^[0-9]{9}$'
          example: '026009593'
        account_type:
          title: Account type
          description: The type of bank account.
          type: string
          enum:
            - savings
            - checking
          example: savings
    PlatformsInstrumentDetailsFasterPayments:
      type: object
      title: InstrumentDetailsFasterPayments
      required:
        - account_number
        - bank_code
      properties:
        account_number:
          title: Account number
          description: The alphanumeric value that identifies the account
          type: string
          example: '13654567455'
        bank_code:
          title: Bank code
          description: The code that identifies the bank
          type: string
          example: '123-456'
    PlatformsInstrumentDetailsSepa:
      type: object
      title: InstrumentDetailsSepa
      required:
        - iban
        - swift_bic
      properties:
        iban:
          title: IBAN
          description: The account's International Bank Account Number (IBAN)
          type: string
          minLength: 5
          maxLength: 34
          example: 'HU93116000060000000012345676'
        swift_bic:
          title: SwiftBic
          description: An 8 or 11 character code that identifies the bank or bank branch
          type: string
          format: ISO 9362:2009
          example: '37040044'
    PlatformsPaymentInstrumentBankAccount:
      type: object
      title: PaymentInstrumentBankAccount
      allOf:
        - $ref: '#/components/schemas/PlatformsPaymentInstrument'
        - type: object
          required:
            - country
            - document
            - instrument_details
          properties:
            country:
              title: Country
              description: The account's country, as a two-letter ISO country code
              type: string
              format: ISO 3166-1
              example: 'GB'
            default:
              title: Default
              type: boolean
              deprecated: true
              description: |
                For ad-hoc payouts, the payment instrument is explicitly specified in the payout request.
                For scheduled payouts, the first payment instrument created for a given currency will be used for that currency's payout schedule.
                To change the payment instrument associated with a payout schedule, update the payout schedule.
                (Deprecated) Specifies whether the payment instrument should be set as the default payout destination.
            document:
              type: object
              title: Document
              description: A legal document used to verify the bank account
              properties:
                type:
                  type: string
                  description: The document type
                  enum:
                    - bank_statement
                  default: bank_statement
                  example: bank_statement
                file_id:
                  type: string
                  description: The file ID of the uploaded document. The document must have been uploaded for the purpose of `"bank_verification"`.
                  example: file_wxglze3wwywujg4nna5fb7ldli
            instrument_details:
              description: Details of the payment instrument being created.
              oneOf:
                - $ref: '#/components/schemas/PlatformsInstrumentDetailsFasterPayments'
                - $ref: '#/components/schemas/PlatformsInstrumentDetailsSepa'
                - $ref: '#/components/schemas/PlatformsInstrumentDetailsAch'
    PlatformsInstrumentDetailsCardToken:
      description: Card Token Request
      allOf:
        - $ref: '#/components/schemas/PlatformsPaymentInstrument'
        - type: object
          required:
            - token
            - instrument_details
          properties:
            instrument_details:
              description: Details of the payment instrument being created
              type: object
              properties:
                token:
                  title: Token
                  description: The token that identifies the card
                  type: string
                  example: 'tok_4gzeau5o2uqubbk6fufs3m7p54'
              
    PlatformsPaymentInstrument:
      type: object
      title: PaymentInstrumentBase
      required:
        - label
        - type
        - currency
      properties:
        label:
          title: Label
          description: A reference that you can use to identify the payment instrument
          type: string
          minLength: 1
          maxLength: 50
          example: Peter's Personal Account
        type:
          title: Type
          description: The instrument type
          type: string
          enum:
            - bank_account
            - card_token
        currency:
          title: Currency
          description: The account's currency, as a 3-letter ISO currency code
          type: string
          format: ISO 4217
          minLength: 3
          maxLength: 3
          example: 'GBP'
    PlatformsPaymentInstrumentCreate:
      type: object
      title: PaymentInstrumentCreateRequest
      discriminator:
        propertyName: type
        mapping:
          card_token: '#/components/schemas/PlatformsInstrumentDetailsCardToken'
          bank_account: '#/components/schemas/PlatformsPaymentInstrumentBankAccount'
      required:
        - label
        - type
        - currency
        - instrument_details
      properties:
        type:
          type: string
          description: The type of instrument
          example: 'bank_account'
    PlatformsPaymentInstrumentQuery:
      type: object
      title: PaymentInstrumentQueryResponse
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PlatformsPaymentInstrumentRead'
        _links:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Link'
    PlatformsPaymentInstrumentRead:
      type: object
      title: PaymentInstrumentReadResponse
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: The ID of the sub-entity's payment instrument.
              example: ppi_qn4nis4k3ykpzzu7cvtuvhqqga
            status:
              $ref: '#/components/schemas/PlatformsPaymentInstrumentStatus'
            instrument_id:
              type: string
              title: Status
              description: The payment instrument's ID. Only available once the instrument status is `verified`.
              example: src_wmlfc3zyhqzehihu7giusaaawu
        - $ref: '#/components/schemas/PlatformsPaymentInstrument'
        - type: object
          properties:
            _links:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Link'
              
    PlatformsPaymentInstrumentStatus:
      type: string
      title: Status
      description: The status of your sub-entity's payment instrument. The status indicates the instrument's stage of verification, and whether it can be used for payouts.
      example: verified
      enum:
        - pending
        - verified
        - unverified
    PlatformsPaymentInstrumentUpdate:
      type: object
      title: PaymentInstrumentUpdateRequest
      properties:
        label:
          title: Label
          description: A reference that you can use to identify the payment instrument.
          type: string
          minLength: 1
          maxLength: 50
          example: Peter's Personal Account
        default:
          title: Default
          type: boolean
          deprecated: true
          description: |
            For ad-hoc payouts, the payment instrument is explicitly specified in the payout request.
            For scheduled payouts, the first payment instrument created for a given currency will be used for that currency's payout schedule.
            To change the payment instrument associated with a payout schedule, update the payout schedule.
            (Deprecated) Specifies whether the payment instrument should be set as the default payout destination.
        headers:
          required:
            - if-match
          type: object
          properties:
            if-match:
              type: string
              description: The payment instrument ETag value
              example: 'Y3Y9MCZydj0w'
    PlatformsFileRetrieveResponse:
      type: object
      properties:
        id:
          type: string
          description: The ID of the file.
          example: file_6lbss42ezvoufcb2beo76rvwly
        status:
          type: string
          description: The current status of the file.
          example: invalid
        status_reasons:
          type: array
          items:
            type: string
          description: If `status` is `Invalid`, returns the reasons why the file was invalid. If `status` is any other value, returns `Null`.
          example: ['InvalidMimeType']
        size:
          type: number
          description: The size of the file in KB.
          example: 1024
        mime_type:
          type: string
          description: The MIME type of the file.
          example: application/pdf
        uploaded_on:
          type: string
          format: date-time
          description: The date and time the file was uploaded, in ISO 8601 UTC format.
          example: '2020-12-01T15:01:01Z'
        purpose:
          type: string
          description: The purpose of the file, as provided in the initial request.
          example: identity_verification
          enum:
            - identity_verification
            - dispute_evidence
            - bank_verification
            - company_verification
            - financial_verification
            - tax_verification
        _links:
          additionalProperties:
            $ref: '#/components/schemas/Link'
          example:
            download:
              href: 'https://s3.eu-west-1.amazonaws.com/mp-files-api-clean-prod/ent_ociwguf5a5fe3ndmpnvpnwsi3e/file_6lbss42ezvoufcb2beo76rvwly?X-Amz-Expires=3600&x-amz-security-token=some_token'
            self:
              href: 'https://files.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly'
    PlatformsFileUpload:
      type: object
      required:
        - purpose
      properties:
        purpose:
          type: string
          description: The purpose of the file upload.
          enum:
            - additional_document
            - articles_of_association
            - bank_verification
            - certified_authorised_signatory
            - company_ownership
            - company_verification
            - financial_verification
            - identity_verification
            - proof_of_legality
            - proof_of_principal_address
            - shareholder_structure
            - tax_verification
            - proof_of_residential_address
            - proof_of_registration
          example: 'identity_verification'
    PlatformsFileUploadResponse:
      type: object
      description: File uploaded successfully.
      properties:
        id:
          type: string
          description: The file identifier.
          example: 'file_6lbss42ezvoufcb2beo76rvwly'
        maximum_size_in_bytes:
          type: number
          description: The maximum file size allowed, in bytes.
          example: 4194304
        document_types_for_purpose:
          type: array
          items:
            type: string
          description: The MIME file types allowed for the document purpose, provided on the initial file upload request.
          example: ['image/jpeg', 'image/png', 'image/jpg']
        _links:
          type: object
          properties:
            upload:
              description: |
                Send a data-binary type request to this URL with your file attached. For example:
      
                ```
                curl --location --request PUT 'https://s3.eu-west-1.amazonaws.com/mp-files-api-staging-prod/ent_ociwguf5a5fe3ndmpnvpnwsi3e/file_6lbss42ezvoufcb2beo76rvwly?AWSAccessKeyId=ASIX4BFJOBCQFLAMPKU3&Expires=1661355993&x-amz-security-token=some_token'
                --data-binary '@/C:/Users/Test/test.pdf'
                ```
              properties:
                href:
                  type: string
                  example: 'https://s3.eu-west-1.amazonaws.com/mp-files-api-staging-prod/ent_ociwguf5a5fe3ndmpnvpnwsi3e/file_6lbss42ezvoufcb2beo76rvwly?AWSAccessKeyId=ASIX4BFJOBCQFLAMPKU3&Expires=1661355993&x-amz-security-token=some_token'
            self:
              description: The file information retrieval URL.
              properties:
                href:
                  type: string
                  example: 'https://files.checkout.com/files/file_6lbss42ezvoufcb2beo76rvwly'
    ReserveRuleCreateRequest:
      title: ReserveRuleCreateRequest
      type: object
      allOf:
        - $ref: '#/components/schemas/ReserveRuleUpdateRequest'
        - type: object
          properties:
            valid_from:
              type: string
              description: The date and time the reserve rule will come into effect. This must be at least 15 minutes in the future.
              format: date-time
          required:
          - valid_from
    ReserveRuleId:
      title: ReserveRuleId
      type: string
      example: rsv_qn4nis4k3ykpzzu7cvtuvhqqga
    ReserveRuleQueryResponse:
      title: ReserveRuleQueryResponse
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ReserveRuleReadResponse'
        _links:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/Link'
    ReserveRuleReadResponse:
      title: ReserveRuleReadResponse
      type: object
      allOf:
        - $ref: '#/components/schemas/ReserveRuleCreateRequest'
        - type: object
          properties:
            id:
              $ref: '#/components/schemas/ReserveRuleId'
        - type: object
          properties:
            _links:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Link'
    ReserveRuleUpdateRequest:
      title: ReserveRuleUpdateRequest
      type: object
      required:
      - type
      - rolling
      properties:
        type:
          type: string
          enum:
            - rolling
        rolling:
          $ref: "#/components/schemas/RollingReserveRule"
            
    ReserveRuleWriteResponse:
      title: ReserveRuleWriteResponse
      type: object
      allOf:
        - type: object
          properties:
            id:
              $ref: '#/components/schemas/ReserveRuleId'
        - type: object
          properties:
            _links:
              type: object
              properties:
                self:
                  $ref: '#/components/schemas/Link'
    RollingReserveRule:
      title: RollingReserveRule
      type: object
      properties:
        percentage:
          type: number
          description: The percentage of captured funds that will be reserved as a collateral balance.
          example: 10.00
          multipleOf: 0.01
          minimum: 0
          maximum: 100
        holding_duration:
          type: object
          description: The length of time the collateral balance will be reserved for.
          properties:
            weeks:
              type: integer
              example: 2
              minimum: 2
              maximum: 104
          required:
          - weeks
      required:
      - percentage
      - holding_duration
    ScheduleFrequencyDaily:
      type: object
      properties:
        frequency:
          type: string
          description: Used to indicate how often funds should be paid out to a sub-entity.
    ScheduleFrequencyMonthly:
      type: object
      properties:
        frequency:
          type: string
          description: Used to indicate how often funds should be paid out to a sub-entity.
        by_month_day:
          type: array
          description: The day or days of the month the payout should take place.
          items:
            type: integer
            minimum: 1
            maximum: 28
            example: 2
      required:
        - by_month_day
    ScheduleFrequencyWeekly:
      type: object
      properties:
        frequency:
          type: string
          description: Used to indicate how often funds should be paid out to a sub-entity.
        by_day:
          description: The day or days of the week the payout should take place.
          type: array
          items:
            type: string
            enum:
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
            - saturday
            - sunday
      required:
        - by_day
    UpdateScheduleRequest:
      type: object
      properties:
        ISO:
          description: The three-letter ISO currency code of the account's currency.
          type: object
          format: ISO 4217
          minLength: 3
          maxLength: 3
          properties:
            enabled:
              type: boolean
              default: false
              description: Indicates the status of the payout schedule.
              example: true
            threshold:
              type: number
              description: Minimum available balance on the account to do a payout. If the balance is less than the threshold, then the payout instruction will not send.
              example: 100
            payment_instrument_id:
              type: string
              description: The ID of the platforms payment instrument used for payouts on this schedule.
              example: ppi_w4jelhppmfiufdnatam37wrfc4
            recurrence:
              type: object
              description: Information about how often the schedule takes place.
              discriminator:
                propertyName: frequency
                mapping:
                  weekly: '#/components/schemas/ScheduleFrequencyWeekly'
                  daily: '#/components/schemas/ScheduleFrequencyDaily'
                  monthly: '#/components/schemas/ScheduleFrequencyMonthly'
              properties:
                frequency:
                  type: string
                  example: 'weekly'
              example:
                frequency: weekly
                by_day: [ monday ]
    USCompanyFull2-0:
      type: object
      allOf:
      - title: Create & Submit US Company (V2.0)
        required:
        - reference
        - company
        - contact_details
        - profile
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
              default_holding_currency:
                title: Main currency
                description: The default holding currency code (iso-4217)
                format: iso-4217
              holding_currencies:
                title: Currencies
                items:
                  title: Currency
                  type: string
                  enum:
                  - USD
                  description: The currency code (iso-4217)
                description: Incoming funds are held in your selected currencies
                default:
                - USD
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 2000000000
                    maxLength: 16
                    minLength: 10
                    pattern: ^[2-9]{1}[0-9]{9,15}$
                    description: Include the area code
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          company:
            title: Company
            required:
            - legal_name
            - trading_name
            - registered_address
            - principal_address
            - representatives
            - business_registration_number
            - business_type
            - financial_details
            type: object
            properties:
              legal_name:
                title: Legal name
                maxLength: 300
                minLength: 2
                type: string
                description: The legal name of the sub-entity.
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              business_registration_number:
                title: Employer Identification Number (EIN)
                maxLength: 9
                minLength: 9
                pattern: ^[0-9]{9}$
                type: string
                description: Employer Identification Number (EIN).
              principal_address:
                title: Principal Address
                required:
                - address_line1
                - city
                - zip
                - state
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: US State
                    enum:
                    - AL
                    - AK
                    - AZ
                    - AR
                    - CA
                    - CO
                    - CT
                    - DE
                    - DC
                    - FL
                    - GA
                    - HI
                    - ID
                    - IL
                    - IN
                    - IA
                    - KS
                    - KY
                    - LA
                    - ME
                    - MD
                    - MA
                    - MI
                    - MN
                    - MS
                    - MO
                    - MT
                    - NE
                    - NV
                    - NH
                    - NJ
                    - NM
                    - NY
                    - NC
                    - ND
                    - OH
                    - OK
                    - OR
                    - PA
                    - RI
                    - SC
                    - SD
                    - TN
                    - TX
                    - UT
                    - VT
                    - VA
                    - WA
                    - WV
                    - WI
                    - WY
                    - AS
                    - GU
                    - MP
                    - PR
                    - VI
                    - UM
                    type: string
                    description: The address state. This field is required for addresses based in the US. For US addresses, provide the state as an ISO 3166-1 code.
                  zip:
                    title: Zip code
                    maxLength: 10
                    minLength: 5
                    pattern: ^\d{5}(?:[-\s]\d{4})?$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The primary location of the company where business is performed.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - state
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: US State
                    enum:
                    - AL
                    - AK
                    - AZ
                    - AR
                    - CA
                    - CO
                    - CT
                    - DE
                    - DC
                    - FL
                    - GA
                    - HI
                    - ID
                    - IL
                    - IN
                    - IA
                    - KS
                    - KY
                    - LA
                    - ME
                    - MD
                    - MA
                    - MI
                    - MN
                    - MS
                    - MO
                    - MT
                    - NE
                    - NV
                    - NH
                    - NJ
                    - NM
                    - NY
                    - NC
                    - ND
                    - OH
                    - OK
                    - OR
                    - PA
                    - RI
                    - SC
                    - SD
                    - TN
                    - TX
                    - UT
                    - VT
                    - VA
                    - WA
                    - WV
                    - WI
                    - WY
                    - AS
                    - GU
                    - MP
                    - PR
                    - VI
                    - UM
                    type: string
                    description: The address state. This field is required for addresses based in the US. For US addresses, provide the state as an ISO 3166-1 code.
                  zip:
                    title: Zip code
                    maxLength: 10
                    minLength: 5
                    pattern: ^\d{5}(?:[-\s]\d{4})?$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
              representatives:
                title: Representative List
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Representative
                  required:
                  - first_name
                  - last_name
                  - address
                  - date_of_birth
                  - identification
                  - roles
                  type: object
                  properties:
                    id:
                      maxLength: 30
                      minLength: 30
                      pattern: ^rep_[a-z0-9]{26}$
                      description: The representative's id.
                    first_name:
                      title: First name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's first name.
                    middle_name:
                      title: Middle name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's middle name. Required if appears in official docs
                    last_name:
                      title: Last name
                      maxLength: 50
                      minLength: 2
                      type: string
                      description: The representative's last name.
                    identification:
                      title: Individual identification
                      required:
                      - national_id_number
                      type: object
                      properties:
                        national_id_number:
                          title: Social security number (SSN or ITIN) - US Residents Only
                          maxLength: 9
                          minLength: 9
                          pattern: ^\d{9}$
                          description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                      description: Information about representatives of this company.
                    date_of_birth:
                      title: Date of birth
                      required:
                      - day
                      - month
                      - year
                      type: object
                      properties:
                        day:
                          maximum: 31
                          minimum: 1
                          type: integer
                          description: The calendar day of the month they were born.
                        month:
                          maximum: 12
                          minimum: 1
                          type: integer
                          description: The month of the year they were born.
                        year:
                          maximum: 2999
                          minimum: 1900
                          type: integer
                          description: The year they were born.
                      description: The date of birth of the person according to the Gregorian calendar.
                    phone:
                      title: Phone
                      required:
                      - number
                      type: object
                      properties:
                        number:
                          title: Phone number
                          maximum: 9999999999999999
                          minimum: 10000000
                          maxLength: 16
                          minLength: 8
                          pattern: ^[1-9][0-9]{7,15}$
                          description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                      description: The phone number of the sub-entity.
                    address:
                      title: Address
                      required:
                      - country
                      - address_line1
                      - city
                      - zip
                      type: object
                      properties:
                        address_line1:
                          title: Address line 1
                          maxLength: 300
                          minLength: 1
                          pattern: '\S'
                          type: string
                          description: The first line of the address.
                        address_line2:
                          title: Address line 2
                          maxLength: 300
                          description: The second line of the address.
                        city:
                          title: City
                          maxLength: 300
                          minLength: 2
                          type: string
                          description: The address city.
                        state:
                          title: State
                          maxLength: 300
                          minLength: 1
                          pattern: '\S'
                          type: string
                          description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                        zip:
                          title: Postal code
                          maxLength: 16
                          minLength: 1
                          pattern: ^[a-zA-Z0-9-\s]+$
                          type: string
                          description: The address zip/postal code.
                        country:
                          title: Country
                          maxLength: 2
                          minLength: 2
                          pattern: '[a-zA-Z]{2}'
                          type: string
                          description: The country code (iso-3166-1 alpha-2)
                          format: iso-3166-1-alpha-2
                      description: The representative's address.
                    documents:
                      title: Document
                      required:
                      - identity_verification
                      type: object
                      properties:
                        identity_verification:
                          title: Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                              type: string
                              description: The type of document used for identity verification
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                            back:
                              title: Back
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the back side of the document as represented within Checkout.com systems.
                          description: The document to use to confirm the individual's identity.
                      description: A legal document used to verify identity
                    roles:
                      title: Roles within company
                      maxItems: 2
                      minItems: 1
                      uniqueItems: true
                      type: array
                      items:
                        title: Representative Role
                        enum:
                        - ubo
                        - authorised_signatory
                        - control_person
                        type: string
                        description: The representative's roles within the company
                      description: The individual's roles within the company
                  description: Information about representatives of this company.
                description: Information about representatives of this company.
              business_type:
                title: Business structure
                enum:
                - private_corporation
                - publicly_traded_corporation
                - government_agency
                - individual_or_sole_proprietorship
                - limited_liability_corporation
                - limited_partnership
                - non_profit_entity
                - sec_registered_entity
                - cftc_registered_entity
                - regulated_financial_institution
                type: string
                description: The legal type of the company
              financial_details:
                title: Financial Details
                required:
                - annual_processing_volume
                - average_transaction_value
                - highest_transaction_value
                - currency
                type: object
                properties:
                  annual_processing_volume:
                    title: Estimated annual processing volume
                    minimum: 0
                    type: integer
                    description: The estimated annual processing volume. In minor units without decimals.
                  average_transaction_value:
                    title: Average sales price
                    minimum: 0
                    type: integer
                    description: The expected average transaction value. In minor units without decimals.
                  highest_transaction_value:
                    title: Highest transaction value
                    minimum: 0
                    type: integer
                    description: The expected highest transaction value. In minor units without decimals.
                  currency:
                    title: Currency
                    enum:
                    - USD
                    type: string
                    description: The currency used for the processing details provided.
                description: Seller financial questions and supporting documents.
              date_of_incorporation:
                title: Date of Incorporation
                required:
                - month
                - year
                type: object
                properties:
                  day:
                    maximum: 31
                    minimum: 1
                    type: integer
                    description: The day of the month the company was incorporated.
                  month:
                    maximum: 12
                    minimum: 1
                    type: integer
                    description: The month the company was incorporated.
                  year:
                    maximum: 2999
                    minimum: 1500
                    type: integer
                    description: The year the company was incorporated.
                description: The date the company was incorporated.
            description: Information about the company represented by the sub-entity.
          documents:
            title: Documents
            type: object
            properties:
              company_verification:
                title: Company Verification
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - incorporation_document
                    - articles_of_association
                    type: string
                    description: The type of document being used for company verification.
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                description: The document to use to confirm the company's identity.
              tax_verification:
                title: Tax Verification
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - ein_letter
                    type: string
                    description: The type of document used for tax verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                description: Employer Identification Number document.
            description: The documents used to support the verification of company details.
    USCompanyFull3-0:
      type: object
      title: Create & Submit US Company (V3.0)
      required:
      - reference
      - company
      - profile
      - contact_details
      - documents
      - processing_details
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity.
        status:
          type: string
          readOnly: true
        is_draft:
          type: boolean
          description: >-
            Specifies whether the sub-entity details are in draft.
      
      
            Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
          writeOnly: true
        profile:
          title: Profile
          required:
          - urls
          - mccs
          - default_holding_currency
          - holding_currencies
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\//\S{2,293}$
                type: string
                description: The URL of the company's website.
                format: uri
              description: A collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                description: The merchant category code (4-digit ISO 18245).
              description: Select the categories that most closely describe the business
            default_holding_currency:
              title: Main currency
              description: The default holding currency code (iso-4217)
              format: iso-4217
            holding_currencies:
              title: Currencies
              minItems: 1
              items:
                title: Currency
                type: string
                enum:
                - USD
                description: The currency code (iso-4217)
              description: Incoming funds are held in your selected currencies
              default:
              - USD
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          type: object
          properties:
            phone:
              title: Phone number
              required:
              - country_code
              - number
              type: object
              properties:
                country_code:
                  title: Country calling code
                  enum:
                  - US
                  type: string
                  description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                number:
                  title: Phone number
                  maxLength: 16
                  minLength: 10
                  pattern: ^[1-9][0-9]{9,16}$
                  type: string
                  description: The phone number without the country calling code
              description: Phone number
            email_addresses:
              required:
              - primary
              type: object
              properties:
                primary:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: Email addresses for this sub-entity.
            invitee:
              title: Invitee
              type: object
              properties:
                email:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: The details of the user responsible for onboarding the sub-entity.
          description: Contact details of this sub-entity.
        capabilities:
          title: Capabilities
          type: object
          description: The capabilities of the entity.
          readOnly: true
        requirements_due:
          title: Requirements Due
          minItems: 0
          type: array
          items:
            title: Requirements due entry
            type: object
            properties:
              field:
                title: Field
                type: string
                description: The field that is needs to be addressed.
              reason:
                title: Reason
                type: string
                description: The reason behind the field needing attention.
              message:
                title: Message
                type: string
                description: A more descriptive message.
            description: A list of fields which require attention
            readOnly: true
          description: List of requirements due in order to be onboarded.
          readOnly: true
        company:
          title: Company
          required:
          - legal_name
          - trading_name
          - business_registration_number
          - date_of_incorporation
          - principal_address
          - registered_address
          - representatives
          - business_type
          type: object
          properties:
            legal_name:
              title: Legal name
              maxLength: 300
              minLength: 2
              type: string
              description: The legal name of the sub-entity.
            trading_name:
              title: Trading name
              maxLength: 300
              minLength: 2
              type: string
              description: The trading name of the sub-entity, also referred to as 'doing business as'.
            business_registration_number:
              title: Employer Identification Number (EIN)
              maxLength: 9
              minLength: 9
              pattern: ^[0-9]{9}$
              description: |
                The sub-entity's Business Registration Number. 
                
                This can be a Commercial Registration number, a Ministry of Commerce certificate number, or an equivalent registration number.
            date_of_incorporation:
              title: Date of Incorporation
              required:
              - month
              - year
              type: object
              properties:
                day:
                  maximum: 31
                  minimum: 1
                  type: integer
                  description: The day of the month the company was incorporated.
                month:
                  maximum: 12
                  minimum: 1
                  type: integer
                  description: The month the company was incorporated.
                year:
                  maximum: 2999
                  minimum: 1500
                  type: integer
                  description: The year the company was incorporated.
              description: The date the company was incorporated.
            principal_address:
              title: Principal Address
              required:
              - address_line1
              - city
              - zip
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: State
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                zip:
                  title: Postal code
                  maxLength: 16
                  minLength: 1
                  pattern: ^[a-zA-Z0-9-\s]+$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The primary location of the company where business is performed.
            registered_address:
              title: Registered Address
              required:
              - address_line1
              - city
              - zip
              - state
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: US State
                  enum:
                  - AL
                  - AK
                  - AZ
                  - AR
                  - CA
                  - CO
                  - CT
                  - DE
                  - DC
                  - FL
                  - GA
                  - HI
                  - ID
                  - IL
                  - IN
                  - IA
                  - KS
                  - KY
                  - LA
                  - ME
                  - MD
                  - MA
                  - MI
                  - MN
                  - MS
                  - MO
                  - MT
                  - NE
                  - NV
                  - NH
                  - NJ
                  - NM
                  - NY
                  - NC
                  - ND
                  - OH
                  - OK
                  - OR
                  - PA
                  - RI
                  - SC
                  - SD
                  - TN
                  - TX
                  - UT
                  - VT
                  - VA
                  - WA
                  - WV
                  - WI
                  - WY
                  - AS
                  - GU
                  - MP
                  - PR
                  - VI
                  - UM
                  type: string
                  description: The address state. This field is required for addresses based in the US. For US addresses, provide the state as an ISO 3166-1 code.
                zip:
                  title: Zip code
                  maxLength: 10
                  minLength: 5
                  pattern: ^\d{5}(?:[-\s]\d{4})?$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The registered address of the company.
            representatives:
              title: Representative List
              maxItems: 25
              minItems: 1
              type: array
              items:
                title: Representative
                type: object
                oneOf:
                - title: Person of Interest
                  required:
                  - individual
                  - roles
                  type: object
                  properties:
                    id:
                      maxLength: 30
                      minLength: 30
                      pattern: ^rep_[a-z0-9]{26}$
                      description: The representative's id.
                    individual:
                      title: Individual
                      type: object
                      allOf:
                      - title: Individual
                        required:
                        - first_name
                        - last_name
                        - date_of_birth
                        - place_of_birth
                        - address
                        type: object
                        properties:
                          first_name:
                            title: First name
                            maxLength: 50
                            minLength: 2
                            type: string
                            description: The representative's first name.
                          middle_name:
                            title: Middle name
                            maxLength: 50
                            minLength: 2
                            type: string
                            description: The representative's middle name. Required if appears in official docs
                          last_name:
                            title: Last name
                            maxLength: 50
                            minLength: 2
                            type: string
                            description: The representative's last name.
                          date_of_birth:
                            title: Date of birth
                            required:
                            - day
                            - month
                            - year
                            type: object
                            properties:
                              day:
                                maximum: 31
                                minimum: 1
                                type: integer
                                description: The calendar day of the month they were born.
                              month:
                                maximum: 12
                                minimum: 1
                                type: integer
                                description: The month of the year they were born.
                              year:
                                maximum: 2999
                                minimum: 1900
                                type: integer
                                description: The year they were born.
                            description: The date of birth of the person according to the Gregorian calendar.
                          place_of_birth:
                            title: Place of Birth
                            required:
                            - country
                            properties:
                              country:
                                title: Country
                                maxLength: 2
                                minLength: 2
                                pattern: '[a-zA-Z]{2}'
                                type: string
                                description: The country code (iso-3166-1 alpha-2)
                                format: iso-3166-1-alpha-2
                            description: The place of birth of the person.
                          national_id_number:
                            title: Social security number (SSN or ITIN) - US Residents Only
                            maxLength: 9
                            minLength: 9
                            pattern: ^\d{9}$
                            description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                          email_address:
                            title: Email
                            description: The main email address for this sub-entity.
                            format: email
                          phone:
                            title: Phone number
                            required:
                            - country_code
                            - number
                            type: object
                            properties:
                              country_code:
                                title: Country calling code
                                enum:
                                - AF
                                - AL
                                - DZ
                                - AS
                                - AD
                                - AO
                                - AI
                                - AG
                                - AR
                                - AM
                                - AW
                                - AU
                                - AT
                                - AZ
                                - BS
                                - BH
                                - BD
                                - BB
                                - BY
                                - BE
                                - BZ
                                - BJ
                                - BM
                                - BT
                                - BO
                                - BA
                                - BW
                                - BR
                                - BN
                                - BG
                                - BF
                                - BI
                                - CV
                                - KH
                                - CM
                                - CA
                                - KY
                                - CF
                                - TD
                                - CL
                                - CN
                                - CO
                                - KM
                                - CD
                                - CG
                                - CK
                                - CR
                                - HR
                                - CU
                                - CW
                                - CY
                                - CZ
                                - DK
                                - DJ
                                - DM
                                - DO
                                - EC
                                - EG
                                - SV
                                - GQ
                                - ER
                                - EE
                                - SZ
                                - ET
                                - FO
                                - FJ
                                - FI
                                - FR
                                - GF
                                - PF
                                - GA
                                - GM
                                - GE
                                - DE
                                - GH
                                - GI
                                - GR
                                - GL
                                - GD
                                - GP
                                - GU
                                - GT
                                - GG
                                - GN
                                - GW
                                - GY
                                - HT
                                - HN
                                - HK
                                - HU
                                - IS
                                - IN
                                - ID
                                - IR
                                - IQ
                                - IE
                                - IM
                                - IL
                                - IT
                                - JM
                                - JP
                                - JE
                                - JO
                                - KZ
                                - KE
                                - KI
                                - KP
                                - KR
                                - KW
                                - KG
                                - LA
                                - LV
                                - LB
                                - LS
                                - LR
                                - LY
                                - LI
                                - LT
                                - LU
                                - MO
                                - MG
                                - MW
                                - MY
                                - MV
                                - ML
                                - MT
                                - MH
                                - MQ
                                - MR
                                - MU
                                - MX
                                - FM
                                - MD
                                - MC
                                - MN
                                - ME
                                - MS
                                - MA
                                - MZ
                                - MM
                                - NA
                                - NR
                                - NP
                                - NL
                                - NC
                                - NZ
                                - NI
                                - NE
                                - NG
                                - NU
                                - NF
                                - MK
                                - MP
                                - NO
                                - OM
                                - PK
                                - PW
                                - PA
                                - PG
                                - PY
                                - PE
                                - PH
                                - PL
                                - PT
                                - PR
                                - QA
                                - RE
                                - RO
                                - RU
                                - RW
                                - BL
                                - SH
                                - KN
                                - LC
                                - PM
                                - VC
                                - WS
                                - SM
                                - ST
                                - SA
                                - SN
                                - RS
                                - SC
                                - SL
                                - SG
                                - BQ
                                - SX
                                - SK
                                - SI
                                - SB
                                - SO
                                - ZA
                                - GS
                                - SS
                                - ES
                                - LK
                                - SD
                                - SR
                                - SE
                                - CH
                                - SY
                                - TW
                                - TJ
                                - TZ
                                - TH
                                - TL
                                - TG
                                - TK
                                - TO
                                - TT
                                - TN
                                - TR
                                - TM
                                - TC
                                - TV
                                - UG
                                - UA
                                - AE
                                - GB
                                - US
                                - UY
                                - UZ
                                - VU
                                - VA
                                - VE
                                - VN
                                - VG
                                - VI
                                - WF
                                - EH
                                - YE
                                - ZM
                                - ZW
                                type: string
                                description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                              number:
                                title: Phone number
                                maxLength: 16
                                minLength: 5
                                pattern: ^[0-9]{5,16}$
                                type: string
                                description: The phone number without the country calling code
                            description: Phone number
                          address:
                            title: Address
                            required:
                            - address_line1
                            - city
                            - zip
                            - country
                            type: object
                            properties:
                              address_line1:
                                title: Address line 1
                                maxLength: 300
                                minLength: 1
                                pattern: '\S'
                                type: string
                                description: The first line of the address.
                              address_line2:
                                title: Address line 2
                                maxLength: 300
                                description: The second line of the address.
                              city:
                                title: City
                                maxLength: 300
                                minLength: 2
                                type: string
                                description: The address city.
                              state:
                                title: State
                                maxLength: 300
                                minLength: 1
                                pattern: '\S'
                                type: string
                                description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                              zip:
                                title: Postal code
                                maxLength: 16
                                minLength: 1
                                pattern: ^[a-zA-Z0-9-\s]+$
                                type: string
                                description: The address zip/postal code.
                              country:
                                title: Country
                                maxLength: 2
                                minLength: 2
                                pattern: '[a-zA-Z]{2}'
                                type: string
                                description: The country code (iso-3166-1 alpha-2)
                                format: iso-3166-1-alpha-2
                            description: The representative's address.
                        description: Information about the individual representing the sub-entity.
                      description: Information about the individual representing the sub-entity.
                    company_position:
                      title: Position within Company
                      enum:
                      - ceo
                      - cfo
                      - coo
                      - managing_member
                      - general_partner
                      - president
                      - vice_president
                      - treasurer
                      - other_senior_management
                      - other_executive_officer
                      - other_non_executive_non_senior
                      type: string
                      description: The position of the representative within the company.
                    roles:
                      title: Roles within company
                      maxItems: 10
                      minItems: 1
                      uniqueItems: true
                      type: array
                      items:
                        title: Representative Role
                        enum:
                        - ubo
                        - authorised_signatory
                        - control_person
                        type: string
                        description: The representative's role
                      description: The individual's roles within the company
                    ownership_percentage:
                      title: Percentage of Ownership
                      maximum: 100
                      minimum: 25
                      type: integer
                      description: The percentage ownership of the UBO or controlling company (required when over 25%)
                    documents:
                      title: Documents
                      type: object
                      properties:
                        identity_verification:
                          title: Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                              type: string
                              description: The type of document used for identity verification
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                            back:
                              title: Back
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the back side of the document as represented within Checkout.com systems.
                          description: The document to use to confirm the individual's identity.
                        certified_authorised_signatory:
                          title: Certified Authorised Signatory Document
                          required:
                          - type
                          - front
                          type: object
                          properties:
                            type:
                              title: Document type
                              enum:
                              - power_of_attorney
                              type: string
                              description: The type of document.
                            front:
                              title: Front
                              maxLength: 31
                              minLength: 31
                              pattern: ^file_[a-z2-7]{26}$
                              type: string
                              description: The ID of the front side of the document as represented within Checkout.com systems.
                          description: Required when the legal representative or other role owner is not registered on certificate of incorporation
                      additionalProperties: false
                      description: Verification documents for the individual representative
                  description: Personal information about the individual representing the sub-entity.
              description: Information about representatives of this company.
            business_type:
              title: Business type
              enum:
              - individual_or_sole_proprietorship
              - private_corporation
              - limited_liability_corporation
              - publicly_traded_corporation
              - limited_partnership
              - non_profit_entity
              - government_agency
              - regulated_financial_institution
              - sec_registered_entity
              - cftc_registered_entity
              type: string
              description: The legal type of the company
          description: Information about the company represented by the sub-entity.
        processing_details:
          type: object
          allOf:
          - title: Processing Details
            required:
            - settlement_country
            - target_countries
            - annual_processing_volume
            - average_transaction_value
            - highest_transaction_value
            - currency
            type: object
            properties:
              settlement_country:
                title: Destination of funds
                maxLength: 2
                minLength: 2
                pattern: '[a-zA-Z]{2}'
                type: string
                description: The country code (iso-3166-1 alpha-2) where the settlement bank account is located
                format: iso-3166-1-alpha-2
              target_countries:
                title: Target countries
                maxItems: 10
                minItems: 1
                type: array
                items:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
                description: Target country codes (iso-3166-1 alpha-2) with more than 10% expected volume processing with Checkout
              annual_processing_volume:
                title: Estimated annual processing volume
                minimum: 0
                type: integer
                description: The estimated annual processing volume. In minor units without decimals.
              average_transaction_value:
                title: Average sales price
                minimum: 0
                type: integer
                description: The expected average transaction value. In minor units without decimals.
              highest_transaction_value:
                title: Highest transaction value
                minimum: 0
                type: integer
                description: The expected highest transaction value. In minor units without decimals.
              currency:
                title: Currency
                enum:
                - USD
                type: string
                description: The currency used for the processing details provided.
            description: Seller processing details.
        documents:
          title: Documents
          type: object
          properties:
            tax_verification:
              title: Tax Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - ein_letter
                  type: string
                  description: The type of document used for tax verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Employer Identification Number document.
            company_verification:
              title: Company Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - incorporation_document
                  type: string
                  description: The type of document used for company verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Certified by a power of attorney within the last 3 months
            articles_of_association:
              title: Memorandum or Articles of Association
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - memorandum_of_association
                  - articles_of_association
                  type: string
                  description: The type of document used for company verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Memorandum or Articles of Association document
            bank_verification:
              title: Bank Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - bank_statement
                  type: string
                  description: The type of document being used as bank verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A document showing transactions from last 3 months
            shareholder_structure:
              title: Shareholder Structure
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - certified_shareholder_structure
                  type: string
                  description: The type of document.
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Shareholder structure chart (including % of shares) certified by a competent authority individual and dated within last 3 months
            proof_of_legality:
              title: Proof of Legality
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - proof_of_legality
                  type: string
                  description: The type of document used for proof of legality
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A regulatory licence document required for the company to operate (when applicable)
            proof_of_principal_address:
              title: Address Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - proof_of_address
                  type: string
                  description: The type of document being used as address verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Proof of principal place of business
            additional_document1:
              title: Additional Documentation
              required:
              - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document2:
              title: Additional Documentation
              required:
              - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document3:
              title: Additional Documentation
              required:
              - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
          description: The documents used to support the verification of company details.
    USCompanyLite2-0:
      type: object
      title: Create & Submit regulated US Company (V2.0)
      required:
      - reference
      - company
      - contact_details
      - profile
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity.
        status:
          type: string
          readOnly: true
        is_draft:
          type: boolean
          description: >-
            Specifies whether the sub-entity details are in draft.
      
      
            Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
          writeOnly: true
        profile:
          title: Profile
          required:
          - urls
          - mccs
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\//\S{2,293}$
                type: string
                description: The URL of the company's website.
                format: uri
              description: A collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                description: The merchant category code (4-digit ISO 18245).
              description: Select the categories that most closely describe the business
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          required:
          - phone
          - email_addresses
          type: object
          properties:
            phone:
              title: Phone
              required:
              - number
              type: object
              properties:
                number:
                  title: Phone number
                  maximum: 9999999999999999
                  minimum: 2000000000
                  maxLength: 16
                  minLength: 10
                  pattern: ^[2-9]{1}[0-9]{9,15}$
                  description: Include the area code
            email_addresses:
              required:
              - primary
              type: object
              properties:
                primary:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
            invitee:
              title: Invitee
              type: object
              properties:
                email:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
        capabilities:
          title: Capabilities
          type: object
          description: The capabilities of the entity.
          readOnly: true
        requirements_due:
          title: Requirements Due
          minItems: 0
          type: array
          items:
            title: Requirements due entry
            type: object
            properties:
              field:
                title: Field
                type: string
                description: The field that is needs to be addressed.
              reason:
                title: Reason
                type: string
                description: The reason behind the field needing attention.
            description: A list of fields which require attention
            readOnly: true
          description: List of requirements due in order to be onboarded.
          readOnly: true
        instruments:
          type: array
          items:
            type: object
          readOnly: true
        company:
          title: Company
          required:
          - legal_name
          - trading_name
          - registered_address
          - principal_address
          - representatives
          type: object
          properties:
            legal_name:
              title: Legal name
              maxLength: 300
              minLength: 2
              type: string
              description: The legal name of the sub-entity.
            trading_name:
              title: Trading name
              maxLength: 300
              minLength: 2
              type: string
              description: The trading name of the sub-entity, also referred to as 'doing business as'.
            business_registration_number:
              title: Employer Identification Number (EIN)
              maxLength: 9
              minLength: 9
              pattern: ^[0-9]{9}$
              type: string
              description: Employer Identification Number (EIN).
            principal_address:
              title: Principal Address
              required:
              - address_line1
              - city
              - zip
              - state
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: US State
                  enum:
                  - AL
                  - AK
                  - AZ
                  - AR
                  - CA
                  - CO
                  - CT
                  - DE
                  - DC
                  - FL
                  - GA
                  - HI
                  - ID
                  - IL
                  - IN
                  - IA
                  - KS
                  - KY
                  - LA
                  - ME
                  - MD
                  - MA
                  - MI
                  - MN
                  - MS
                  - MO
                  - MT
                  - NE
                  - NV
                  - NH
                  - NJ
                  - NM
                  - NY
                  - NC
                  - ND
                  - OH
                  - OK
                  - OR
                  - PA
                  - RI
                  - SC
                  - SD
                  - TN
                  - TX
                  - UT
                  - VT
                  - VA
                  - WA
                  - WV
                  - WI
                  - WY
                  - AS
                  - GU
                  - MP
                  - PR
                  - VI
                  - UM
                  type: string
                  description: The address state. This field is required for addresses based in the US. For US addresses, provide the state as an ISO 3166-1 code.
                zip:
                  title: Zip code
                  maxLength: 10
                  minLength: 5
                  pattern: ^\d{5}(?:[-\s]\d{4})?$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The primary location of the company where business is performed.
            registered_address:
              title: Registered Address
              required:
              - address_line1
              - city
              - zip
              - state
              - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: US State
                  enum:
                  - AL
                  - AK
                  - AZ
                  - AR
                  - CA
                  - CO
                  - CT
                  - DE
                  - DC
                  - FL
                  - GA
                  - HI
                  - ID
                  - IL
                  - IN
                  - IA
                  - KS
                  - KY
                  - LA
                  - ME
                  - MD
                  - MA
                  - MI
                  - MN
                  - MS
                  - MO
                  - MT
                  - NE
                  - NV
                  - NH
                  - NJ
                  - NM
                  - NY
                  - NC
                  - ND
                  - OH
                  - OK
                  - OR
                  - PA
                  - RI
                  - SC
                  - SD
                  - TN
                  - TX
                  - UT
                  - VT
                  - VA
                  - WA
                  - WV
                  - WI
                  - WY
                  - AS
                  - GU
                  - MP
                  - PR
                  - VI
                  - UM
                  type: string
                  description: The address state. This field is required for addresses based in the US. For US addresses, provide the state as an ISO 3166-1 code.
                zip:
                  title: Zip code
                  maxLength: 10
                  minLength: 5
                  pattern: ^\d{5}(?:[-\s]\d{4})?$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The registered address of the company.
            representatives:
              title: Representative List
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Representative
                required:
                - first_name
                - last_name
                - address
                type: object
                properties:
                  first_name:
                    title: First name
                    maxLength: 50
                    minLength: 2
                    type: string
                    description: The representative's first name.
                  middle_name:
                    title: Middle name
                    maxLength: 50
                    minLength: 2
                    type: string
                    description: The representative's middle name. Required if appears in official docs
                  last_name:
                    title: Last name
                    maxLength: 50
                    minLength: 2
                    type: string
                    description: The representative's last name.
                  identification:
                    title: Individual identification
                    required:
                    - national_id_number
                    type: object
                    properties:
                      national_id_number:
                        title: Social security number (SSN or ITIN) - US Residents Only
                        maxLength: 9
                        minLength: 9
                        pattern: ^\d{9}$
                        description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                    description: Information about representatives of this company.
                  date_of_birth:
                    title: Date of birth
                    required:
                    - day
                    - month
                    - year
                    type: object
                    properties:
                      day:
                        maximum: 31
                        minimum: 1
                        type: integer
                        description: The calendar day of the month they were born.
                      month:
                        maximum: 12
                        minimum: 1
                        type: integer
                        description: The month of the year they were born.
                      year:
                        maximum: 2999
                        minimum: 1900
                        type: integer
                        description: The year they were born.
                    description: The date of birth of the person according to the Gregorian calendar.
                  phone:
                    title: Phone
                    required:
                    - number
                    type: object
                    properties:
                      number:
                        title: Phone number
                        maximum: 9999999999999999
                        minimum: 10000000
                        maxLength: 16
                        minLength: 8
                        pattern: ^[1-9][0-9]{7,15}$
                        description: "The phone number. This must only contain numeric characters and can't contain only zeros. (For US numbers: It cannot start with 0 or 1 and must be at least 10 characters in length.)"
                    description: The phone number of the sub-entity.
                  address:
                    title: Address
                    required:
                    - country
                    type: object
                    properties:
                      address_line1:
                        title: Address line 1
                        maxLength: 300
                        minLength: 1
                        pattern: '\S'
                        type: string
                        description: The first line of the address.
                      address_line2:
                        title: Address line 2
                        maxLength: 300
                        description: The second line of the address.
                      city:
                        title: City
                        maxLength: 300
                        minLength: 2
                        type: string
                        description: The address city.
                      state:
                        title: State
                        maxLength: 300
                        minLength: 1
                        pattern: '\S'
                        type: string
                        description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                      zip:
                        title: Postal code
                        maxLength: 16
                        minLength: 1
                        pattern: ^[a-zA-Z0-9-\s]+$
                        type: string
                        description: The address zip/postal code.
                      country:
                        title: Country
                        maxLength: 2
                        minLength: 2
                        pattern: '[a-zA-Z]{2}'
                        type: string
                        description: The country code (iso-3166-1 alpha-2)
                        format: iso-3166-1-alpha-2
                    description: The representative's address.
                  documents:
                    title: Document
                    required:
                    - identity_verification
                    type: object
                    properties:
                      identity_verification:
                        title: Document
                        required:
                        - type
                        - front
                        type: object
                        properties:
                          type:
                            title: Document type
                            enum:
                            - passport
                            - national_identity_card
                            - driving_license
                            - citizen_card
                            - residence_permit
                            - electoral_id
                            type: string
                            description: The type of document used for identity verification
                          front:
                            title: Front
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the front side of the document as represented within Checkout.com systems.
                          back:
                            title: Back
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the back side of the document as represented within Checkout.com systems.
                        description: The document to use to confirm the individual's identity.
                    description: A legal document used to verify identity
                  roles:
                    title: Roles within company
                    maxItems: 2
                    minItems: 1
                    uniqueItems: true
                    type: array
                    items:
                      title: Representative Role
                      enum:
                      - ubo
                      - authorised_signatory
                      - control_person
                      type: string
                      description: The representative's roles within the company
                    description: The individual's roles within the company
                description: Information about representatives of this company.
              description: Information about representatives of this company.
            business_type:
              title: Business structure
              enum:
              - private_corporation
              - publicly_traded_corporation
              - government_agency
              - individual_or_sole_proprietorship
              - limited_liability_corporation
              - limited_partnership
              - non_profit_entity
              - sec_registered_entity
              - cftc_registered_entity
              - regulated_financial_institution
              type: string
              description: The legal type of the company
            financial_details:
              title: Financial Details
              type: object
              properties:
                annual_processing_volume:
                  title: Estimated annual processing volume
                  minimum: 0
                  type: integer
                  description: The estimated annual processing volume. In minor units without decimals.
                average_transaction_value:
                  title: Average sales price
                  minimum: 0
                  type: integer
                  description: The expected average transaction value. In minor units without decimals.
                highest_transaction_value:
                  title: Highest transaction value
                  minimum: 0
                  type: integer
                  description: The expected highest transaction value. In minor units without decimals.
                currency:
                  title: Currency
                  enum:
                  - USD
                  type: string
                  description: The currency used for the processing details provided.
              description: Seller financial questions and supporting documents.
          description: Information about the company represented by the sub-entity.
        documents:
          title: Documents
          type: object
          properties:
            company_verification:
              title: Company Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - incorporation_document
                  - articles_of_association
                  type: string
                  description: The type of document being used for company verification.
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: The document to use to confirm the company's identity.
            tax_verification:
              title: Tax Verification
              required:
              - type
              - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                  - ein_letter
                  type: string
                  description: The type of document used for tax verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Employer Identification Number document.
          description: The documents used to support the verification of company details.
    USISVSellerCompany3-0:
      type: object
      title: Create & Submit US Company (SaaS)
      required:
        - reference
        - agreed_terms
        - seller_category
        - company
        - profile
        - contact_details
        - processing_details
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity. Immutable after creation.
        status:
          type: string
          readOnly: true
          description: The current lifecycle state of the sub-entity. Read-only on input. POST always returns Draft.
        is_draft:
          type: boolean
          description: Indicates whether the sub-entity should remain in Draft on PUT, skipping due-diligence checks. POST always creates the entity in Draft regardless of this field.
          writeOnly: true
        agreed_terms:
          title: Agreed Terms
          type: object
          description: Details of the person who agreed to the terms and conditions on behalf of the sub-entity, captured as evidence of consent to Checkout.com onboarding.
          required:
            - date
            - ip_address
            - name
            - email
            - version
          properties:
            date:
              title: Date agreed
              type: string
              format: date-time
              description: Date and time the terms were agreed in RFC 3339 or ISO 8601 format.
              example: "2026-07-02T10:30:00Z"
            ip_address:
              title: IP address
              type: string
              description: IP address (IPv4 or IPv6) of the person at the time they agreed the terms.
              example: "8.8.8.8"
            name:
              title: Full name
              type: string
              description: First and last name of the person who agreed to the terms.
              example: "Toby Arden"
            email:
              title: Email address
              type: string
              format: email
              description: Email address of the person who agreed to the terms.
              example: "toby.arden@example.com"
            version:
              title: Terms version
              type: string
              description: Identifier of the terms version that was agreed.
              example: "cko-platform-terms-1.0.0"
        seller_category:
          title: Seller category
          type: string
          description: The identifier of a seller category set up for your platform. Seller categories define the pricing, capabilities, and risk profile applied to sub-entities, and are configured during your platform's onboarding with Checkout.com. Contact your account manager for your platform's list of available identifiers.
        profile:
          title: Profile
          required:
            - urls
            - mccs
            - default_holding_currency
            - holding_currencies
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\/\/\S{2,293}$
                type: string
                format: uri
                description: The URL of the company's website.
              description: The collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                type: string
                description: >-
                  The merchant category code as a four-digit ISO 18245.
      
      
                  Reference: [Merchant Category Codes](https://www.checkout.com/docs/developer-resources/codes/merchant-category-codes).
              description: The collection of merchant category codes that most closely describe the business.
            default_holding_currency:
              title: Main currency
              type: string
              enum: [USD]
              description: The default holding currency's three-letter ISO 4217 code.
            holding_currencies:
              title: Currencies
              minItems: 1
              type: array
              items:
                title: Currency
                type: string
                enum: [USD]
                description: The three-letter ISO 4217 code of the currency.
              default:
                - USD
              description: The collection of currencies in which incoming funds are held.
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          type: object
          required:
            - phone
            - email_addresses
          properties:
            phone:
              title: Phone number
              type: object
              required:
                - country_code
                - number
              properties:
                country_code:
                  title: Country calling code
                  type: string
                  enum: [US]
                  description: The two-letter ISO 3166-1 alpha-2 country code where the phone number is registered.
                number:
                  title: Phone number
                  type: string
                  maxLength: 16
                  minLength: 10
                  pattern: ^[1-9][0-9]{9,16}$
                  description: The phone number without the country calling code.
              description: Phone number with country code.
            email_addresses:
              type: object
              required:
                - primary
                - pci_compliance_contact
              properties:
                primary:
                  title: Email
                  type: string
                  format: email
                  description: The primary email address for this sub-entity.
                pci_compliance_contact:
                  title: PCI compliance contact
                  type: string
                  format: email
                  description: The email address of the person responsible for PCI compliance at this sub-entity.
              description: Email addresses for this sub-entity.
          description: Contact details of this sub-entity.
        processing_details:
          title: Processing Details
          type: object
          description: Information about the sub-entity's expected processing.
          required:
            - annual_processing_volume
            - average_transaction_value
            - average_order_fulfillment_time
            - currency
            - target_countries
            - payments
          properties:
            annual_processing_volume:
              title: Estimated annual processing volume
              type: integer
              minimum: 0
              description: The estimated annual processing volume in minor units without decimals.
            average_transaction_value:
              title: Average sales price
              type: integer
              minimum: 0
              description: The expected average transaction value in minor units without decimals.
            average_order_fulfillment_time:
              title: Average order fulfillment time
              type: integer
              minimum: 0
              description: The average time in days between accepting payment and fulfilling the order.
            currency:
              title: Currency
              type: string
              enum: [USD]
              description: The currency used for the processing details provided.
            target_countries:
              title: Target countries
              type: array
              minItems: 1
              maxItems: 10
              items:
                title: Country
                type: string
                maxLength: 2
                minLength: 2
                pattern: '[a-zA-Z]{2}'
                format: iso-3166-1-alpha-2
                description: The two-letter ISO 3166-1 alpha-2 country code.
              description: The list of two-letter ISO 3166-1 alpha-2 target country codes with more than 10% expected volume processing with Checkout.com.
            payments:
              type: object
              description: Payment method-specific processing details.
              required:
                - ach
              properties:
                ach:
                  type: object
                  description: ACH payment processing details.
                  required:
                    - annual_ach_volume
                    - average_ach_transaction_size
                    - estimated_monthly_credit_volume
                    - average_credit_amount
                  properties:
                    annual_ach_volume:
                      title: Annual ACH volume
                      type: integer
                      minimum: 0
                      description: The estimated annual ACH processing volume in minor units without decimals.
                    average_ach_transaction_size:
                      title: Average ACH transaction size
                      type: integer
                      minimum: 0
                      description: The expected average ACH transaction size in minor units without decimals.
                    estimated_monthly_credit_volume:
                      title: Estimated monthly ACH credit volume
                      type: integer
                      minimum: 0
                      description: The estimated monthly volume of ACH credit transactions (for example, refunds issued to customers) in minor units without decimals.
                    average_credit_amount:
                      title: Average ACH credit amount
                      type: integer
                      minimum: 0
                      description: The average value of an ACH credit transaction (for example, a refund) in minor units without decimals.
        company:
          title: Company
          type: object
          required:
            - legal_name
            - trading_name
            - business_type
            - business_registration_number
            - registered_address
            - principal_address
            - date_of_incorporation
            - representatives
          properties:
            legal_name:
              title: Legal name
              type: string
              maxLength: 300
              minLength: 2
              description: The legal name of the sub-entity.
            trading_name:
              title: Trading name
              type: string
              maxLength: 300
              minLength: 2
              description: The trading name of the sub-entity, also referred to as 'Doing Business As'.
            additional_trading_names:
              title: Additional trading names
              type: array
              items:
                title: Trading name
                type: string
                description: An additional trading name of the entity.
              description: The collection of additional trading names for the sub-entity.
            business_type:
              title: Business type
              type: string
              enum:
                - private_corporation
                - limited_liability_corporation
                - publicly_traded_corporation
                - limited_partnership
                - non_profit_entity
                - government_agency
                - regulated_financial_institution
                - sec_registered_entity
                - cftc_registered_entity
              description: The legal type of the company.
            business_registration_number:
              title: Employer Identification Number (EIN)
              type: string
              maxLength: 11
              minLength: 9
              pattern: ^[0-9]{2}-?[0-9]{7}$
              description: US Employer Identification Number (EIN). Nine digits, with optional hyphen.
            date_of_incorporation:
              title: Date of Incorporation
              type: object
              required:
                - day
                - month
                - year
              properties:
                day:
                  type: integer
                  minimum: 1
                  maximum: 31
                  description: The day of the month the company was incorporated.
                month:
                  type: integer
                  minimum: 1
                  maximum: 12
                  description: The month the company was incorporated.
                year:
                  type: integer
                  minimum: 1500
                  maximum: 2999
                  description: The year the company was incorporated.
              description: The date the company was incorporated.
            registered_address:
              title: Registered Address
              type: object
              required:
                - address_line1
                - city
                - state
                - zip
                - country
              properties:
                address_line1:
                  title: Address line 1
                  type: string
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  type: string
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  type: string
                  maxLength: 300
                  minLength: 2
                  description: The address city.
                state:
                  title: US State
                  type: string
                  enum: [AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, AS, GU, MP, PR, VI, UM]
                  description: The address state. Provide the US state as a two-letter ISO 3166-2 code.
                zip:
                  title: ZIP code
                  type: string
                  maxLength: 10
                  minLength: 5
                  pattern: '^\d{5}(?:[-\s]\d{4})?$'
                  description: The address ZIP code or post code.
                country:
                  title: Country
                  type: string
                  enum: [US]
                  description: >-
                    The two-letter ISO 3166-1 alpha-2 country code.
      
      
                    Reference: [Country codes](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              description: The registered address of the company.
            principal_address:
              title: Principal Address
              type: object
              required:
                - address_line1
                - city
                - country
              properties:
                address_line1:
                  title: Address line 1
                  type: string
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  type: string
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  type: string
                  maxLength: 300
                  minLength: 2
                  description: The address city.
                state:
                  title: State
                  type: string
                  description: The address state. For US addresses, provide the two-letter ISO 3166-2 code.
                zip:
                  title: ZIP code
                  type: string
                  description: The address ZIP code or post code.
                country:
                  title: Country
                  type: string
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  format: iso-3166-1-alpha-2
                  description: >-
                    The two-letter ISO 3166-1 alpha-2 country code.
      
      
                    Reference: [Country codes](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              description: The primary location of the company where business is performed.
            representatives:
              title: Representatives
              type: array
              minItems: 1
              items:
                type: object
                description: A representative of the sub-entity.
                required:
                  - roles
                  - individual
                properties:
                  roles:
                    title: Roles within company
                    type: array
                    minItems: 1
                    maxItems: 10
                    uniqueItems: true
                    items:
                      title: Representative role
                      type: string
                      enum:
                        - ubo
                        - authorised_signatory
                        - control_person
                      description: The representative's role.
                    description: The individual's roles within the company.
                  ownership_percentage:
                    title: Percentage of Ownership
                    type: integer
                    minimum: 0
                    maximum: 100
                    description: The percentage ownership of the UBO (required when the representative holds the ubo role).
                  company_position:
                    title: Position within Company
                    type: string
                    enum:
                      - ceo
                      - cfo
                      - coo
                      - managing_member
                      - general_partner
                      - president
                      - vice_president
                      - treasurer
                      - other_senior_management
                      - other_executive_officer
                      - other_non_executive_non_senior
                    description: The position of the representative within the company (required for control_person role).
                  individual:
                    title: Individual
                    type: object
                    required:
                      - first_name
                      - last_name
                      - email_address
                      - date_of_birth
                      - address
                      - place_of_birth
                      - citizenships
                      - phone
                      - national_id_type
                      - national_id_number
                    properties:
                      first_name:
                        title: First name
                        type: string
                        maxLength: 50
                        minLength: 2
                        description: The representative's first name.
                      middle_name:
                        title: Middle name
                        type: string
                        maxLength: 50
                        minLength: 2
                        description: The representative's middle name. Required if it appears in official documents.
                      last_name:
                        title: Last name
                        type: string
                        maxLength: 50
                        minLength: 2
                        description: The representative's last name.
                      email_address:
                        title: Email
                        type: string
                        format: email
                        description: The representative's email address.
                      date_of_birth:
                        title: Date of birth
                        type: object
                        required:
                          - day
                          - month
                          - year
                        properties:
                          day:
                            type: integer
                            minimum: 1
                            maximum: 31
                            description: The calendar day of the month they were born.
                          month:
                            type: integer
                            minimum: 1
                            maximum: 12
                            description: The month of the year they were born.
                          year:
                            type: integer
                            minimum: 1900
                            maximum: 2999
                            description: The year they were born.
                        description: The person's date of birth according to the Gregorian calendar.
                      address:
                        title: Address
                        type: object
                        required:
                          - address_line1
                          - city
                          - zip
                          - country
                        properties:
                          address_line1:
                            title: Address line 1
                            type: string
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            description: The first line of the address.
                          address_line2:
                            title: Address line 2
                            type: string
                            maxLength: 300
                            description: The second line of the address.
                          city:
                            title: City
                            type: string
                            maxLength: 300
                            minLength: 2
                            description: The address city.
                          state:
                            title: State
                            type: string
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            description: The address state. For US addresses, provide the two-letter ISO 3166-2 code.
                          zip:
                            title: Postal code
                            type: string
                            maxLength: 16
                            minLength: 1
                            pattern: ^[a-zA-Z0-9-\s]+$
                            description: The address ZIP code or post code.
                          country:
                            title: Country
                            type: string
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            format: iso-3166-1-alpha-2
                            description: The two-letter ISO 3166-1 alpha-2 country code.
                        description: The representative's residential address.
                      place_of_birth:
                        title: Place of Birth
                        type: object
                        required:
                          - country
                        properties:
                          country:
                            title: Country
                            type: string
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            format: iso-3166-1-alpha-2
                            description: The two-letter ISO 3166-1 alpha-2 country code.
                        description: The person's place of birth.
                      citizenships:
                        title: Citizenships
                        type: array
                        items:
                          type: object
                          description: A citizenship or legal-status record.
                          required:
                            - country
                          properties:
                            type:
                              title: Type
                              type: string
                              description: The type of citizenship or legal status (e.g. `citizenship`, `residency`).
                            country:
                              title: Country
                              type: string
                              maxLength: 2
                              minLength: 2
                              pattern: '[a-zA-Z]{2}'
                              format: iso-3166-1-alpha-2
                              description: The two-letter ISO 3166-1 alpha-2 country code.
                        description: The list of citizenships or legal statuses for the representative.
                      national_id_type:
                        title: Identification number type
                        type: string
                        enum:
                          - ssn
                          - itin
                          - passport
                          - driving_license
                          - national_id_card
                          - residence_permit
                          - other
                        description: The classification of the national identification number provided.
                      national_id_number:
                        title: National ID number
                        type: string
                        maxLength: 16
                        minLength: 5
                        pattern: ^[a-zA-Z0-9\-]+$
                        description: When `national_id_type` is `ssn`, provide the SSN (or ITIN). Otherwise, provide the identifier from the chosen document type.
                      phone:
                        title: Phone number
                        type: object
                        required:
                          - country_code
                          - number
                        properties:
                          country_code:
                            title: Country calling code
                            type: string
                            maxLength: 2
                            minLength: 2
                            pattern: '^[a-zA-Z]{2}$'
                            format: iso-3166-1-alpha-2
                            description: The two-letter ISO 3166-1 alpha-2 country code where the phone number is registered.
                          number:
                            title: Phone number
                            type: string
                            maxLength: 16
                            minLength: 5
                            pattern: ^[0-9]{5,16}$
                            description: The phone number without the country calling code.
                        description: The representative's phone number.
                    description: Personal information about the individual representing the sub-entity.
                  documents:
                    title: Documents
                    type: object
                    properties:
                      identity_verification:
                        title: Identity Document
                        type: object
                        required:
                          - type
                          - front
                        properties:
                          type:
                            title: Document type
                            type: string
                            enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                            description: The type of document used for identity verification.
                          front:
                            title: Front
                            type: string
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            description: The ID of the front side of the document.
                          back:
                            title: Back
                            type: string
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            description: The ID of the back side of the document.
                        description: The document to use to confirm the individual's identity.
                      certified_authorised_signatory:
                        title: Certified Authorised Signatory Document
                        type: object
                        required:
                          - type
                          - front
                        properties:
                          type:
                            title: Document type
                            type: string
                            enum:
                              - power_of_attorney
                            description: The type of document.
                          front:
                            title: Front
                            type: string
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            description: The ID of the front side of the document.
                        description: Required for representatives with the `authorised_signatory` role, when the legal representative or other role owner is not registered on the certificate of incorporation.
                    description: Verification documents for the individual representative.
              description: The list of the company's representatives.
          description: Information about the company represented by the sub-entity.
        documents:
          title: Documents
          type: object
          properties:
            tax_verification:
              title: Tax Verification
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - ein_letter
                  description: The type of IRS-issued document used for tax verification.
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document.
              description: IRS-issued document used to verify the entity's tax identification.
            company_verification:
              title: Company Verification
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - incorporation_document
                  description: The type of document used for company verification.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: Certified by a power of attorney within the last 3 months.
            articles_of_association:
              title: Memorandum or Articles of Association
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - memorandum_of_association
                    - articles_of_association
                  description: The type of document used.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: Memorandum or Articles of Association document.
            shareholder_structure:
              title: Shareholder Structure
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - certified_shareholder_structure
                  description: The type of document.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: Shareholder structure chart including the percentage of shares certified by a competent authority individual and dated within the last 3 months.
            proof_of_legality:
              title: Proof of Legality
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - proof_of_legality
                  description: The type of document used for proof of legality.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: A regulatory license document required for the company to operate if applicable.
            proof_of_principal_address:
              title: Address Verification
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - proof_of_address
                  description: The type of document used for address verification.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: Proof of principal place of business.
            financial_statements:
              title: Financial Statements
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - financial_statements
                  description: The type of document.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: Audited or management-prepared financial statements (when applicable).
          description: Verification documents for the sub-entity.
      example:
        reference: isv-seller-example001
        agreed_terms:
          date: "2026-07-02T10:30:00Z"
          ip_address: "8.8.8.8"
          name: "Toby Arden"
          email: "toby.arden@example.com"
          version: "cko-platform-terms-1.0.0"
        seller_category: cat_retail_001
        processing_details:
          annual_processing_volume: 1000
          average_transaction_value: 2000
          average_order_fulfillment_time: 3
          target_countries: [US]
          currency: USD
          payments:
            ach:
              annual_ach_volume: 100000
              average_ach_transaction_size: 5000
              estimated_monthly_credit_volume: 50000
              average_credit_amount: 2500
        contact_details:
          phone:
            number: '4155678900'
            country_code: US
          email_addresses:
            primary: toby.arden@example.com
            pci_compliance_contact: pci.contact@example.com
        profile:
          urls: ['https://www.isv-seller-example.com']
          mccs: ['5551']
          holding_currencies: [USD]
          default_holding_currency: USD
        company:
          business_registration_number: '12-3456789'
          business_type: private_corporation
          legal_name: ISV Seller Example Inc
          trading_name: ISV Seller Example
          registered_address:
            address_line1: 123 Main Street
            city: San Francisco
            state: CA
            zip: '94105'
            country: US
          principal_address:
            address_line1: 123 Main Street
            city: San Francisco
            state: CA
            zip: '94105'
            country: US
          date_of_incorporation:
            year: 2025
            month: 10
            day: 1
          representatives:
            - roles: [ubo, control_person]
              ownership_percentage: 25
              company_position: ceo
              individual:
                first_name: Toby
                last_name: Arden
                email_address: toby.arden@example.com
                national_id_type: ssn
                national_id_number: '123456789'
                date_of_birth:
                  day: 15
                  month: 1
                  year: 1990
                place_of_birth:
                  country: US
                citizenships:
                  - country: US
                phone:
                  country_code: US
                  number: '4155678901'
                address:
                  address_line1: 123 Main Street
                  city: San Francisco
                  state: CA
                  zip: '94105'
                  country: US
            - roles: [authorised_signatory]
              individual:
                first_name: Alex
                last_name: Morgan
                email_address: alex.morgan@example.com
                national_id_type: ssn
                national_id_number: '987654321'
                date_of_birth:
                  day: 22
                  month: 6
                  year: 1985
                place_of_birth:
                  country: US
                citizenships:
                  - country: US
                phone:
                  country_code: US
                  number: '4155678902'
                address:
                  address_line1: 123 Main Street
                  city: San Francisco
                  state: CA
                  zip: '94105'
                  country: US
    USISVSellerSoleTrader3-0:
      type: object
      title: Create & Submit US Sole Trader (SaaS)
      required:
        - reference
        - agreed_terms
        - seller_category
        - company
        - profile
        - contact_details
        - processing_details
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity. Immutable after creation.
        status:
          type: string
          readOnly: true
          description: The current lifecycle state of the sub-entity. Read-only on input. POST always returns Draft.
        is_draft:
          type: boolean
          description: Indicates whether the sub-entity should remain in Draft on PUT, skipping due-diligence checks. POST always creates the entity in Draft regardless of this field.
          writeOnly: true
        agreed_terms:
          title: Agreed Terms
          type: object
          description: Details of the sole trader who agreed to the terms and conditions, captured as evidence of consent to Checkout.com onboarding.
          required:
            - date
            - ip_address
            - name
            - email
            - version
          properties:
            date:
              title: Date agreed
              type: string
              format: date-time
              description: Date and time the terms were agreed in RFC 3339 or ISO 8601 format.
              example: "2026-07-02T10:30:00Z"
            ip_address:
              title: IP address
              type: string
              description: IP address (IPv4 or IPv6) of the sole trader at the time they agreed the terms.
              example: "8.8.8.8"
            name:
              title: Full name
              type: string
              description: First and last name of the sole trader who agreed to the terms.
              example: "Hannah Bret"
            email:
              title: Email address
              type: string
              format: email
              description: Email address of the sole trader who agreed to the terms.
              example: "hannah.bret@example.com"
            version:
              title: Terms version
              type: string
              description: Identifier of the terms version that was agreed.
              example: "cko-platform-terms-1.0.0"
        seller_category:
          title: Seller category
          type: string
          description: The identifier of a seller category set up for your platform. Seller categories define the pricing, capabilities, and risk profile applied to sub-entities, and are configured during your platform's onboarding with Checkout.com. Contact your account manager for your platform's list of available identifiers.
        profile:
          title: Profile
          required:
            - urls
            - mccs
            - default_holding_currency
            - holding_currencies
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\/\/\S{2,293}$
                type: string
                format: uri
                description: The URL of the website the sole trader accepts payments on.
              description: The collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                type: string
                description: >-
                  The merchant category code as a four-digit ISO 18245.
      
      
                  Reference: [Merchant Category Codes](https://www.checkout.com/docs/developer-resources/codes/merchant-category-codes).
              description: The collection of merchant category codes that most closely describe the business.
            default_holding_currency:
              title: Main currency
              type: string
              enum: [USD]
              description: The default holding currency's three-letter ISO 4217 code.
            holding_currencies:
              title: Currencies
              minItems: 1
              type: array
              items:
                title: Currency
                type: string
                enum: [USD]
                description: The three-letter ISO 4217 code of the currency.
              default:
                - USD
              description: The collection of currencies in which incoming funds are held.
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          type: object
          required:
            - phone
            - email_addresses
          properties:
            phone:
              title: Phone number
              type: object
              required:
                - country_code
                - number
              properties:
                country_code:
                  title: Country calling code
                  type: string
                  enum: [US]
                  description: The two-letter ISO 3166-1 alpha-2 country code where the phone number is registered.
                number:
                  title: Phone number
                  type: string
                  maxLength: 16
                  minLength: 10
                  pattern: ^[1-9][0-9]{9,16}$
                  description: The phone number without the country calling code.
              description: Phone number with country code.
            email_addresses:
              type: object
              required:
                - primary
                - pci_compliance_contact
              properties:
                primary:
                  title: Email
                  type: string
                  format: email
                  description: The main email address for this sub-entity.
                pci_compliance_contact:
                  title: PCI compliance contact
                  type: string
                  format: email
                  description: The email address of the person responsible for PCI compliance at this sub-entity.
              description: Email addresses for this sub-entity.
          description: Contact details of this sub-entity.
        processing_details:
          title: Processing Details
          type: object
          description: Information about the sub-entity's processing.
          required:
            - annual_processing_volume
            - average_transaction_value
            - average_order_fulfillment_time
            - currency
            - target_countries
            - payments
          properties:
            annual_processing_volume:
              title: Estimated annual processing volume
              type: integer
              minimum: 0
              description: The estimated annual processing volume in minor units without decimals.
            average_transaction_value:
              title: Average sales price
              type: integer
              minimum: 0
              description: The expected average transaction value in minor units without decimals.
            average_order_fulfillment_time:
              title: Average order fulfillment time
              type: integer
              minimum: 0
              description: The average time in days between accepting payment and fulfilling the order.
            currency:
              title: Currency
              type: string
              enum: [USD]
              description: The currency used for the processing details provided.
            target_countries:
              title: Target countries
              type: array
              minItems: 1
              maxItems: 10
              items:
                title: Country
                type: string
                maxLength: 2
                minLength: 2
                pattern: '[a-zA-Z]{2}'
                format: iso-3166-1-alpha-2
                description: The two-letter ISO 3166-1 alpha-2 country code.
              description: The list of two-letter ISO 3166-1 alpha-2 target country codes with more than 10% expected volume processing with Checkout.com.
            payments:
              type: object
              description: Payment method-specific processing details.
              required:
                - ach
              properties:
                ach:
                  type: object
                  description: ACH payment processing details.
                  required:
                    - annual_ach_volume
                    - average_ach_transaction_size
                    - estimated_monthly_credit_volume
                    - average_credit_amount
                  properties:
                    annual_ach_volume:
                      title: Annual ACH volume
                      type: integer
                      minimum: 0
                      description: The estimated annual ACH processing volume in minor units without decimals.
                    average_ach_transaction_size:
                      title: Average ACH transaction size
                      type: integer
                      minimum: 0
                      description: The expected average ACH transaction size in minor units without decimals.
                    estimated_monthly_credit_volume:
                      title: Estimated monthly ACH credit volume
                      type: integer
                      minimum: 0
                      description: The estimated monthly volume of ACH credit transactions (for example, refunds issued to customers) in minor units without decimals.
                    average_credit_amount:
                      title: Average ACH credit amount
                      type: integer
                      minimum: 0
                      description: The average value of an ACH credit transaction (for example, a refund) in minor units without decimals.
        company:
          title: Business
          type: object
          required:
            - trading_name
            - business_type
            - is_registered_company
            - date_of_incorporation
            - principal_address
            - representatives
          properties:
            is_registered_company:
              title: Is a registered company
              type: boolean
              enum: [false]
              description: Indicates whether the sub-entity is a registered legal entity. Must be `false` for this variant.
            trading_name:
              title: Trading name
              type: string
              maxLength: 300
              minLength: 2
              description: The trading name the sole trader uses, also referred to as 'Doing Business As'.
            additional_trading_names:
              title: Additional trading names
              type: array
              items:
                title: Trading name
                type: string
                description: An additional trading name of the sole trader.
              description: The collection of additional trading names for the sub-entity.
            business_type:
              title: Business type
              type: string
              enum:
                - individual_or_sole_proprietorship
              description: The legal type of the entity. Must be `individual_or_sole_proprietorship` for this variant.
            date_of_incorporation:
              title: Date the sole trader started trading
              type: object
              required:
                - month
                - year
                - day
              properties:
                day:
                  type: integer
                  minimum: 1
                  maximum: 31
                  description: The day of the month the sole trader started trading.
                month:
                  type: integer
                  minimum: 1
                  maximum: 12
                  description: The month the sole trader started trading.
                year:
                  type: integer
                  minimum: 1500
                  maximum: 2999
                  description: The year the sole trader started trading.
              description: The date the sole trader started trading.
            principal_address:
              title: Principal Address
              type: object
              required:
                - address_line1
                - city
                - zip
                - country
              properties:
                address_line1:
                  title: Address line 1
                  type: string
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  type: string
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  type: string
                  maxLength: 300
                  minLength: 2
                  description: The address city.
                state:
                  title: US State
                  type: string
                  enum: [AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, AS, GU, MP, PR, VI, UM]
                  description: The address state. Provide the US state as a two-letter ISO 3166-2 code.
                zip:
                  title: ZIP code
                  type: string
                  maxLength: 10
                  minLength: 5
                  pattern: '^\d{5}(?:[-\s]\d{4})?$'
                  description: The address ZIP code or post code.
                country:
                  title: Country
                  type: string
                  enum: [US]
                  description: >-
                    The two-letter ISO 3166-1 alpha-2 country code.
      
      
                    Reference: [Country codes](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              description: The primary location where the sole trader performs business.
            representatives:
              title: Representatives
              type: array
              minItems: 1
              maxItems: 1
              items:
                type: object
                description: A representative of the sub-entity. For sole traders, this is the individual themselves.
                required:
                  - roles
                  - individual
                properties:
                  roles:
                    title: Roles within company
                    type: array
                    minItems: 1
                    maxItems: 1
                    items:
                      type: string
                      enum:
                        - ubo
                      description: Sole traders must use the `ubo` role only.
                    description: The representative's roles. For sole traders, must be `[ubo]` only.
                  ownership_percentage:
                    title: Percentage of Ownership
                    type: integer
                    minimum: 0
                    maximum: 100
                    description: The percentage ownership of the sole trader with the UBO role.
                  individual:
                    title: Individual
                    type: object
                    required:
                      - first_name
                      - last_name
                      - email_address
                      - date_of_birth
                      - address
                      - place_of_birth
                      - citizenships
                      - phone
                      - national_id_type
                      - national_id_number
                    properties:
                      first_name:
                        title: First name
                        type: string
                        maxLength: 50
                        minLength: 2
                        description: The sole trader's first name.
                      middle_name:
                        title: Middle name
                        type: string
                        maxLength: 50
                        minLength: 2
                        description: The sole trader's middle name. Required if it appears in official documents.
                      last_name:
                        title: Last name
                        type: string
                        maxLength: 50
                        minLength: 2
                        description: The sole trader's last name.
                      email_address:
                        title: Email
                        type: string
                        format: email
                        description: The sole trader's email address.
                      date_of_birth:
                        title: Date of birth
                        type: object
                        required:
                          - day
                          - month
                          - year
                        properties:
                          day:
                            type: integer
                            minimum: 1
                            maximum: 31
                            description: The calendar day of the month they were born.
                          month:
                            type: integer
                            minimum: 1
                            maximum: 12
                            description: The month of the year they were born.
                          year:
                            type: integer
                            minimum: 1900
                            maximum: 2999
                            description: The year they were born.
                        description: The person's date of birth according to the Gregorian calendar.
                      address:
                        title: Address
                        type: object
                        required:
                          - address_line1
                          - city
                          - zip
                          - country
                        properties:
                          address_line1:
                            title: Address line 1
                            type: string
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            description: The first line of the address.
                          address_line2:
                            title: Address line 2
                            type: string
                            maxLength: 300
                            description: The second line of the address.
                          city:
                            title: City
                            type: string
                            maxLength: 300
                            minLength: 2
                            description: The address city.
                          state:
                            title: State
                            type: string
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            description: The address state. For US addresses, provide the two-letter ISO 3166-2 code.
                          zip:
                            title: Postal code
                            type: string
                            maxLength: 16
                            minLength: 1
                            pattern: ^[a-zA-Z0-9-\s]+$
                            description: The address ZIP code or post code.
                          country:
                            title: Country
                            type: string
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            format: iso-3166-1-alpha-2
                            description: The two-letter ISO 3166-1 alpha-2 country code.
                        description: The sole trader's residential address.
                      place_of_birth:
                        title: Place of Birth
                        type: object
                        required:
                          - country
                        properties:
                          country:
                            title: Country
                            type: string
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            format: iso-3166-1-alpha-2
                            description: The two-letter ISO 3166-1 alpha-2 country code.
                        description: The person's place of birth.
                      citizenships:
                        title: Citizenships
                        type: array
                        items:
                          type: object
                          description: A citizenship or legal-status record.
                          required:
                            - country
                          properties:
                            type:
                              title: Type
                              type: string
                              description: The type of citizenship or legal status (e.g. `citizenship`, `residency`).
                            country:
                              title: Country
                              type: string
                              maxLength: 2
                              minLength: 2
                              pattern: '[a-zA-Z]{2}'
                              format: iso-3166-1-alpha-2
                              description: The two-letter ISO 3166-1 alpha-2 country code.
                        description: The list of citizenships or legal statuses of the sole trader.
                      national_id_type:
                        title: Identification number type
                        type: string
                        enum:
                          - ssn
                          - itin
                          - passport
                          - driving_license
                          - national_id_card
                          - residence_permit
                          - other
                        description: The classification of the national identification number provided.
                      national_id_number:
                        title: National ID number
                        type: string
                        maxLength: 16
                        minLength: 5
                        pattern: ^[a-zA-Z0-9\-]+$
                        description: When `national_id_type` is `ssn`, provide the SSN (or ITIN). Otherwise, provide the identifier from the chosen document type.
                      phone:
                        title: Phone number
                        type: object
                        required:
                          - country_code
                          - number
                        properties:
                          country_code:
                            title: Country calling code
                            type: string
                            maxLength: 2
                            minLength: 2
                            pattern: '^[a-zA-Z]{2}$'
                            format: iso-3166-1-alpha-2
                            description: The two-letter ISO 3166-1 alpha-2 country code where the phone number is registered.
                          number:
                            title: Phone number
                            type: string
                            maxLength: 16
                            minLength: 5
                            pattern: ^[0-9]{5,16}$
                            description: The phone number without the country calling code.
                        description: The sole trader's phone number.
                    description: Personal information about the sole trader.
                  documents:
                    title: Documents
                    type: object
                    properties:
                      identity_verification:
                        title: Identity Document
                        type: object
                        required:
                          - type
                          - front
                        properties:
                          type:
                            title: Document type
                            type: string
                            enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                            description: The type of document used for identity verification.
                          front:
                            title: Front
                            type: string
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            description: The ID of the front side of the document.
                          back:
                            title: Back
                            type: string
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            description: The ID of the back side of the document.
                        description: The document to use to confirm the sole trader's identity.
                    description: Verification documents for the sole trader.
              description: The list of representatives for the sub-entity. Sole traders must have exactly one representative — the individual themselves — with roles set to `[ubo]`.
          description: Information about the sole trader sub-entity.
        documents:
          title: Documents
          type: object
          properties:
            tax_verification:
              title: Tax Verification
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - ein_letter
                  description: The type of IRS-issued document used for tax verification.
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document.
              description: IRS-issued document used to verify the entity's tax identification.
            company_verification:
              title: Company Verification
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - incorporation_document
                  description: The type of document used for company verification.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: Certified by a power of attorney within the last 3 months.
            articles_of_association:
              title: Memorandum or Articles of Association
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - memorandum_of_association
                    - articles_of_association
                  description: The type of document used.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: Memorandum or Articles of Association document.
            proof_of_legality:
              title: Proof of Legality
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - proof_of_legality
                  description: The type of document used for proof of legality.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: A regulatory license document required for the company to operate if applicable.
            proof_of_principal_address:
              title: Address Verification
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - proof_of_address
                  description: The type of document used for address verification.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: Proof of principal place of business.
            financial_statements:
              title: Financial Statements
              type: object
              required:
                - type
                - front
              properties:
                type:
                  title: Document type
                  type: string
                  enum:
                    - financial_statements
                  description: The type of document.
                front:
                  title: Front
                  type: string
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  description: The ID of the front side of the document.
              description: Financial statements (when applicable).
          description: Verification documents for the sub-entity.
      example:
        reference: isv-sole-trader-example001
        agreed_terms:
          date: "2026-07-02T10:30:00Z"
          ip_address: "8.8.8.8"
          name: "Hannah Bret"
          email: "hannah.bret@example.com"
          version: "cko-platform-terms-1.0.0"
        seller_category: cat_retail_001
        processing_details:
          annual_processing_volume: 1000
          average_transaction_value: 2000
          average_order_fulfillment_time: 3
          target_countries: [US]
          currency: USD
          payments:
            ach:
              annual_ach_volume: 100000
              average_ach_transaction_size: 5000
              estimated_monthly_credit_volume: 50000
              average_credit_amount: 2500
        contact_details:
          phone:
            number: '4155678900'
            country_code: US
          email_addresses:
            primary: hannah.bret@example.com
            pci_compliance_contact: pci.contact@example.com
        profile:
          urls: ['https://www.isv-sole-trader-example.com']
          mccs: ['5551']
          holding_currencies: [USD]
          default_holding_currency: USD
        company:
          business_type: individual_or_sole_proprietorship
          is_registered_company: false
          trading_name: Hannah's Goods
          date_of_incorporation:
            year: 2025
            month: 10
            day: 1
          principal_address:
            address_line1: 123 Main Street
            city: San Francisco
            state: CA
            zip: '94105'
            country: US
          representatives:
            - roles: [ubo]
              ownership_percentage: 100
              individual:
                first_name: Hannah
                last_name: Bret
                email_address: hannah.bret@example.com
                national_id_type: ssn
                national_id_number: '123456789'
                date_of_birth:
                  day: 15
                  month: 1
                  year: 1990
                place_of_birth:
                  country: US
                citizenships:
                  - country: US
                phone:
                  country_code: US
                  number: '4155678901'
                address:
                  address_line1: 123 Main Street
                  city: San Francisco
                  state: CA
                  zip: '94105'
                  country: US
    USSoleTraderFull2-0:
      type: object
      allOf:
      - title: Create & Submit US Individual (V2.0)
        required:
        - reference
        - individual
        - contact_details
        - profile
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
              default_holding_currency:
                title: Main currency
                description: The default holding currency code (iso-4217)
                format: iso-4217
              holding_currencies:
                title: Currencies
                items:
                  title: Currency
                  type: string
                  enum:
                  - USD
                  description: The currency code (iso-4217)
                description: Incoming funds are held in your selected currencies
                default:
                - USD
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 2000000000
                    maxLength: 16
                    minLength: 10
                    pattern: ^[2-9]{1}[0-9]{9,15}$
                    description: Include the area code
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          documents:
            title: Document
            required:
            - identity_verification
            type: object
            properties:
              identity_verification:
                title: Document
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - passport
                    - national_identity_card
                    - driving_license
                    - citizen_card
                    - residence_permit
                    - electoral_id
                    type: string
                    description: The type of document used for identity verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                  back:
                    title: Back
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the back side of the document as represented within Checkout.com systems.
                description: The document to use to confirm the individual's identity.
            description: A legal document used to verify identity.
          individual:
            title: Individual
            required:
            - first_name
            - last_name
            - date_of_birth
            - registered_address
            - trading_name
            - identification
            - financial_details
            type: object
            properties:
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              first_name:
                title: First name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's first name.
              middle_name:
                title: Middle name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's middle name. Required if appears in official docs
              last_name:
                title: Last name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's last name.
              date_of_birth:
                title: Date of birth
                required:
                - day
                - month
                - year
                type: object
                properties:
                  day:
                    maximum: 31
                    minimum: 1
                    type: integer
                    description: The calendar day of the month they were born.
                  month:
                    maximum: 12
                    minimum: 1
                    type: integer
                    description: The month of the year they were born.
                  year:
                    maximum: 2999
                    minimum: 1900
                    type: integer
                    description: The year they were born.
                description: The date of birth of the person according to the Gregorian calendar.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - state
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: US State
                    enum:
                    - AL
                    - AK
                    - AZ
                    - AR
                    - CA
                    - CO
                    - CT
                    - DE
                    - DC
                    - FL
                    - GA
                    - HI
                    - ID
                    - IL
                    - IN
                    - IA
                    - KS
                    - KY
                    - LA
                    - ME
                    - MD
                    - MA
                    - MI
                    - MN
                    - MS
                    - MO
                    - MT
                    - NE
                    - NV
                    - NH
                    - NJ
                    - NM
                    - NY
                    - NC
                    - ND
                    - OH
                    - OK
                    - OR
                    - PA
                    - RI
                    - SC
                    - SD
                    - TN
                    - TX
                    - UT
                    - VT
                    - VA
                    - WA
                    - WV
                    - WI
                    - WY
                    - AS
                    - GU
                    - MP
                    - PR
                    - VI
                    - UM
                    type: string
                    description: The address state. This field is required for addresses based in the US. For US addresses, provide the state as an ISO 3166-1 code.
                  zip:
                    title: Zip code
                    maxLength: 10
                    minLength: 5
                    pattern: ^\d{5}(?:[-\s]\d{4})?$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
              identification:
                title: Individual identification
                required:
                - national_id_number
                type: object
                properties:
                  national_id_number:
                    title: Social security number (SSN or ITIN) - US Residents Only
                    maxLength: 9
                    minLength: 9
                    pattern: ^\d{9}$
                    description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                description: Information about representatives of this company.
              financial_details:
                title: Financial Details
                required:
                - annual_processing_volume
                - average_transaction_value
                - highest_transaction_value
                - currency
                type: object
                properties:
                  annual_processing_volume:
                    title: Estimated annual processing volume
                    minimum: 0
                    type: integer
                    description: The estimated annual processing volume. In minor units without decimals.
                  average_transaction_value:
                    title: Average sales price
                    minimum: 0
                    type: integer
                    description: The expected average transaction value. In minor units without decimals.
                  highest_transaction_value:
                    title: Highest transaction value
                    minimum: 0
                    type: integer
                    description: The expected highest transaction value. In minor units without decimals.
                  currency:
                    title: Currency
                    enum:
                    - USD
                    type: string
                    description: The currency used for the processing details provided.
                description: Seller financial questions and supporting documents.
            description: Information about the individual represented by the sub-entity.
    USSoleTraderFull3-0:
      type: object
      title: Create & Submit US Sole Trader (V3.0)
      required:
        - reference
        - company
        - profile
        - contact_details
        - documents
        - processing_details
      properties:
        reference:
          title: Unique reference
          maxLength: 50
          minLength: 1
          type: string
          description: A unique reference you can later use to identify the sub-entity.
        status:
          type: string
          readOnly: true
        is_draft:
          type: boolean
          description: >-
            Specifies whether the sub-entity details are in draft.
      
      
            Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
          writeOnly: true
        profile:
          title: Profile
          required:
            - urls
            - mccs
            - default_holding_currency
            - holding_currencies
          type: object
          properties:
            urls:
              title: Website
              maxItems: 100
              type: array
              items:
                title: Company website URL
                maxLength: 300
                minLength: 4
                pattern: ^(http|https):\//\S{2,293}$
                type: string
                description: The URL of the company's website.
                format: uri
              description: A collection of website URLs the sub-entity accepts payments on.
            mccs:
              title: Industry
              maxItems: 5
              minItems: 1
              type: array
              items:
                title: Merchant category code
                pattern: ^[0-9]{4}$
                description: The merchant category code (4-digit ISO 18245).
              description: Select the categories that most closely describe the business
            default_holding_currency:
              title: Main currency
              description: The default holding currency code (iso-4217)
              format: iso-4217
            holding_currencies:
              title: Currencies
              type: array
              minItems: 1
              items:
                title: Currency
                type: string
                enum:
                  - USD
                description: The currency code (iso-4217)
              description: Incoming funds are held in your selected currencies
              default:
                - USD
          description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
        contact_details:
          title: Contact Details
          type: object
          properties:
            phone:
              title: Phone number
              required:
                - country_code
                - number
              type: object
              properties:
                country_code:
                  title: Country calling code
                  enum:
                    - US
                  type: string
                  description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                number:
                  title: Phone number
                  maxLength: 16
                  minLength: 10
                  pattern: ^[1-9][0-9]{9,16}$
                  type: string
                  description: The phone number without the country calling code
              description: Phone number
            email_addresses:
              required:
                - primary
              type: object
              properties:
                primary:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: Email addresses for this sub-entity.
            invitee:
              title: Invitee
              type: object
              properties:
                email:
                  title: Email
                  description: The main email address for this sub-entity.
                  format: email
              description: The details of the user responsible for onboarding the sub-entity.
          description: Contact details of this sub-entity.
        capabilities:
          title: Capabilities
          type: object
          description: The capabilities of the entity.
          readOnly: true
        requirements_due:
          title: Requirements Due
          minItems: 0
          type: array
          items:
            title: Requirements due entry
            type: object
            properties:
              field:
                title: Field
                type: string
                description: The field that is needs to be addressed.
              reason:
                title: Reason
                type: string
                description: The reason behind the field needing attention.
              message:
                title: Message
                type: string
                description: A more descriptive message.
            description: A list of fields which require attention
            readOnly: true
          description: List of requirements due in order to be onboarded.
          readOnly: true
        company:
          title: Business
          required:
            - trading_name
            - date_of_incorporation
            - principal_address
            - representatives
            - business_type
          type: object
          properties:
            trading_name:
              title: Trading name
              maxLength: 300
              minLength: 2
              type: string
              description: The trading name of the sub-entity, also referred to as 'doing business as'.
            date_of_incorporation:
              title: Date of Incorporation
              required:
                - month
                - year
              type: object
              properties:
                day:
                  maximum: 31
                  minimum: 1
                  type: integer
                  description: The day of the month the company was incorporated.
                month:
                  maximum: 12
                  minimum: 1
                  type: integer
                  description: The month the company was incorporated.
                year:
                  maximum: 2999
                  minimum: 1500
                  type: integer
                  description: The year the company was incorporated.
              description: The date the company was incorporated.
            principal_address:
              title: Principal Address
              required:
                - address_line1
                - city
                - zip
                - state
                - country
              type: object
              properties:
                address_line1:
                  title: Address line 1
                  maxLength: 300
                  minLength: 1
                  pattern: '\S'
                  type: string
                  description: The first line of the address.
                address_line2:
                  title: Address line 2
                  maxLength: 300
                  description: The second line of the address.
                city:
                  title: City
                  maxLength: 300
                  minLength: 2
                  type: string
                  description: The address city.
                state:
                  title: US State
                  enum:
                    - AL
                    - AK
                    - AZ
                    - AR
                    - CA
                    - CO
                    - CT
                    - DE
                    - DC
                    - FL
                    - GA
                    - HI
                    - ID
                    - IL
                    - IN
                    - IA
                    - KS
                    - KY
                    - LA
                    - ME
                    - MD
                    - MA
                    - MI
                    - MN
                    - MS
                    - MO
                    - MT
                    - NE
                    - NV
                    - NH
                    - NJ
                    - NM
                    - NY
                    - NC
                    - ND
                    - OH
                    - OK
                    - OR
                    - PA
                    - RI
                    - SC
                    - SD
                    - TN
                    - TX
                    - UT
                    - VT
                    - VA
                    - WA
                    - WV
                    - WI
                    - WY
                    - AS
                    - GU
                    - MP
                    - PR
                    - VI
                    - UM
                  type: string
                  description: The address state. This field is required for addresses based in the US. For US addresses, provide the state as an ISO 3166-1 code.
                zip:
                  title: Zip code
                  maxLength: 10
                  minLength: 5
                  pattern: ^\d{5}(?:[-\s]\d{4})?$
                  type: string
                  description: The address zip/postal code.
                country:
                  title: Country
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2)
                  format: iso-3166-1-alpha-2
              description: The primary location where business is performed.
            representatives:
              title: Representative List
              maxItems: 1
              minItems: 1
              type: array
              items:
                title: Person of Interest
                required:
                  - individual
                  - roles
                  - documents
                type: object
                properties:
                  id:
                    maxLength: 30
                    minLength: 30
                    pattern: ^rep_[a-z0-9]{26}$
                    description: The representative's id.
                  individual:
                    title: Individual
                    type: object
                    required:
                      - first_name
                      - last_name
                      - date_of_birth
                      - place_of_birth
                      - address
                    properties:
                      first_name:
                        title: First name
                        maxLength: 50
                        minLength: 2
                        type: string
                        description: The representative's first name.
                      middle_name:
                        title: Middle name
                        maxLength: 50
                        minLength: 2
                        type: string
                        description: The representative's middle name. Required if appears in official docs
                      last_name:
                        title: Last name
                        maxLength: 50
                        minLength: 2
                        type: string
                        description: The representative's last name.
                      date_of_birth:
                        title: Date of birth
                        required:
                          - day
                          - month
                          - year
                        type: object
                        properties:
                          day:
                            maximum: 31
                            minimum: 1
                            type: integer
                            description: The calendar day of the month they were born.
                          month:
                            maximum: 12
                            minimum: 1
                            type: integer
                            description: The month of the year they were born.
                          year:
                            maximum: 2999
                            minimum: 1900
                            type: integer
                            description: The year they were born.
                        description: The date of birth of the person according to the Gregorian calendar.
                      place_of_birth:
                        title: Place of Birth
                        required:
                          - country
                        properties:
                          country:
                            title: Country
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            type: string
                            description: The country code (iso-3166-1 alpha-2)
                            format: iso-3166-1-alpha-2
                        description: The place of birth of the person.
                      national_id_number:
                        title: Social security number (SSN or ITIN) - US Residents Only
                        maxLength: 9
                        minLength: 9
                        pattern: ^\d{9}$
                        description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                      email_address:
                        title: Email
                        description: The representative's personal email address.
                        format: email
                      phone:
                        title: Phone number
                        required:
                          - country_code
                          - number
                        type: object
                        properties:
                          country_code:
                            title: Country calling code
                            enum:
                              - AF
                              - AL
                              - DZ
                              - AS
                              - AD
                              - AO
                              - AI
                              - AG
                              - AR
                              - AM
                              - AW
                              - AU
                              - AT
                              - AZ
                              - BS
                              - BH
                              - BD
                              - BB
                              - BY
                              - BE
                              - BZ
                              - BJ
                              - BM
                              - BT
                              - BO
                              - BA
                              - BW
                              - BR
                              - BN
                              - BG
                              - BF
                              - BI
                              - CV
                              - KH
                              - CM
                              - CA
                              - KY
                              - CF
                              - TD
                              - CL
                              - CN
                              - CO
                              - KM
                              - CD
                              - CG
                              - CK
                              - CR
                              - HR
                              - CU
                              - CW
                              - CY
                              - CZ
                              - DK
                              - DJ
                              - DM
                              - DO
                              - EC
                              - EG
                              - SV
                              - GQ
                              - ER
                              - EE
                              - SZ
                              - ET
                              - FO
                              - FJ
                              - FI
                              - FR
                              - GF
                              - PF
                              - GA
                              - GM
                              - GE
                              - DE
                              - GH
                              - GI
                              - GR
                              - GL
                              - GD
                              - GP
                              - GU
                              - GT
                              - GG
                              - GN
                              - GW
                              - GY
                              - HT
                              - HN
                              - HK
                              - HU
                              - IS
                              - IN
                              - ID
                              - IR
                              - IQ
                              - IE
                              - IM
                              - IL
                              - IT
                              - JM
                              - JP
                              - JE
                              - JO
                              - KZ
                              - KE
                              - KI
                              - KP
                              - KR
                              - KW
                              - KG
                              - LA
                              - LV
                              - LB
                              - LS
                              - LR
                              - LY
                              - LI
                              - LT
                              - LU
                              - MO
                              - MG
                              - MW
                              - MY
                              - MV
                              - ML
                              - MT
                              - MH
                              - MQ
                              - MR
                              - MU
                              - MX
                              - FM
                              - MD
                              - MC
                              - MN
                              - ME
                              - MS
                              - MA
                              - MZ
                              - MM
                              - NA
                              - NR
                              - NP
                              - NL
                              - NC
                              - NZ
                              - NI
                              - NE
                              - NG
                              - NU
                              - NF
                              - MK
                              - MP
                              - NO
                              - OM
                              - PK
                              - PW
                              - PA
                              - PG
                              - PY
                              - PE
                              - PH
                              - PL
                              - PT
                              - PR
                              - QA
                              - RE
                              - RO
                              - RU
                              - RW
                              - BL
                              - SH
                              - KN
                              - LC
                              - PM
                              - VC
                              - WS
                              - SM
                              - ST
                              - SA
                              - SN
                              - RS
                              - SC
                              - SL
                              - SG
                              - BQ
                              - SX
                              - SK
                              - SI
                              - SB
                              - SO
                              - ZA
                              - GS
                              - SS
                              - ES
                              - LK
                              - SD
                              - SR
                              - SE
                              - CH
                              - SY
                              - TW
                              - TJ
                              - TZ
                              - TH
                              - TL
                              - TG
                              - TK
                              - TO
                              - TT
                              - TN
                              - TR
                              - TM
                              - TC
                              - TV
                              - UG
                              - UA
                              - AE
                              - GB
                              - US
                              - UY
                              - UZ
                              - VU
                              - VA
                              - VE
                              - VN
                              - VG
                              - VI
                              - WF
                              - EH
                              - YE
                              - ZM
                              - ZW
                            type: string
                            description: The country code (iso-3166-1 alpha-2) where the phone number is registered
                          number:
                            title: Phone number
                            maxLength: 16
                            minLength: 5
                            pattern: ^[0-9]{5,16}$
                            type: string
                            description: The phone number without the country calling code
                        description: Phone number
                      address:
                        title: Address
                        required:
                          - address_line1
                          - city
                          - zip
                          - country
                        type: object
                        properties:
                          address_line1:
                            title: Address line 1
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            type: string
                            description: The first line of the address.
                          address_line2:
                            title: Address line 2
                            maxLength: 300
                            description: The second line of the address.
                          city:
                            title: City
                            maxLength: 300
                            minLength: 2
                            type: string
                            description: The address city.
                          state:
                            title: State
                            maxLength: 300
                            minLength: 1
                            pattern: '\S'
                            type: string
                            description: The address state. This field is required for addresses based in the US and France. For US addresses, provide the state as an ISO 3166-1 code. For French addresses, provide the Department the address is located in.
                          zip:
                            title: Postal code
                            maxLength: 16
                            minLength: 1
                            pattern: ^[a-zA-Z0-9-\s]+$
                            type: string
                            description: The address zip/postal code.
                          country:
                            title: Country
                            maxLength: 2
                            minLength: 2
                            pattern: '[a-zA-Z]{2}'
                            type: string
                            description: The country code (iso-3166-1 alpha-2)
                            format: iso-3166-1-alpha-2
                        description: The representative's address.
                    description: Information about the individual representing the sub-entity.
                  roles:
                    title: Roles within company
                    maxItems: 1
                    minItems: 1
                    uniqueItems: true
                    type: array
                    items:
                      title: Representative Role
                      enum:
                        - ubo
                      type: string
                      description: The representative's role
                    description: The individual's roles within the company
                  documents:
                    title: Documents
                    required:
                      - identity_verification
                    type: object
                    properties:
                      identity_verification:
                        title: Document
                        required:
                          - type
                          - front
                        type: object
                        properties:
                          type:
                            title: Document type
                            enum:
                              - passport
                              - national_identity_card
                              - driving_license
                              - citizen_card
                              - residence_permit
                              - electoral_id
                            type: string
                            description: The type of document used for identity verification
                          front:
                            title: Front
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the front side of the document as represented within Checkout.com systems.
                          back:
                            title: Back
                            maxLength: 31
                            minLength: 31
                            pattern: ^file_[a-z2-7]{26}$
                            type: string
                            description: The ID of the back side of the document as represented within Checkout.com systems.
                        description: The document to use to confirm the individual's identity.
                    additionalProperties: false
                    description: Verification documents for the individual representative
                description: Personal information about the individual representing the sub-entity.
              description: Information about representatives of this company.
            business_type:
              title: Business type
              enum:
                - individual_or_sole_proprietorship
                - private_corporation
                - limited_liability_corporation
                - publicly_traded_corporation
                - limited_partnership
                - non_profit_entity
                - government_agency
                - regulated_financial_institution
                - sec_registered_entity
                - cftc_registered_entity
              type: string
              description: The legal type of the company
          description: Information about the company represented by the sub-entity.
        processing_details:
          type: object
          allOf:
            - title: Processing Details
              required:
                - settlement_country
                - target_countries
                - annual_processing_volume
                - average_transaction_value
                - highest_transaction_value
                - currency
              type: object
              properties:
                settlement_country:
                  title: Destination of funds
                  maxLength: 2
                  minLength: 2
                  pattern: '[a-zA-Z]{2}'
                  type: string
                  description: The country code (iso-3166-1 alpha-2) where the settlement bank account is located
                  format: iso-3166-1-alpha-2
                target_countries:
                  title: Target countries
                  maxItems: 10
                  minItems: 1
                  type: array
                  items:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                  description: Target country codes (iso-3166-1 alpha-2) with more than 10% expected volume processing with Checkout
                annual_processing_volume:
                  title: Estimated annual processing volume
                  minimum: 0
                  type: integer
                  description: The estimated annual processing volume. In minor units without decimals.
                average_transaction_value:
                  title: Average sales price
                  minimum: 0
                  type: integer
                  description: The expected average transaction value. In minor units without decimals.
                highest_transaction_value:
                  title: Highest transaction value
                  minimum: 0
                  type: integer
                  description: The expected highest transaction value. In minor units without decimals.
                currency:
                  title: Currency
                  enum:
                    - USD
                  type: string
                  description: The currency used for the processing details provided.
              description: Seller processing details.
        documents:
          title: Documents
          required:
            - bank_verification
          type: object
          properties:
            bank_verification:
              title: Bank Verification
              required:
                - type
                - front
              type: object
              properties:
                type:
                  title: Document type
                  enum:
                    - bank_statement
                  type: string
                  description: The type of document being used as bank verification
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: A document showing transactions from last 3 months
            additional_document1:
              title: Additional Documentation
              required:
                - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document2:
              title: Additional Documentation
              required:
                - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
            additional_document3:
              title: Additional Documentation
              required:
                - front
              type: object
              properties:
                front:
                  title: Front
                  maxLength: 31
                  minLength: 31
                  pattern: ^file_[a-z2-7]{26}$
                  type: string
                  description: The ID of the front side of the document as represented within Checkout.com systems.
              description: Additional space for documents to be provided when requested
          description: The documents used to support the verification of business details.
    USSoleTraderLite2-0:
      type: object
      allOf:
      - title: Create & Submit regulated US Individual (V2.0)
        required:
        - reference
        - individual
        - contact_details
        - profile
        type: object
        properties:
          reference:
            title: Unique reference
            maxLength: 50
            minLength: 1
            type: string
            description: A unique reference you can later use to identify the sub-entity.
          status:
            type: string
            readOnly: true
          is_draft:
            type: boolean
            description: >-
              Specifies whether the sub-entity details are in draft.
      
      
              Marking a sub-entity as a draft allows sub-entity details to be updated, without triggering due diligence checks.
            writeOnly: true
          profile:
            title: Profile
            required:
            - urls
            - mccs
            type: object
            properties:
              urls:
                title: Website
                maxItems: 100
                type: array
                items:
                  title: Company website URL
                  maxLength: 300
                  minLength: 4
                  pattern: ^(http|https):\//\S{2,293}$
                  type: string
                  description: The URL of the company's website.
                  format: uri
                description: A collection of website URLs the sub-entity accepts payments on.
              mccs:
                title: Industry
                maxItems: 5
                minItems: 1
                type: array
                items:
                  title: Merchant category code
                  pattern: ^[0-9]{4}$
                  description: The merchant category code (4-digit ISO 18245).
                description: Select the categories that most closely describe the business
            description: Information about the profile of the sub-entity, primarily regarding the products/services offered.
          contact_details:
            title: Contact Details
            required:
            - phone
            - email_addresses
            type: object
            properties:
              phone:
                title: Phone
                required:
                - number
                type: object
                properties:
                  number:
                    title: Phone number
                    maximum: 9999999999999999
                    minimum: 2000000000
                    maxLength: 16
                    minLength: 10
                    pattern: ^[2-9]{1}[0-9]{9,15}$
                    description: Include the area code
              email_addresses:
                required:
                - primary
                type: object
                properties:
                  primary:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
              invitee:
                title: Invitee
                type: object
                properties:
                  email:
                    title: Email
                    description: The main email address for this sub-entity.
                    format: email
          capabilities:
            title: Capabilities
            type: object
            description: The capabilities of the entity.
            readOnly: true
          requirements_due:
            title: Requirements Due
            minItems: 0
            type: array
            items:
              title: Requirements due entry
              type: object
              properties:
                field:
                  title: Field
                  type: string
                  description: The field that is needs to be addressed.
                reason:
                  title: Reason
                  type: string
                  description: The reason behind the field needing attention.
              description: A list of fields which require attention
              readOnly: true
            description: List of requirements due in order to be onboarded.
            readOnly: true
          instruments:
            type: array
            items:
              type: object
            readOnly: true
          documents:
            title: Document
            required:
            - identity_verification
            type: object
            properties:
              identity_verification:
                title: Document
                required:
                - type
                - front
                type: object
                properties:
                  type:
                    title: Document type
                    enum:
                    - passport
                    - national_identity_card
                    - driving_license
                    - citizen_card
                    - residence_permit
                    - electoral_id
                    type: string
                    description: The type of document used for identity verification
                  front:
                    title: Front
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the front side of the document as represented within Checkout.com systems.
                  back:
                    title: Back
                    maxLength: 31
                    minLength: 31
                    pattern: ^file_[a-z2-7]{26}$
                    type: string
                    description: The ID of the back side of the document as represented within Checkout.com systems.
                description: The document to use to confirm the individual's identity.
            description: A legal document used to verify identity.
          individual:
            title: Individual
            required:
            - first_name
            - last_name
            - date_of_birth
            - registered_address
            - trading_name
            type: object
            properties:
              trading_name:
                title: Trading name
                maxLength: 300
                minLength: 2
                type: string
                description: The trading name of the sub-entity, also referred to as 'doing business as'.
              first_name:
                title: First name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's first name.
              middle_name:
                title: Middle name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's middle name. Required if appears in official docs
              last_name:
                title: Last name
                maxLength: 50
                minLength: 2
                type: string
                description: The representative's last name.
              date_of_birth:
                title: Date of birth
                required:
                - day
                - month
                - year
                type: object
                properties:
                  day:
                    maximum: 31
                    minimum: 1
                    type: integer
                    description: The calendar day of the month they were born.
                  month:
                    maximum: 12
                    minimum: 1
                    type: integer
                    description: The month of the year they were born.
                  year:
                    maximum: 2999
                    minimum: 1900
                    type: integer
                    description: The year they were born.
                description: The date of birth of the person according to the Gregorian calendar.
              registered_address:
                title: Registered Address
                required:
                - address_line1
                - city
                - zip
                - state
                - country
                type: object
                properties:
                  address_line1:
                    title: Address line 1
                    maxLength: 300
                    minLength: 1
                    pattern: '\S'
                    type: string
                    description: The first line of the address.
                  address_line2:
                    title: Address line 2
                    maxLength: 300
                    description: The second line of the address.
                  city:
                    title: City
                    maxLength: 300
                    minLength: 2
                    type: string
                    description: The address city.
                  state:
                    title: US State
                    enum:
                    - AL
                    - AK
                    - AZ
                    - AR
                    - CA
                    - CO
                    - CT
                    - DE
                    - DC
                    - FL
                    - GA
                    - HI
                    - ID
                    - IL
                    - IN
                    - IA
                    - KS
                    - KY
                    - LA
                    - ME
                    - MD
                    - MA
                    - MI
                    - MN
                    - MS
                    - MO
                    - MT
                    - NE
                    - NV
                    - NH
                    - NJ
                    - NM
                    - NY
                    - NC
                    - ND
                    - OH
                    - OK
                    - OR
                    - PA
                    - RI
                    - SC
                    - SD
                    - TN
                    - TX
                    - UT
                    - VT
                    - VA
                    - WA
                    - WV
                    - WI
                    - WY
                    - AS
                    - GU
                    - MP
                    - PR
                    - VI
                    - UM
                    type: string
                    description: The address state. This field is required for addresses based in the US. For US addresses, provide the state as an ISO 3166-1 code.
                  zip:
                    title: Zip code
                    maxLength: 10
                    minLength: 5
                    pattern: ^\d{5}(?:[-\s]\d{4})?$
                    type: string
                    description: The address zip/postal code.
                  country:
                    title: Country
                    maxLength: 2
                    minLength: 2
                    pattern: '[a-zA-Z]{2}'
                    type: string
                    description: The country code (iso-3166-1 alpha-2)
                    format: iso-3166-1-alpha-2
                description: The registered address of the company.
              identification:
                title: Individual identification
                required:
                - national_id_number
                type: object
                properties:
                  national_id_number:
                    title: Social security number (SSN or ITIN) - US Residents Only
                    maxLength: 9
                    minLength: 9
                    pattern: ^\d{9}$
                    description: Social security number (SSN) or Individual Taxpayer Identification Number (ITIN) for non-US citizens
                description: Information about representatives of this company.
              financial_details:
                title: Financial Details
                type: object
                properties:
                  annual_processing_volume:
                    title: Estimated annual processing volume
                    minimum: 0
                    type: integer
                    description: The estimated annual processing volume. In minor units without decimals.
                  average_transaction_value:
                    title: Average sales price
                    minimum: 0
                    type: integer
                    description: The expected average transaction value. In minor units without decimals.
                  highest_transaction_value:
                    title: Highest transaction value
                    minimum: 0
                    type: integer
                    description: The expected highest transaction value. In minor units without decimals.
                  currency:
                    title: Currency
                    enum:
                    - USD
                    type: string
                    description: The currency used for the processing details provided.
                description: Seller financial questions and supporting documents.
            description: Information about the individual represented by the sub-entity.
    PreconditionRequiredError:
      type: object
      properties:
        status:
          type: string
          example: '428'
    Purpose:
      description:
        The purpose of the payment. 
        
        This field might be required for AFT transactions depending on the card's `issuer_country`. To view a card's `issuer_country`, [retrieve the card's metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response).
        
        See the [AFT documentation page](https://www.checkout.com/docs/payments/manage-payments/perform-an-account-funding-transaction) for more details.
      type: string
      enum:
        - donations
        - education
        - emergency_need
        - expatriation
        - family_support
        - financial_services
        - gifts
        - income
        - insurance
        - investment
        - it_services
        - leisure
        - loan_payment
        - medical_treatment
        - other
        - pension
        - royalties
        - savings
        - travel_and_tourism
    AccountResponse:
      type: object
      properties:
        client_id:
          type: string
          description: The client ID.
          example: 'cli_bvaelhppmfiufdnatam37wrfc4'
          pattern: "^(cli)_(\\w{26})$"
        entity_id:
          type: string
          description: The entity ID.
          example: 'ent_znj4ih5kn4fuxiaquoudv5mvwy'
          pattern: "^(ent)_(\\w{26})$"
      additionalProperties: false
      description: The client and entity details.
    FileResponse:
      type: object
      properties:
        id:
          type: string
          description: The file ID.
          example: file_7ysmgfkj4ipunduud22uf73iey
          pattern: "^(file)_(\\w{26})$"
        filename:
          type: string
          description: The file name.
          example: financial-actions_ent_znj4ih5kn4fuxiaquoudv5mvwy_20220218_000000001drl_1.csv
        format:
          type: string
          description: The file format.
          example: CSV
        _links:
          type: object
          description: The link to retrieve the file from.
          properties:
            self:
              type: object
              description: The self object.
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: https://{prefix}.api.checkout.com/reports/rpt_lmmldzousk7etoqijqundqexa4/files/file_lmmldzousk7etoqijqundqexa4
      additionalProperties: false
      description: Details of a file from the response.
    ReportErrorResponse:
      type: object
      properties:
        request_id:
          type: string
          description: Request Id
          example: '0HMJGFVAQ35TL:00000117'
        error_type:
          type: string
          description: >
            The type of error. <br/>
            • invalid_request = Usually with an http status code 422. The request payload failed validation. <br/>
            • not_found = Usually with an http status code 404. The requested resource was not found. <br/>
        error_codes:
          type: array
          items:
            type: string
          description: >
            Error response code. Full list of error codes below: <br/>
            • invalid_some_field = Usually with an error type `invalid_request` and http status code 422 Unprocessable entity. The field `some_field` failed validation. Please consult the API spec. <br/>
            • some_resource_not_found = Usually with an error type `not_found`. The resource you are trying to get does not exist. <br/>
      additionalProperties: false
      description: Error Response
    ReportListResponse:
      type: object
      properties:
        count:
          type: integer
          description: The total number of reports on the current page.
          format: int32
          example: 1
        limit:
          type: integer
          description: The maximum number of results included per page.
          format: int32
          example: 5
          minimum: 1
          maximum: 100
          default: 100    
        data:
          type: array
          items:
            $ref: '#/components/schemas/ReportResponse'
          description: The list of reports from the current page.
        _links:
          type: object
          description: The links object.
          properties:
            self:
              type: object
              description: The self object.
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: https://{prefix}.api.checkout.com/reports?entity_id=ent_znj4ih5kn4fuxiaquoudv5mvwy&created_after=2022-02-17T00:00:00.000Z&limit=5
            next:
              type: object
              description: The next object.
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: 'https://{prefix}.api.checkout.com/reports?pagination_token=NaZMwq3KbreYcXg0dg752Dg8ps4orkwVK9pj9WFzkXk8rPoR32Wf74QWX0EkZ&entity_id=ent_znj4ih5kn4fuxiaquoudv5mvwy&created_after=2022-02-17T00:00:00.000Z&limit=5'
      additionalProperties: false
      description: The list of reports in the response.
    ReportResponse:
      type: object
      properties:
        id:
          type: string
          description: The report ID.
          example: rpt_lmmldzousk7etoqijqundqexa4
          pattern: "^(rpt)_(\\w{26})$"
        created_on:
          type: string
          description: The date and time the report was created.
          format: date-time
          example: '2022-02-18T13:00:12.357Z'
        last_modified_on:
          type: string
          description: The date the report was last modified.
          format: date-time
          example: '2022-02-18T13:16:12.357Z'
        type:
          type: string
          description: The report type.
          enum:
            - Authentication
            - Balance
            - BalanceBreakdown
            - BankPayouts
            - CardPayouts
            - Disputes
            - FinancialActions
            - FinancialActionsByPayout
            - FraudDetection
            - IssuingAuthorizations
            - IssuingCards
            - IssuingChargebacks
            - IssuingPresentments
            - IssuingSettlementActivity
            - IssuingSettlementSummary
            - Manifest
            - Payments
            - PayoutSummary
            - RealTimeAccountUpdater
            - ReportedFraudulentTransactions
            - Retrievals
            - SettlementBreakdown
            - SettlementStatement
        description:
          type: string
          description: The report description.
          example: Reconciliation Report for X.
        account:
          $ref: '#/components/schemas/AccountResponse'
        tags:
          type: array
          items:
            type: string
          description: The list of tags for filtering.
          example:
            - payout_id:pay_123456789
        from:
          type: string
          description: The reporting period's start date and time.
          format: date-time
          example: '2022-02-17T12:00:00Z'
        to:
          type: string
          description: The reporting period's end date and time.
          format: date-time
          example: '2022-02-18T12:00:00Z'
        files:
          type: array
          items:
            $ref: '#/components/schemas/FileResponse'
          description: The list of files included in the report.
        _links:
          type: object
          description: The links object.
          properties:
            self:
              type: object
              description: The self object.
              allOf:
                - $ref: '#/components/schemas/Link'
              example:
                href: https://{prefix}.api.checkout.com/reports/rpt_lmmldzousk7etoqijqundqexa4
      additionalProperties: false
      description: Report response details.
    CardSourcePrism:
      type: object
      description: A card payment source
      allOf:
        - $ref: "#/components/schemas/RiskPaymentRequestSource"
        - type: object
          required:
            - type
            - number
            - expiry_month
            - expiry_year
          properties:
            number:
              type: string
              description: The card number (without separators)
              maxLength: 19
              example: "4543474002249996"
            expiry_month:
              type: integer
              description: The expiry month of the card
              minimum: 1
              minLength: 1
              maxLength: 2
              example: 6
            expiry_year:
              type: integer
              description: The expiry year of the card
              minLength: 4
              maxLength: 4
              example: 2025
            name:
              type: string
              description: The name of the cardholder
              maxLength: 255
              example: "Bruce Wayne"
            billing_address:
              description: The billing address of the cardholder
              allOf:
                - $ref: '#/components/schemas/Address'
            phone:
              description: The phone number of the cardholder
              allOf:
                - $ref: '#/components/schemas/PhoneNumber'
    CustomerSourcePrism:
      type: object
      description: A customer source
      required:
        - id
      allOf:
        - $ref: "#/components/schemas/RiskPaymentRequestSource"
        - type: object
          properties:
            id:
              type: string
              pattern: "^(cus)_(\\w{26})$"
              description: The customer's identifier.
              example: "cus_y3oqhf46pyzuxjbcn2giaqnb44"
            # email:
            #   type: string
            #   format: email
            #   description: The customer's email address. Required if `id` is not provided
            #   maxLength: 255
            #   example: "brucewayne@gmail.com"
      
    IdSourcePrism:
      type: object
      description: An existing payment source
      required:
        - id
      allOf:
        - $ref: "#/components/schemas/RiskPaymentRequestSource"
        - type: object
          properties:
            id:
              type: string
              pattern: "^(src)_(\\w{26})$"
              description: The payment source identifier (e.g., a card source identifier)
              example: src_wmlfc3zyhqzehihu7giusaaawu
            cvv:
              type: string
              description: The card verification value/code (for card sources). 3 digits, except for American Express (4 digits)
              example: "956"
              minLength: 3
              maxLength: 4
    RiskPaymentRequestSource:
      type: object
      description: The source of the payment.<br>
      discriminator:
        propertyName: type
        mapping:
          token: '#/components/schemas/PaymentRequestTokenSource'
          id: '#/components/schemas/IdSourcePrism'
          card: '#/components/schemas/CardSourcePrism'
          customer: '#/components/schemas/CustomerSourcePrism'
      required:
        - type
      properties:
        type:
          type: string
          description: The payment source type
          example: "card"
    Segment:
      type: object
      description: The dimension details about business segment for payment request. At least one dimension required.
      properties:
        brand:
          type: string
          description: The brand of business segment.
          maxLength: 50
          example: 'Acme Corporation'
        business_category:
          type: string
          description: The category of business segment.
          maxLength: 50
          example: 'Inward Payments'
        market:
          type: string
          description: The market of business segment.
          maxLength: 50
          example: 'UK'
    ServerTimestamp:
      type: string
      description: Read-only UTC timestamp, automatically assigned by us
      format: date-time
      readOnly: true
    SessionsBillingDescriptor:
      type: object
      description: An optional dynamic billing descriptor.
      required:
        - name
      properties:
        name:
          type: string
          description: "A dynamic description of the payment that replaces the Merchant Name that is displayed in 3DS Challenge window. Applies to card payments only. Special characters allowed: `.` `!` `*` `-` `=` `_` `@`"
          example: "SUPERHEROES.COM"    
          maxLength: 40
    SimulatorAvailableRequirement:
      type: object
      properties:
        field:
          type: string
          description: The public path of the requirement field.
          example: individual.identification.document
        type:
          type: string
          description: The data type of the field.
          example: string
    SimulatorErrorResponse:
      type: object
      properties:
        error_codes:
          type: array
          description: Error codes describing what went wrong.
          items:
            type: string
            example: invalid_status
    SimulatorRunScenarioResponse:
      type: object
      properties:
        entity_id:
          type: string
          description: The ID of the entity.
          example: ent_w4jelhppmfiufdnatam37wrfc4
        scenario_id:
          type: string
          description: The ID of the scenario that was run.
          example: go_active
        scenario_name:
          type: string
          description: The name of the scenario that was run.
          example: Go Active
        previous_status:
          type: string
          description: The entity status before the scenario ran.
          example: RequirementsDue
        current_status:
          type: string
          description: The entity status after the scenario ran.
          example: Active
        requirements_due:
          type: array
          description: Requirement fields applied by the scenario, if any.
          items:
            type: string
            example: individual.identification.document
    SimulatorScenario:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the scenario.
          example: go_active
        name:
          type: string
          description: Human-readable name of the scenario.
          example: Go Active
        description:
          type: string
          description: Description of what the scenario does.
          example: Transitions the entity to active status.
        action:
          type: string
          description: The action type performed by this scenario.
          example: set_status
        status:
          type: string
          description: The resulting entity status after the scenario runs. Empty string for non-status actions.
          example: active
        requirements_due:
          type: array
          description: Requirement fields applied when the scenario runs, if any.
          items:
            type: string
            example: individual.identification.document
    SimulatorSetRequirementsDueRequest:
      type: object
      required:
      - fields
      properties:
        fields:
          type: array
          description: |
            The requirement fields to mark as due. <br/>
            Call the [List available requirements](/#tag/Onboarding-Simulator/paths/~1simulate~1requirements-due/get) endpoint for a list of valid values.
          items:
            type: string
            example: individual.identification.document
    SimulatorSetRequirementsDueResponse:
      type: object
      properties:
        entity_id:
          type: string
          description: The ID of the entity.
          example: ent_w4jelhppmfiufdnatam37wrfc4
        previous_status:
          type: string
          description: The status before the update.
          example: Active
        current_status:
          type: string
          description: The status after the update.
          example: requirements_due
        requirements_due:
          type: array
          description: The requirement fields that are now marked as due.
          items:
            type: string
            example: individual.identification.document
    SimulatorSetStatusRequest:
      type: object
      required:
      - status
      properties:
        status:
          type: string
          description: The status to set on the entity.
          example: active
          enum:
          - draft
          - requirements_due
          - pending
          - active
          - restricted
          - rejected
          - inactive
    SimulatorSetStatusResponse:
      type: object
      properties:
        entity_id:
          type: string
          description: The ID of the entity.
          example: ent_w4jelhppmfiufdnatam37wrfc4
        previous_status:
          type: string
          description: The status before the update.
          example: Pending
        current_status:
          type: string
          description: The status after the update.
          example: Active
    Acs:
      type: object
      required:
        - reference_number
        - transaction_id
        - operator_id
        - challenge_mandated
      description: 'The access control server (ACS) information. Can be empty if the session is still pending or if communication with the ACS failed. This will be available when the channel data and issuer fingerprint result have been provided.'
      properties:
        reference_number:
          description: EMVCo-assigned unique identifier to track approved ACS
          type: string
          maxLength: 32
          example: ACSRefNum1234
        transaction_id:
          description: Universally unique transaction identifier assigned by the ACS
          type: string
          minLength: 36
          maxLength: 36
          example: be481bd1-1f1d-4ef8-9fa8-0fb2a38e3c87
        operator_id:
          description: DS assigned ACS identifier
          type: string
          maxLength: 32
          example: ACSRefNum1234
        url:
          description: Fully qualified URL of the ACS to be used for the challenge
          type: string
          maxLength: 2048
          example: https://server.acsdomainname.com
        signed_content:
          description: >
            Contains the JSON web signature (JWS) compact serialization created by the ACS for a challenged app authentication.
            (Example has been truncated for readability.)
          type: string
          maxLength: 512
          example: eyJ4NWMiOlsiTUlJQjdEQ0NBWktnQXdJQkFnSVZBSzIxWEc5SVBCL083QzZjUTBvRlJJUkIwWDI0TUFvR0NDcUdTTTQ5QkFNQ01INHhDekFKQm
        challenge_mandated:
          type: boolean
          description: Indicates whether a challenge is required for the transaction to be authorized
        authentication_type:
          type: string
          pattern: "^\\d{2}$"
          description: >
            The type of authentication as returned from the ACS provider. <br/>
            • 01 = Static <br/>
            • 02 = Dynamic <br/>
            • 03 = OOB <br/>
            • 04-79 = Reserved for EMVCo future use <br/>
            • 80-99 = Reserved for DS use
        challenge_cancel_reason:
          type: string
          description: Indicator informing the ACS and the DS that the authentication has been cancelled
          enum:
            - cardholder_cancel
            - transaction_timed_out
            - challenge_timed_out
            - transaction_error
            - unknown
            - sdk_timed_out
        interface:
          type: string
          enum:
            - native_ui
            - html
        ui_template:
          type: string
          enum:
            - text
            - single_select
            - multi_select
            - oob
            - html_other
        challenge_cancel_reason_code:
          type: string
          description: Indicator in the 3D Secure 2 RReq when the challenge is cancelled
          minimum: 0
          maximum: 99
    Amount:
      type: integer
      format: int64
      description: 'The amount in the minor currency.'
      example: 120
      minimum: 0
      maximum: 9007199254740991
    App:
      allOf:
        - $ref: '#/components/schemas/ChannelData'
        - type: object
          required:
            - sdk_app_id
            - sdk_max_timeout
            - sdk_ephem_pub_key
            - sdk_encrypted_data
            - sdk_reference_number
            - sdk_transaction_id
            - sdk_interface_type
            - sdk_ui_elements
          properties:
            channel:
              type: string
              enum:
                - app
            sdk_app_id:
              description: >
                Universally unique ID created upon all installations and updates of the 3DS Requestor App on a consumer device. This will be newly generated and stored by the 3DS SDK for each installation or update.
              type: string
              minLength: 36
              maxLength: 36
              example: dbd64fcb-c19a-4728-8849-e3d50bfdde39
            sdk_max_timeout:
              description: >
                Indicates maximum amount of time (in minutes) for all exchanges
              type: integer
              minimum: 5
              example: 5
            sdk_ephem_pub_key:
              $ref: '#/components/schemas/SdkEphemeralPublicKey'
            sdk_reference_number:
              description: >
                Identifies the vendor and version for the 3DS SDK that is integrated in a 3DS Requestor App, assigned by EMVCo when the 3DS SDK is approved.
              type: string
              maxLength: 32
              example: '3DS_LOA_SDK_PPFU_020100_00007'
            sdk_encrypted_data:
              description: >
                A JSON web encryption (JWE) object in compact serialization, containing data encrypted by the SDK for the Directory Server to decrypt.
              type: string
              maxLength: 64000
              example: '<device-information>'
            sdk_transaction_id:
              description: >
                Universally unique transaction identifier assigned by the 3DS SDK to identify a single transaction
              type: string
              minLength: 36
              maxLength: 36
              example: 'b2385523-a66c-4907-ac3c-91848e8c0067'
            sdk_interface_type:
              description: >
                Lists all of the SDK interface types that the device supports for displaying specific challenge user interfaces within the SDK
              type: string
              enum:
                - native
                - html
                - both
            sdk_ui_elements:
              description: >
                Lists all the user interface elements that the cardholder's device supports for displaying specific challenge user interfaces within the SDK
              type: array
              items:
                type: string
                enum:
                  - text
                  - single_select
                  - multi_select
                  - oob
                  - html_other
    Approved:
      type: boolean
      description: 'Whether the authentication was successful. This will only be set if the Session is in a final state'
      example: false
    AuthenticationType:
      type: string
      enum:
        - regular
        - recurring
        - installment
        - maintain_card
        - add_card
      description: Indicates the type of payment this session is for. Please note the spelling of `installment` consists of two `l`s.
      example: regular
      default: regular
    Browser:
      allOf:
        - $ref: '#/components/schemas/ChannelData'
        - type: object
          required:
            - accept_header
            - java_enabled
            - javascript_enabled
            - language
            - color_depth
            - screen_height
            - screen_width
            - timezone
            - user_agent
            - ip_address
          properties:
            channel:
              type: string
              enum:
                - browser
            three_ds_method_completion:
              type: string
              description: >
                Indicates whether the 3DS Method successfully completed<br/>
                • Y = Successfully completed <br/>
                • N = Did not successfully complete <br/>
                • U = Unavailable (3DS Method URL was not present in the preparation response (PRes) message data for the card range associated with the cardholder's account number)
              enum:
                - Y
                - N
                - U
              minLength: 1
              maxLength: 1
              default: U
              example: U
            accept_header:
              type: string
              maxLength: 2048
              description: >
                Exact content of the HTTP accept headers as sent to the 3DS Requestor from the cardholder’s browser
              example: 'Accept:  *.*, q=0.1'
            java_enabled:
              type: boolean
              description: >
                Boolean that represents the ability of the cardholder's browser to execute Java. Value is returned from the `navigator.javaEnabled` property.
              example: true
            javascript_enabled:
              type: boolean
              description: >
                Boolean that represents the ability of the cardholder's browser to execute Javascript. Value is returned from the `navigator.javascriptEnabled` property.            
                *only applicable/required for authentication performed using 3DS 2.2. If authentications results in processing on 2.1 or lower, this field will be disregarded. 
              default: true
              example: true
            language:
              type: string
              minLength: 1
              maxLength: 12
              description: >
                Value representing the browser language as defined in IETF BCP47. Returned from the `navigator.language` property.
              example: 'FR-fr'
            color_depth:
              type: string
              minLength: 1
              maxLength: 2
              description: >
                Value representing the bit depth of the color palette for displaying images, in bits per pixel. Obtained from the cardholder's browser from the `screen.colorDepth` property.
              example: '16'
            screen_height:
              type: string
              minLength: 1
              maxLength: 6
              description: >
                Total height of the cardholder’s screen in pixels. Value is returned from the `screen.height` property.
              example: '1080'
            screen_width:
              type: string
              minLength: 1
              maxLength: 6
              description: >
                Total width of the cardholder’s screen in pixels. Value is returned from the `screen.width` property.
              example: '1920'
            timezone:
              type: string
              minLength: 1
              maxLength: 5
              description: >
                Time difference between UTC time and the local time of the cardholder's browser, in minutes.
              example: '60'
            user_agent:
              type: string
              maxLength: 2048
              description: >
                Exact content of the HTTP user-agent header
              example: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
            ip_address:
              description: >
                IP address of the browser as returned by the HTTP headers to the 3DS Requestor
              type: string
              maxLength: 45
              example: '1.12.123.255'
            iframe_payment_allowed:
              description: >
                Whether the Payment API is enabled for all parent frames. This is required for Google SPA support in hosted sessions.
              type: boolean
              example: true
            user_agent_client_hint:
              description: >
                The raw Sec-CH-UA header value. This can improve Google SPA support.
              type: string
              example: >
                'Sec-CH-UA: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"'
    CardholderAccountInfo:
      type: object
      description: >
        Additional information about the Cardholder's account.
      properties:
        purchase_count:
          type: number
          description: >
            The number of purchases with this cardholder's account during the last six months.
          example: 10
          minimum: 0
          maximum: 9999
        account_age:
          type: string
          description: >
            The length of time that the payment account was enrolled in the cardholder's account.
          enum:
            - no_account
            - created_during_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        add_card_attempts:
          type: number
          description: >
            The number of Add Card attempts in the last 24 hours.
          example: 10
          minimum: 0
          maximum: 999
        shipping_address_age:
          type: string
          description: >
            Indicates when the shipping address used for this transaction was first used.
          enum:
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        account_name_matches_shipping_name:
          type: boolean
          description: >
            Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction.
          example: true
        suspicious_account_activity:
          type: boolean
          description: >
            Indicates whether suspicious activity on the cardholder account has been observed.
          example: true
        transactions_today:
          type: number
          description: >
            The number of transactions (successful and abandoned) for the cardholder account across all payment accounts in the previous 24 hours
          minimum: 0
          maximum: 999
          example: 10
        authentication_method:
          type: string
          description: >
            Information about how the cardholder was authenticated before or during the transaction.
          deprecated: true  
          enum:
            - no_authentication
            - own_credentials
            - federated_id
            - issuer_credentials
            - third_party_authentication
            - fido
        cardholder_account_age_indicator:
          type: string
          description: The length of time the cardholder has held the account with the 3DS Requestor.
          enum:
            - no_account,
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        account_change:
          type: string
          format: date-time
          description: |
            The UTC date and time the cardholder’s account with the 3DS Requestor was last changed, in ISO 8601 format.
            
            Changes that affect this value include:
            - updating the billing or shipping address
            - adding a new payment account
            - adding a new user
        account_change_indicator:
          type: string
          description: |
            The amount of time since the cardholder’s account information with the 3DS Requestor was last changed.
            
            Changes that affect this value include:
            - updating the billing or shipping address
            - adding a new payment account
            - adding a new user
          enum:
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        account_date:
          type: string
          format: date-time
          description: The UTC date and time the cardholder opened the account with the 3DS Requestor, in ISO 8601 format.
        account_password_change:
          type: string
          format: date-time
          description: The UTC date and time the cardholder’s account with the 3DS Requestor was last reset or had a password change, in ISO 8601 format.
        account_password_change_indicator:
          type: string
          description: The amount of time since the cardholder’s account with the 3DS Requestor was last reset or had a password change.
          enum:
            - no_change
            - this_transaction
            - less_than_thirty_days
            - thirty_to_sixty_days
            - more_than_sixty_days
        transactions_per_year:
          type: integer
          description: |
            The number of transactions associated with the cardholder's account with the 3DS Requestor in the previous year. This value includes both successful and abandoned transactions, across all payment accounts. 
          
            Set this value to `999` if the number of transactions is `1000` or greater.
          example: 2
          maximum: 999
          maxLength: 3
        payment_account_age:
          type: string
          format: date-time
          description: The UTC date and time the payment account was enrolled in the cardholder’s account with the 3DS Requestor, in ISO 8601 format.
        shipping_address_usage:
          type: string
          format: date-time
          description: The UTC date and time the shipping address used for the transaction was first used with the 3DS Requestor, in ISO 8601 format.
        account_type:
          type: string
          description: The type of account, in the case of a card product with multiple accounts.
          enum:
            - not_applicable
            - credit
            - debit
        account_id:
          type: string
          description: Additional information about the account optionally provided by the 3DS Requestor.
          maxLength: 64
        three_ds_requestor_authentication_info:
          $ref: '#/components/schemas/ThreeDsRequestorAuthenticationInfo'
    CardInfo:
      type: object
      description: Details related to the Session source. This property should always be in the response, unless a `card` source was used and communication with Checkout.com's Vault was not possible.
      required:
        - instrument_id
        - fingerprint
      properties:
        instrument_id:
          type: string
          description: The identifier of the card instrument.
          example: src_ubfj2q76miwundwlk72vxt2i7q
        fingerprint:
          type: string
          description: A token that can uniquely identify this card across all customers.
          example: vnsdrvikkvre3dtrjjvlm5du4q
        metadata:
          type: object
          description: Additional details for this card
          properties:
            card_type:
              type: string
              description: The card type
              enum:
                - CREDIT
                - DEBIT
                - PREPAID
                - CHARGE
                - DEFERRED DEBIT
              example: CREDIT
            card_category:
              type: string
              description: The card category.
              enum:
                - CONSUMER
                - COMMERCIAL
              example: CONSUMER
            issuer_name:
              type: string
              description: The card issuer's name.
              example: Checkout
            issuer_country:
              type: string
              pattern: ^[A-Z]{2}
              description: The two letter alpha country code of the card issuer.
              example: GB
            product_id:
              type: string
              description: The issuer/card scheme product identifier.
              example: MDS
            product_type:
              type: string
              description: The issuer/card scheme product type.
              example: 'Debit MasterCard® Card'
    CardSource:
      type: object
      allOf:
        - $ref: '#/components/schemas/SessionSource'
        - type: object
          required:
            - type
            - number
            - expiry_month
            - expiry_year
          properties:
            name:
              type: string
              description: The name of the cardholder. Any special characters will be replaced.
              minLength: 2
              maxLength: 45
              example: 'Bruce Wayne'
            stored:
              type: boolean
              description: >-
                Indicates whether this card is being submitted from your own stored card-on-file system, rather than being entered by the customer at the time of payment. Set to `true` when you provide card details that you already have on file for the customer.
              default: false
              example: true
    Category:
      type: string
      enum:
        - payment
        - non_payment
      description: Indicates the category of the authentication request
      default: payment
    ChallengeIndicator:
      type: string
      enum:
        - no_preference
        - no_challenge_requested
        - challenge_requested
        - challenge_requested_mandate
        - low_value
        - trusted_listing
        - trusted_listing_prompt
        - transaction_risk_assessment
        - data_share
      description: > 
        Indicates whether a challenge is requested for this session.<br/> <br/>
        The following are requests for exemption: <br/>
        • `low_value` <br/>
        • `trusted_listing` <br/>
        • `trusted_listing_prompt` <br/>
        • `transaction_risk_assessment` <br/><br/>
        
        If an exemption cannot be applied, then the value `no_challenge_requested` will be used instead.
      maxLength: 50
      example: no_preference
      default: no_preference
    ChannelData:
      required:
        - channel
      description: The information gathered from the environment used to initiate the session
      discriminator:
        propertyName: channel
        mapping:
          browser: '#/components/schemas/Browser'
          app: '#/components/schemas/App'
          merchant_initiated: '#/components/schemas/MerchantInitiated'
      properties:
        channel:
          type: string
          description: Indicates the type of channel interface being used to initiate the transaction.
          default: 'browser'
      example:
        channel: browser
        accept_header: 'Accept:  *.*, q=0.1'
        java_enabled: true
        javascript_enabled: true
        language: 'FR-fr'
        color_depth: '16'
        screen_height: '1080'
        screen_width: '1920'
        timezone: '60'
        user_agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
        three_ds_method_completion: 'Y'
        ip_address: '1.12.123.255'
        iframe_payment_allowed: true
        user_agent_client_hint: 'Sec-CH-UA: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"'
    CompletionInfo:
      required:
        - type
      description: The redirect information needed for callbacks or redirects after the payment is completed
      discriminator:
        propertyName: type
        mapping:
          hosted: '#/components/schemas/HostedCompletionInfo'
          non_hosted: '#/components/schemas/NonHostedCompletionInfo'
      properties:
        type:
          type: string
          enum:
            - hosted
            - non_hosted
          description: >
            Whether the session should be hosted by Checkout.com.
          maxLength: 10
          example: non_hosted
      example:
        type: non_hosted
        callback_url: https://merchant.com/callback
    CreateSessionAcceptedResponse:
      required:
        - session_secret
        - id
        - transaction_id
        - scheme
        - amount
        - currency
        - authentication_type
        - authentication_category
        - status
        - protocol_version
        - _links
        - challenge_indicator
        - authentication_date
        - next_actions
      properties:
        session_secret:
          $ref: '#/components/schemas/SessionSecret'
        id:
          $ref: '#/components/schemas/SessionId'
        transaction_id:
          description: The transaction identifier that needs to be provided when communicating directly with the Access Control Server (ACS)
          type: string
          minLength: 36
          maxLength: 36
          example: 9aea641d-0549-4222-9ca9-d90b43a4f38c
        scheme:
          type: string
          description: Indicates the scheme this authentication is carried out against
          enum:
            - visa
            - mastercard
            - jcb
            - amex
            - diners
            - cartes_bancaires
            - discover
            - upi
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        completed:
          type: boolean
          description: Specifies if the session was completed.
          example: false
        authentication_type:
          $ref: '#/components/schemas/AuthenticationType'
        authentication_category:
          $ref: '#/components/schemas/Category'
        status:
          type: string
          description: The status of the session.
          enum:
            - pending
            - processing
            - challenged
            - challenge_abandoned
            - expired
            - approved
            - attempted
            - unavailable
            - declined
            - rejected
        next_actions:
          type: array
          description: |
            Specifies which action to take in order to complete the session. 
            
            The `redirect_cardholder` action is only applicable for <a href="https://www.checkout.com/docs/payments/authenticate-payments/3d-secure/standalone-sessions/hosted-sessions">hosted sessions</a>.
          items:
            type: string
            enum:
              - collect_channel_data
              - redirect_cardholder
              - issuer_fingerprint
              - challenge_cardholder
              - complete
        protocol_version:
          $ref: '#/components/schemas/ProtocolVersion'
        account_info:
          $ref: '#/components/schemas/CardholderAccountInfo'
        merchant_risk_info:
          $ref: '#/components/schemas/MerchantRiskInfo'
        reference:
          $ref: '#/components/schemas/Reference'
        transaction_type:
          $ref: '#/components/schemas/TransactionType'
        card:
          $ref: '#/components/schemas/CardInfo'
        recurring:
          $ref: '#/components/schemas/Recurring'
        installment:
          $ref: '#/components/schemas/Installment'
        initial_transaction:
          $ref: '#/components/schemas/InitialTransaction'
        _links:
          $ref: '#/components/schemas/CreateSessionLinks'
        authentication_date:
          type: string
          format: date-time
          description: Authentication date and time
        challenge_indicator:
          type: string
          default: no_preference
          description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge
          enum:
            - no_preference
            - no_challenge_requested
            - challenge_requested
            - challenge_requested_mandate
        optimization:
          type: object
          description: >
            The information about the optimization options selected
          properties:
            optimized:
              type: boolean
              description: >
                Indicates if any optimization has been applied
              example: true
            framework:
              type: string
              description: > 
                The optimization framework applied
              enum:
                - acceptance_rates
            optimized_properties:
              type: array
              title: OptimizedProperty
              description: The collection of optimized fields
              items:
                $ref: '#/components/schemas/OptimizedProperty'
        preferred_experiences:
          $ref: '#/components/schemas/PreferredExperiences'
        experience:
          $ref: '#/components/schemas/Experience'
        google_spa:
          $ref: '#/components/schemas/GoogleSpaInfo'
        ds:
          $ref: '#/components/schemas/Ds'
        certificates:
          $ref: '#/components/schemas/DsPublicKeys'
    CreateSessionLinks:
      allOf:
        - $ref: '#/components/schemas/GetSessionLinks'
      properties:
        redirect_url:
          type: object
          description: >
            The link to which the cardholder should be redirected. </br>
            Only available when the `hosted` value is `true`.
          properties:
            href:
              type: string
              maxLength: 100
              example: http://3ds2.checkout.com/interceptor/sid_y3oqhf46pyzuxjbcn2giaqnb44
          required:
            - href
    CreateSessionOkResponse:
      allOf:
        - $ref: '#/components/schemas/GetSessionResponse'
      required:
        - session_secret
    Cryptogram:
      description: >
        Payment system-specific value provided as part of the ACS registration for each supported DS.
        Please be advised that this field will only be included in responses when authenticating with a valid OAuth token and not when authenticating 
          with `session_secret`. Cryptogram can only be retrieved for up to 24 hours after the session is created.
      type: string
      minLength: 28
      maxLength: 28
      example: 'MTIzNDU2Nzg5MDA5ODc2NTQzMjE='
    Currency:
      type: string
      description: The three-letter ISO currency code
      example: USD
    DeviceInformation:
      type: object
      description: Details of the device from which the authentication originated.
      properties:
        device_id:
          type: string
          description: The unique identifier for the device.
        device_session_id:
          type: string
          description: Device session ID collected from our standalone Risk.js package.
          example: "dsid_ipsmclhxwq72phhr32iwfvrflm"
          pattern: "^(dsid)_(\\w{26})$"
          
    Ds:
      type: object
      description: 'The directory server (DS) information. Can be empty if the session is pending or communication with the DS failed'
      properties:
        ds_id:
          description: Required if the session is deemed app-based. Registered application provider identifier (RID) that is unique to the payment system. RIDs are defined by the ISO 7816-5 standard. Used as part of the device data encryption process.
          type: string
          maxLength: 32
          example: A000000003
        reference_number:
          description: EMVCo-assigned unique identifier to track approved DS
          type: string
          maxLength: 32
          example: VISA.V 17 0003
        transaction_id:
          description: Universally unique transaction identifier assigned by the DS
          type: string
          minLength: 36
          maxLength: 36
          example: 9aea641d-0549-4222-9ca9-d90b43a4f38c
    DsPublicKeys:
      type: object
      description: Public certificates specific to a Directory Server (DS) for encrypting device data and verifying ACS signed content. Required when channel is `app`.
      required:
        - ds_public
      properties:
        ds_public:
          type: string
          maxLength: 1024
          description: A public certificate provided by the DS for encryption of device data. It is a base64 URL encoded <a href="https://tools.ietf.org/html/rfc7517" target="_blank">JSON web key</a>.
          example: eyJrdHkiOiJFQyIsImNydiI6IlAtMjU2IiwieCI6Ik1LQkNUTkljS1VTRGlpMTF5U3MzNTI2aURaOEFpVG83VHU2S1BBcXY3RDQiLCJ5IjoiNEV0bDZTUlcyWWlMVXJONXZmdlZIdWhwN3g4UHhsdG1XV2xiYk00SUZ5TSIsInVzZSI6ImVuYyIsImtpZCI6IjEifQ
        ca_public:
          type: string
          maxLength: 1024
          description: Certificate authority (CA) public certificate (root) of the DS-CA. This certificate is used to validate the ACS signed content JSON web signature (JWS) object. It is a base64 URL encoded DER encoded X.509.
          example: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxWEvDZRhKEefZ5sQS7RJZXWbSOPxus-ZyLQjtmrrAQawnKI-AG8BKpVdZVGlpcdxCnGbCIy8CKk2Oi7Mgdqfv5R_4_jI7yl4j7Svmh1Sw934eeF9RyB59Ihl36Y0pNfVW9hBqJuq2o8ulrA1TOtpTpje23CY8sjFE5QnJm1evZRB_ZZQ1txl4nrAiHkno4cVJPouBesryVGVQ0zi1bM0P-05Ydgksvph-1nyjnDldD68mejVF69Tijxa22b6BUCXEuPfbXZcW2NpM_W3msnvKiTWFaMlnIzGYIoFnAnCIVU7Min6CPn565tv0iyIt8BrcezsGzefUw17NEq0J4tCvWwIDAQAB
        ca_public_all:
          type: array
          description: |
            An array of available certificate authority (CA) public certificates (root) of the DS-CA. 
            
            The certificates are used to validate the JSON web signature (JWS) object signed by the access control server (ACS). Each array element is a Base64 URL-encoded DER-encoded X.509 certificate.
          items:
            type: string
            maxLength: 1024
          example:
            - "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxWEvDZRhKEefZ5sQS7RJZXWbSOPxus-ZyLQjtmrrAQawnKI-AG8BKpVdZVGlpcdxCnGbCIy8CKk2Oi7Mgdqfv5R_4_jI7yl4j7Svmh1Sw934eeF9RyB59Ihl36Y0pNfVW9hBqJuq2o8ulrA1TOtpTpje23CY8sjFE5QnJm1evZRB_ZZQ1txl4nrAiHkno4cVJPouBesryVGVQ0zi1bM0P-05Ydgksvph-1nyjnDldD68mejVF69Tijxa22b6BUCXEuPfbXZcW2NpM_W3msnvKiTWFaMlnIzGYIoFnAnCIVU7Min6CPn565tv0iyIt8BrcezsGzefUw17NEq0J4tCvWwIDAQAB"
    Eci:
      description: >
        Electronic Commerce Indicator. 
        Please be advised that this field will only be included in responses when authenticating with a valid OAuth token and not when authenticating
        with `session_secret`.
      type: string
      minLength: 2
      maxLength: 2
      example: '05'
    ErrorDetails:
      type: object
      description: Provides additional information about the error returned.
      properties:
        error_code:
          description: An error code identifying the type of issue.
          type: string
          example: "101"
        error_component:
          description: A code that specifies which 3D Secure component identified the error.
          type: string
          example: "D"
        error_detail:
          description: Provides additional details about the issue.
          type: string
          maxLength: 2048
          example: "acctNumber"
        error_description:
          description: A description of the issue identified.
          type: string
          maxLength: 2048
          example: "Cardholder Account Number is not in a range belonging to Issuer." 
    ErrorResponse:
      type: object
      required:
        - request_id
        - error_type
        - error_codes
      properties:
        request_id:
          type: string
          example: 5342217f-7fa2-4626-a6c9-c979a04671a6
        error_type:
          type: string
          description: >
            The type of error. <br/>
            • operation_not_allowed = Usually with an http status code 403. The request is not allowed by business rules. <br/>
            • not_implemented = Usually with an http status code 501. This particular feature is not implemented yet. <br/>
            • not_found = Usually with an http status code 404. The resource requested was not found. <br/>
            • forbidden = Usually with an http status code 401. You do not have permissions for the requested operation. <br/>
            • callback_failed = (Non Hosted Only) Only during the complete request. The callback_url responded with a non-success status code. <br/>
            • internal_server_error = Usually with an http status code 500. Unexpected error during the request or an upstream service failure. <br/>
            • unprocessable_entity = Usually with an http status code 422. The request payload failed validation. <br/>
            • conflict = Usually with an http status code 409 during the creation of a resource. The resource already exists. <br/>
            • duplicate_requests_detected = Usually with an http status code 409. This is returned when a Session is currently being processed. <br />
            • service_not_available = Usually with an http status code 503. Triggered given an upstream service failure.<br />
          enum:
            - operation_not_allowed
            - not_implemented
            - not_found
            - forbidden
            - callback_failed
            - internal_server_error
            - unprocessable_entity
            - conflict
            - duplicate_requests_detected
            - service_not_available
        error_codes:
          description: >
            Error response code. Full list of error codes below: <br/>
            • unknown_error = Usually with an error type `internal_server_error`. An unexpected/unhandled error occurred. <br/>
            • operation_not_allowed = Usually with an error type `operation_not_allowed`. The request is not allowed by business rules. <br/>
            • scheme_not_supported = The processor was setup with a scheme not supported by the server. <br/>
            • card_not_enrolled = The card number was not enrolled for 3DS2 and 3DS1 was either not enabled or not supported for Session (eg amount is 0). <br/>
            • card_not_eligible = The card number was not eligible for 3DS1. <br/>
            • card_eligibility_unavailable = A technical issue prevented the 3DS1 transaction from completing. <br />
            • card_protocol_version_not_supported = The protocol version provided is not enabled for the processor being used. <br/>
            • update_not_allowed_due_to_state = The Session was in a state that did not allow for the operation attempted. <br/>
            • source_not_supported = Support for the Session Source used is not implemented yet. <br/>
            • session_callback_failed = (Non Hosted Only) Only during the complete request. The callback_url responded with a non-success status code. <br/>
            • session_persistence_failed = Usually with an error type `internal_server_error`. The API failed to persist the Session. Can be retried. <br/>
            • hosted_not_supported_for_app = You tried to create a Hosted Session with app channel data which is not allowed. <br/>
            • three_ds_method_not_supported_for_app = You tried to perform issuer fingerprint on a Session with app channel data which is not allowed. <br/>
            • three_ds_method_not_supported_without_url = You tried to perform issuer fingerprint on a Session without a 3DS method URL which is not allowed. <br/>
            • operation_not_allowed_for_scope = You are using an OAuth2.0 token that does not contain the right scope. <br/>
            • protocol_version_not_supported_by_sdk = You created an App channel Session with a protocol version not supported by the relevant mobile SDK. <br/>
            • ds_error = The Directory Server (schemes) responded with an unexpected error or timed out. <br/>
            • processing_channel_disabled = The Processing Channel or processor used for this Session is not active. <br/>
            • vault_not_configured_for_processing_channel = Using a Processing Channel not configured for use with Checkout.com Vault offering but trying to use a relevant source (`id` or `token`). <br/>
            • error_getting_instrument = Getting an instrument responded with an unexpected error or timed out. Only relevant for sources `id` or `token`. <br/>
            • invalid_token = The token used in the source object was invalid. <br/>
            • instrument_used_is_not_card = Using an `id` type source that is not a card (only card type instruments are supported in 3DS) . <br/>
            • no_processor_configured_for_card_scheme = Using a card that belongs to a scheme that is not configured in the Processing Channel being used. <br/>
            • currency_not_supported = An American Express SE number is not associated with the currency in the request. <br/>
            • scheme_outage = With error type `operation_not_allowed`. This is returned when there is a technical issue on the scheme's platform. <br/>
            • session_already_in_use = With error type `duplicate_requests_detected`. More than one action requests have been sent in parallel for the same session. <br/><br/>
            • merchant_initiated_request_not_supported_by_3ds_protocol = With error type `unprocessable_entity`. The merchant-initiated request is not supported by the selected 3DS protocol version. <br/>
            • initial_session_not_found = With error type `unprocessable_entity`. A previous session could not be found with the provided initial session ID. <br/>
            • initial_session_invalid = With error type `unprocessable_entity`. The previous session was not valid to be used as an initial transaction. <br/>
            • invalid_target_scheme = With error type `unprocessable_entity`. The card number cannot be processed with the specified scheme. <br/>
            • unrecognized_scheme = With error type `unprocessable_entity`. The card number is associated with a scheme that is not supported. <br/>
      
            Also, there is a number of generic error codes as described below: <br/>
            • some_field_required = Usually with an error type `unprocessable_entity`. The field `some_field` is required but not provided in the payload. <br/>
            • some_field_invalid = Usually with an error type `unprocessable_entity`. The field `some_field` failed validation. Please consult the API spec. <br/>
            • unable_to_verify_some_field = Usually with an error type `service_not_available`. The field `some_field` could not be validated due to an upstream service failure. <br/>
            • some_resource_already_exists = Usually with an error type `conflict`. The resource you are trying to create already exists (not relevant for Sessions with an auto-generated id). <br/>
            • some_resource_not_found = Usually with an error type `not_found`. The resource you are trying to get does not exist. <br/>
      
          type: array
          items:
            type: string
    Experience:
      type: string
      enum:
        - 3ds
        - google_spa
      description: The authentication experience that was used for processing
      example: 3ds
    GetBaseSessionLinks:
      type: object
      description: The links related to the session
      required:
        - self
      properties:
        self:
          type: object
          description: The URI of the session
          required:
            - href
          properties:
            href:
              type: string
              maxLength: 100
              example: https://{prefix}.api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441
    GetFingerprintSessionLinks:
      type: object
      description: The links related to the session
      allOf:
        - $ref: '#/components/schemas/GetBaseSessionLinks'
      properties:
        complete:
          type: object
          description: The URI to signal the session as complete. Only available if `next_actions` contains `complete`
          properties:
            href:
              type: string
              maxLength: 100
              example: https://{prefix}.api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2gia/complete
          required:
            - href
        issuer_fingerprint:
          type: object
          description: >
            The URI to send the 3ds method completion indicator to. Use this if device information was sent when requesting a session. 
            Only available if `next_actions` contains `issuer_fingerprint`
          properties:
            href:
              type: string
              maxLength: 100
              example: https://{prefix}.api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2gia/issuer-fingerprint
          required:
            - href
        collect_channel_data:
          type: object
          description: The URI to send device information to. Only available if `next_actions` contains `collect_data`
          properties:
            href:
              type: string
              maxLength: 100
              example: https://{prefix}.api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2gia/collect-data
          required:
            - href
        three_ds_method_url:
          type: object
          description: The URI of the issuer fingerprint (3DS method). Only available if `next_actions` contains `issuer_fingerprint`
          properties:
            href:
              type: string
              maxLength: 100
              example: https://api.hsbc.com/3dsmethod?tx=123456
          required:
            - href
    GetSessionLinks:
      type: object
      description: The links related to the session
      allOf:
        - $ref: '#/components/schemas/GetBaseSessionLinks'
      properties:
        issuer_fingerprint:
          type: object
          description: >
            The URI to send the 3ds method completion indicator to. Use this if device information was sent when requesting a session. 
            Only available if `next_actions` contains `issuer_fingerprint`
          properties:
            href:
              type: string
              maxLength: 100
              example: https://{prefix}.api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2gia/issuer-fingerprint
          required:
            - href
        collect_channel_data:
          type: object
          description: The URI to send device information to. Only available if `next_actions` contains `collect_data`
          properties:
            href:
              type: string
              maxLength: 100
              example: https://{prefix}.api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2gia/collect-data
          required:
            - href
        three_ds_method_url:
          type: object
          description: The URI of the issuer fingerprint (3DS method). Only available if `next_actions` contains `issuer_fingerprint`
          properties:
            href:
              type: string
              maxLength: 100
              example: https://api.hsbc.com/3dsmethod?tx=123456
          required:
            - href
        acs_url:
          type: object
          description: Fully qualified URL of the ACS to be used for the challenge. Only available if `next_actions` contains `authenticate`
          properties:
            href:
              type: string
              maxLength: 100
              example: https://api.hsbc.com/challenge
          required:
            - href
        complete:
          type: object
          description: The URI to signal the session as complete. Only available if `next_actions` contains `complete`
          properties:
            href:
              type: string
              maxLength: 100
              example: https://{prefix}.api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2gia/complete
          required:
            - href
        success_url:
          type: object
          description: The cardholder will be redirected to this URI given an authentication was approved or attempted. Only available if the completion type is `hosted`.
          properties:
            href:
              type: string
              maxLength: 300
          required:
            - href
        failure_url:
          type: object
          description: The cardholder will be redirected to this URI given an authentication was not approved or attempted. Only available if the completion type is `hosted`.
          properties:
            href:
              type: string
              maxLength: 300
          required:
            - href
        callback_url:
          type: object
          description: An endpoint which will receive a POST request highlighting the result of an authentication. See the "Complete a Session" request for more details. Only available if the completion type is `non_hosted`.
          properties:
            href:
              type: string
              maxLength: 300
          required:
            - href
    GetSessionResponse:
      required:
        - id
        - transaction_id
        - scheme
        - amount
        - currency
        - authentication_type
        - authentication_category
        - status
        - protocol_version
        - _links
        - challenge_indicator
      properties:
        id:
          $ref: '#/components/schemas/SessionId'
        session_secret:
          $ref: '#/components/schemas/SessionSecret'
        transaction_id:
          description: The transaction identifier that needs to be provided when communicating directly with the Access Control Server (ACS)
          type: string
          minLength: 36
          maxLength: 36
          example: 9aea641d-0549-4222-9ca9-d90b43a4f38c
        scheme:
          type: string
          description: Indicates the scheme this authentication is carried out against
          enum:
            - visa
            - mastercard
            - jcb
            - amex
            - diners
            - cartes_bancaires
            - discover
            - upi
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        completed:
          type: boolean
          description: Indicates whether this session has been completed
          example: false
        challenged:
          type: boolean
          description: Indicates whether this session involved a challenge. This will only be set after communication with the scheme is finished.
          example: true
        authentication_type:
          $ref: '#/components/schemas/AuthenticationType'
        authentication_category:
          $ref: '#/components/schemas/Category'
        certificates:
          $ref: '#/components/schemas/DsPublicKeys'
        status:
          $ref: '#/components/schemas/Status' 
        status_reason:
          $ref: '#/components/schemas/StatusReason'
        approved:
          $ref: '#/components/schemas/Approved'
        protocol_version:
          $ref: '#/components/schemas/ProtocolVersion'
        account_info:
          $ref: '#/components/schemas/CardholderAccountInfo'
        merchant_risk_info:
          $ref: '#/components/schemas/MerchantRiskInfo'
        reference:
          $ref: '#/components/schemas/Reference'
        transaction_type:
          $ref: '#/components/schemas/TransactionType'
        next_actions:
          $ref: '#/components/schemas/NextActions'
        ds:
          $ref: '#/components/schemas/Ds'
        acs:
          $ref: '#/components/schemas/Acs'
        response_code:
          $ref: '#/components/schemas/ResponseCode'
        response_status_reason:
          $ref: '#/components/schemas/ResponseStatusReason'
        cryptogram:
          $ref: '#/components/schemas/Cryptogram'
        eci:
          $ref: '#/components/schemas/Eci'
        xid:
          type: string
          description: The xid value to use for authorization
          example: XSUErNftqkiTdlkpSk8p32GWOFA
        cardholder_info:
          type: string
          description: May provide cardholder information from the DS to be presented to the cardholder
          example: Card declined. Please contact your issuing bank.
        card:
          $ref: '#/components/schemas/CardInfo'
        recurring:
          $ref: '#/components/schemas/Recurring'
        installment:
          $ref: '#/components/schemas/Installment'
        initial_transaction:
          $ref: '#/components/schemas/InitialTransaction'
        customer_ip:
          type: string
          description: >
            Indicates the card holder's IP address.      
            Only available when the scheme selected is Cartes Bancaires.
          example: 192.168.1.1
        _links:
          $ref: '#/components/schemas/GetSessionLinks'
        authentication_date:
          type: string
          format: date-time
          description: Authentication date and time
        exemption:
          type: object
          description: Details related to exemption present in 3DS flow
          properties:
            requested:
              type: string
              description: Indicates merchant requested exemption
              enum:
                - none
            applied:
              type: string
              description: Indicates Issuer accepted or applied exemption
              enum:
                - none
                - low_value
                - transaction_risk_assessment
                - secure_corporate_payment
                - trusted_listing
                - 3ds_outage
                - sca_delegation
                - out_of_sca_scope
                - other
                - low_risk_program
            code:
              type: string
              description: Indicates Cartes Bancaire specific exemption value
            trusted_beneficiary:
              $ref: '#/components/schemas/TrustedBeneficiary'
        flow_type:
          type: string
          description: Indicates whether the 3D Secure 2 authentication was challenged or frictionless
          enum:
            - challenged
            - frictionless
            - frictionless_delegated
        challenge_indicator:
          type: string
          default: no_preference
          description: Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge
          enum:
            - no_preference
            - no_challenge_requested
            - challenge_requested
            - challenge_requested_mandate
        optimization:
          type: object
          description: >
            The information about the optimization options selected
          properties:
            optimized:
              type: boolean
              description: >
                Indicates if any optimization has been applied
              example: true
            framework:
              type: string
              description: > 
                The optimization framework applied
              enum:
                - acceptance_rates
            optimized_properties:
              type: array
              title: OptimizedProperty
              description: The collection of fields optimized
              items:
                $ref: '#/components/schemas/OptimizedProperty'
        scheme_info:
          type: object
          description: Indicates scheme-specific information
          properties:
            name:
              type: string
              description: Indicates which scheme was used to perform authentication
              enum:
                - cartes_bancaires
                - visa
                - mastercard
            score:
              type: string
              description: Risk score calculated by Directory Server (DS). Cartes Bancaires 3D Secure 2 only
            avalgo:
              type: string
              description: Identification of the algorithm used by the ACS to calculate the Authentication Value indicated
        3ds:
          type: object
          description: This object provides more information about the 3DS experience
          properties:
            challenge_request:
              description: The CReq message, encoded in Base 64.
              type: string
              example: "eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjYwYTY2ZDRjLTdjY2EtNDc1Zi04YzMxLWFiMjkwNTI1M2M4NiIsImFjc1RyYW5zSUQiOiI1ODVhM2NlZi04OWQ4LTQ3ZDMtYjk4Yi0xMDhiMGRjYjEyYzEiLCJtZXNzYWdlVHlwZSI6IkNSZXEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMi4wIiwiY2hhbGxlbmdlV2luZG93U2l6ZSI6IjA1In0"
            interaction_counter:
              description: The number of authentication attempts performed by the cardholder.
              type: string
              maxLength: 2
              example: "03"
            error_details:
              $ref: '#/components/schemas/ErrorDetails'
        preferred_experiences:
          $ref: '#/components/schemas/PreferredExperiences'
        experience:
          $ref: '#/components/schemas/Experience'
        google_spa:
          $ref: '#/components/schemas/GoogleSpaInfo'
    GetSessionResponseAfterChannelDataSupplied:
      required:
        - id
        - transaction_id
        - scheme
        - amount
        - currency
        - authentication_type
        - authentication_category
        - status
        - protocol_version
        - _links
      properties:
        id:
          $ref: '#/components/schemas/SessionId'
        session_secret:
          $ref: '#/components/schemas/SessionSecret'
        transaction_id:
          description: The transaction identifier that needs to be provided when communicating directly with the Access Control Server (ACS)
          type: string
          minLength: 36
          maxLength: 36
          example: 9aea641d-0549-4222-9ca9-d90b43a4f38c
        scheme:
          type: string
          description: Indicates the scheme this authentication is carried out against
          enum:
            - visa
            - mastercard
            - jcb
            - amex
            - diners
            - cartes_bancaires
            - discover
            - upi
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        completed:
          type: boolean
          description: Indicates whether this session has been completed
          example: false
        challenged:
          type: boolean
          description: Indicates whether this session involved a challenge. This will only be set after communication with the scheme is finished.
          example: true
        authentication_type:
          $ref: '#/components/schemas/AuthenticationType'
        authentication_category:
          $ref: '#/components/schemas/Category'
        status:
          $ref: '#/components/schemas/Status'
        status_reason:
          $ref: '#/components/schemas/StatusReason'
        approved:
          $ref: '#/components/schemas/Approved'
        protocol_version:
          $ref: '#/components/schemas/ProtocolVersion'
        account_info:
          $ref: '#/components/schemas/CardholderAccountInfo'
        merchant_risk_info:
          $ref: '#/components/schemas/MerchantRiskInfo'
        reference:
          $ref: '#/components/schemas/Reference'
        transaction_type:
          $ref: '#/components/schemas/TransactionType'
        initial_transaction:
          $ref: '#/components/schemas/InitialTransaction'
        next_actions:
          $ref: '#/components/schemas/NextActions'
        ds:
          $ref: '#/components/schemas/Ds'
        acs:
          $ref: '#/components/schemas/Acs'
        response_code:
          $ref: '#/components/schemas/ResponseCode'
        response_status_reason:
          $ref: '#/components/schemas/ResponseStatusReason'
        cryptogram:
          $ref: '#/components/schemas/Cryptogram'
        eci:
          $ref: '#/components/schemas/Eci'
        xid:
          type: string
          description: The xid value to use for authorization
          example: XSUErNftqkiTdlkpSk8p32GWOFA
        preferred_experiences:
          $ref: '#/components/schemas/PreferredExperiences'
        experience:
          $ref: '#/components/schemas/Experience'
        google_spa:
          $ref: '#/components/schemas/GoogleSpaInfo'
        card:
          $ref: '#/components/schemas/CardInfo'
        _links:
          $ref: '#/components/schemas/GetFingerprintSessionLinks'
        3ds:
          type: object
          description: Provides additional information about the 3DS authentication experience.
          properties:
            challenge_request:
              description: The CReq message, encoded in Base 64.
              type: string
              example: "eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjYwYTY2ZDRjLTdjY2EtNDc1Zi04YzMxLWFiMjkwNTI1M2M4NiIsImFjc1RyYW5zSUQiOiI1ODVhM2NlZi04OWQ4LTQ3ZDMtYjk4Yi0xMDhiMGRjYjEyYzEiLCJtZXNzYWdlVHlwZSI6IkNSZXEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMi4wIiwiY2hhbGxlbmdlV2luZG93U2l6ZSI6IjA1In0"
            interaction_counter:
              description: The number of authentication attempts performed by the cardholder.
              type: string
              maxLength: 2
              example: "03"
            error_details:
              $ref: '#/components/schemas/ErrorDetails'   
    GoogleSpaInfo:
      oneOf:
        - $ref: '#/components/schemas/HostedGoogleSpaInfo'
        - $ref: '#/components/schemas/NonHostedGoogleSpaInfo'
      description: >
        Details of Google SPA (Secure Payment Authentication)
         
    GoogleSpaToken:
      type: object
      description: >
        Token for the given PAN provisioned and authenticated
      properties:
        number:
          type: string
          description: >
            Value of token. Represented as a numerical string
        expiry_month:
          type: number
          description: >
            Expiry month of the token
        expiry_year:
          type: number
          description: >
            Expiry year of the token
    HostedCompletionInfo:
      allOf:
        - $ref: '#/components/schemas/CompletionInfo'
        - type: object
          required:
            - success_url
            - failure_url
          properties:
            success_url:
              type: string
              format: uri
              description: For `hosted` sessions, this overrides the default success redirect URL configured on your account
              maxLength: 256
              example: 'http://example.com/payments/success'
            failure_url:
              type: string
              format: uri
              description: For `hosted` sessions, this overrides the default failure redirect URL configured on your account
              maxLength: 256
              example: 'http://example.com/payments/fail'
    HostedGoogleSpaInfo:
      type: object
      title: Hosted
      description: >
        Details of Google SPA (Secure Payment Authentication) for a hosted authentication
      properties:
        token:
          $ref: '#/components/schemas/GoogleSpaToken'
    IdSource:
      type: object
      allOf:
        - $ref: '#/components/schemas/SessionSource'
        - type: object
          required:
            - id
          properties:
            id:
              type: string
              description: The card instrument id
              example: 'src_4gzeau5o2uqubbk6fufs3m7p54'
              maxLength: 100
    InitialTransaction:
      type: object
      description: Details of a previous transaction
      properties:
        acs_transaction_id:
          type: string
          minLength: 36
          description:  The Access Control Server (ACS) transaction ID for a previously authenticated transaction
        authentication_method:
          type: string
          enum:
            - frictionless_authentication
            - challenge_occurred
            - avs_verified
            - other_issuer_methods
        authentication_timestamp:
          type: string
          description:  The timestamp of the previous authentication, in ISO 8601 format.
          example: "2023-02-06T15:00:00.000Z"
        authentication_data:
          type: string
          maxLength: 2048
          description:  Data that documents and supports a specific authentication process
        initial_session_id:
          type: string
          description: The ID for a previous session, which is used for retrieve the initial transaction's properties
          example: sid_p6prbhogijnuxgv4grm3ber55u
          minLength: 30
          maxLength: 30
    Installment:
      type: object
      description: Details of an installment authentication. This property is needed only for an installment authentication type. Value will be ignored in any other cases.
      required: 
        - number_of_payments
      properties:
        number_of_payments:
          type: integer
          minimum: 2
          maxLength: 3
          description: Indicates the agreed total number of payment installments to be made in the duration of the installment agreement. Required when the authentication type is `instalment`.
          example: 2
        days_between_payments:
          type: integer
          description: Indicates the minimum number of days between authorisations. If no value is specified for an installment authentication type the default value will be used.
          example: 28
          default: 1
        expiry:
          type: string
          description: Date after which no further authorisations are performed in the format yyyyMMdd. If no value is specified for an installment authentication type the default value will be used.
          example: '20220901'
          default: '99991231'
    MerchantInitiated:
      allOf:
        - $ref: '#/components/schemas/ChannelData'
        - type: object
          required:
            - request_type
          properties:
            channel:
              type: string
              enum:
                - merchant_initiated
            request_type:
              type: string
              enum:
                - recurring_transaction
                - installment_transaction
                - add_card
                - maintain_card_information
                - account_verification
                - split_or_delayed_shipment
                - top_up
                - mail_order
                - telephone_order
                - whitelist_status_check
                - other_payment
    MerchantRiskInfo:
      type: object
      description: >
        Additional information about the cardholder's purchase.
      properties:
        delivery_email:
          type: string
          description: >
            For Electronic delivery, the email address to which the merchandise was delivered.
          maxLength: 254
          example: brucewayne@email.com
        delivery_timeframe:
          type: string
          description: >
            Indicates the merchandise delivery timeframe.
          enum:
            - electronic_delivery
            - same_day
            - overnight
            - two_day_or_more
        is_preorder:
          type: boolean
          description: >
            Indicates whether the cardholder is placing an order for merchandise with a future availability or release date.
          example: true
        is_reorder:
          type: boolean
          description: >
            Indicates whether the cardholder is reordering previously purchased merchandise.
          example: false
        shipping_indicator:
          type: string
          description: >
            Indicates the shipping method chosen for the transaction. Please choose an option that accurately describes the cardholder's specific transaction.
          enum:
            - billing_address
            - another_address_on_file
            - not_on_file
            - store_pick_up
            - digital_goods
            - travel_and_event_no_shipping
            - other
        reorder_items_indicator:
          type: string
          description: Specifies whether the cardholder is reordering merchandise they've previously purchased.
          enum:
            - first_time_ordered
            - reordered
        pre_order_purchase_indicator:
          type: string
          description: Specifies whether the cardholder is placing an order for merchandise with an availability date or release date in the future.
          enum:
            - merchandise_available
            - future_availability
        pre_order_date:
          type: string
          format: date-time
          description: The UTC date the pre-ordered merchandise is expected to be available, in ISO 8601 format.
        gift_card_amount:
          type: string
          description: The total purchase amount, in major units. For example, the major unit amount for a gift card purchase of 135.20 USD is `135`. Only applicable for prepaid or gift card purchases.
          maxLength: 15
          example: '123'
        gift_card_currency:
          type: string
          maxLength: 3
          minLength: 3
          description: The currency code of the gift card,  as a three-digit ISO 4217 code. Only applicable for prepaid or gift card purchases.
          example: USD
        gift_card_count:
          type: string
          maxLength: 2
          minLength: 2
          description: The total number of individual prepaid cards, gift cards, or gift codes purchased. Only applicable for prepaid or gift card purchases.
          example: '02'
    NetworkTokenSource:
      type: object
      allOf:
        - $ref: '#/components/schemas/SessionSource'
        - type: object
          required:
            - type
            - token
            - expiry_month
            - expiry_year
          properties:
            token:
              type: string
              description: The network token PAN
              example: '4543474002249996'
              minLength: 9
              maxLength: 19
            name:
              type: string
              description: The customer's name. Any special characters will be replaced.
              minLength: 2
              maxLength: 45
              example: 'Bruce Wayne'
            stored:
              type: boolean
              description: >-
                Indicates whether this card is being submitted from your own stored card-on-file system, rather than being entered by the customer at the time of payment. Set to `true` when you provide card details that you already have on file for the customer.
              default: false
              example: true
    NextActions:
      type: array
      description: |
            Specifies which action to take in order to complete the session. 
            
            The `redirect_cardholder` action is only applicable for <a href="https://www.checkout.com/docs/payments/authenticate-payments/3d-secure/standalone-sessions/hosted-sessions">hosted sessions</a>.
      items:
        type: string
        enum:
          - redirect_cardholder
          - collect_channel_data
          - issuer_fingerprint
          - challenge_cardholder
          - complete
    NonHostedCompletionInfo:
      allOf:
        - $ref: '#/components/schemas/CompletionInfo'
        - type: object
          properties:
            callback_url:
              type: string
              format: uri
              description: For `non-hosted` sessions, you can define a URL to be called once the session is complete
              maxLength: 256
              example: 'http://example.com/payments/callback/pay_mbabizu24mvu3mela5njyhpit4'
            challenge_notification_url:
              type: string
              format: uri
              description: For `non-hosted` sessions, you can define a URL to be your own challenge notification endpoint. When not provided, a Checkout.com endpoint will be used.
              maxLength: 256
              example: 'http://example.com/payments/challenge/sid_mbabizu24mvu3mela5njyhpit4'
    NonHostedGoogleSpaInfo:
      type: object
      title: Non Hosted
      description: >
        Details of Google SPA (Secure Payment Authentication) for a non-hosted authentication
      properties:
        challenge_url:
          type: string
          description: >
            Fully qualified URL of the Google SPA (Secure Payment Authentication) frontend for user challenge/unlock
        initial_timeout:
          type: string
          description: >
            Indicates the amount of time (in minutes) allowed for establishing the initial connection to the user's specific authentication session, as determined by the challenge_url)
        max_timeout:
          type: string
          description: >
            Indicates maximum amount of time (in minutes) allowed for completing all PSP-Google message exchanges for current authentication session
        iframe:
          type: object
          description: >
            Details of the challenge iframe displayed in the Cardholder browser window
          properties:
            height:
              type: string
              description: >
                Height of the challenge iframe displayed in the Cardholder browser window.
            width:
              type: string
              description: |
                Width of the challenge iframe displayed in the Cardholder browser window.
        token:
          $ref: '#/components/schemas/GoogleSpaToken' 
    Optimization:
      type: object
      description: >
        Optionally opt into request optimization
      properties:
        framework:
          type: string
          description: >
            The theme-based option for optimization
          enum:
            - acceptance_rates
    OptimizedProperty:
      type: object
      description: >
        Optionally opt into request optimization
      properties:
        field:
          type: string
          description: >
            Name of the field which has been optimized.
          example: challenge_indicator
        original_value:
          type: string
          description: >
            Value prior to optimization.
          example: trusted_listing
        optimized_value:
          type: string
          description: >
            Value prior to optimization.
          example: transaction_risk_assessment
    PreferredExperiences:
      type: object
      description: >
        Preferred Experiences
      properties:
        google_spa:
          type: object
          description: >
            Google SPA experience.
          properties:
            status:
              type: string
              enum:
                - available
                - unprocessed
                - processed
                - unavailable
            reason:
              type: array
              description: |
                Reason(s) why processing the experience was unsuccessful.
              items:
                type: string
              example:
                - "Invalid response"
        3ds:
          type: object
          description: >
            3DS experience.
          properties:
            status:
              type: string
              enum:
                - available
                - unprocessed
                - processed
                - unavailable
            reason:
              type: array
              description: |
               Reason(s) why processing the experience was unsuccessful.
              items:
                type: string
              example:
                - "Invalid response"
    ProtocolVersion:
      type: string
      description: The protocol version number of the specification used by the API for authentication
      maxLength: 50
      example: '2.2.0'
    Recurring:
      type: object
      description: Details of a recurring authentication. This property is needed only for a recurring authentication type. Value will be ignored in any other cases.
      properties:
        days_between_payments:
          type: integer
          description: Indicates the minimum number of days between authorisations. If no value is specified for a recurring authentication type the default value will be used.
          example: 28
          default: 1
        expiry:
          type: string
          description: Date after which no further authorisations are performed in the format yyyyMMdd. If no value is specified for a recurring authentication type the default value will be used.
          example: '20220901'
          default: '99991231'
    Reference:
      type: string
      description: A reference you can later use to identify this payment, such as an order number. **Do not pass sensitive information in this field e.g. card details**
      maxLength: 100
      example: 'ORD-5023-4E89'
    ResponseCode:
      description: >
        Only available as a result of a 3DS2 authentication. 
      
        The response from the DS or ACS which indicates whether a transaction qualifies as an authenticated transaction or account verification. <br/>
        Only available if communication with the scheme was successful and the Session is in a final state. <br/><br/>
        • Y = Authentication Verification Successful. <br/>
        • N = Not Authenticated /Account Not Verified; Transaction denied. <br/>
        • U = Authentication/ Account Verification Could Not Be Performed; Technical or other problem, as indicated in ARes or RReq. <br/>
        • A = Attempts Processing Performed; Not Authenticated/Verified, but a proof of attempted authentication/verification is provided. <br/>
        • C = Challenge Required; Additional authentication is required using the CReq/CRes. <br/>
        • D = Challenge Required; Decoupled Authentication confirmed. <br/>
        • R = Authentication/ Account Verification Rejected; Issuer is rejecting authentication/verification and request that authorization not be attempted. <br/>
        • I = Informational Only; 3DS Requestor challenge preference acknowledged.
      type: string
      enum:
        - 'Y'
        - 'N'
        - 'U'
        - 'A'
        - 'C'
        - 'D'
        - 'R'
        - 'I'
    ResponseStatusReason:
      description: >
        Only available as a result of a 3DS2 authentication. 
      
        The response from the DS or ACS which provides information on why the `response_code` field has the specified value.  <br/>
        Only available when `response_code` is not `Y`.  <br/>
        Learn more about the reasons for <a href="https://www.checkout.com/docs/risk-management/3d-secure/sessions/understand-authentication-failures" target="_blank">authentication failures</a>.<br/><br/>
      example: '01'
      type: string
    SdkEphemeralPublicKey:
      type: object
      description: 'Public key component of the ephemeral key pair generated by the 3DS SDK and used to establish session keys between the 3DS SDK and ACS. Refer to https://tools.ietf.org/html/rfc7517#appendix-A.1'
      properties:
        kty:
          description: The key type.
          type: string
          enum: ['EC']
          example: EC
        crv:
          type: string
          description: The type of elliptic curve.
          maxLength: 40
          example: 'P-256'
        x:
          type: string
          description: x coordinate of the elliptic curve that is base64url-encoded.
          maxLength: 100
          example: 'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU'
        y:
          type: string
          description: y coordinate of the elliptic curve that is base64url-encoded.
          maxLength: 100
          example: 'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0'
    SessionAddress:
      type: object
      description: The shipping address. Any special characters will be replaced.
      properties:
        address_line1:
          type: string
          description: The first line of the address
          maxLength: 50
          example: 123 High St.
        address_line2:
          type: string
          description: The second line of the address
          maxLength: 50
          example: ABC building
        address_line3:
          type: string
          description: The third line of the address
          maxLength: 50
          example: 14 Wells Mews
        city:
          type: string
          description: The address city
          maxLength: 50
          example: London
        state:
          type: string
          description: The country subdivision code defined in ISO 3166-2
          minLength: 3
          maxLength: 3
          example: ENG
        zip:
          type: string
          description: The address zip/postal code
          maxLength: 16
          example: SW1A 1AA
        country:
          type: string
          description: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the address
          example: GB
          maxLength: 2
          minLength: 2
    SessionId:
      description: Session unique identifier
      type: string
      pattern: "^(sid)_(\\w{26})$"
      minLength: 30
      maxLength: 30
      example: sid_y3oqhf46pyzuxjbcn2giaqnb44
    SessionMarketplaceData:
      type: object
      description: Information related to authentication for payfac payments
      properties:
        sub_entity_id:
          type: string
          description: The sub-entity that the authentication is being processed on behalf of
          example: 'ent_rgyzti4x74xubmu72m6r3pvksa'
    SessionPhone:
      type: object
      required:
        - country_code
        - number
      properties:
        country_code:
          description: Country code. According to ITU-E.164
          type: string
          minLength: 1
          maxLength: 3
          pattern: '^\d{1,3}$'
          example: '234'
        number:
          type: string
          description: The rest of the number. According to ITU-E.164
          maxLength: 15
          pattern: '^\d{1,15}$'
          example: '0204567895'
    SessionRequest:
      type: object
      required:
        - currency
        - source
        - completion
      properties:
        source:
          $ref: '#/components/schemas/SessionSource'
        amount:
          type: integer
          description: |
            The payment amount in the [minor currency unit](https://www.checkout.com/docs/payments/accept-payments/format-the-payment-amount).
            
            For `recurring` and `installment` payment types, this value is required and must be greater than zero.
      
            Omitting this value will set `authentication_category` to `non_payment`.
          minimum: 0
          maxLength: 48
          example: 6540
        currency:
          type: string
          description: |
            The three-letter ISO currency code
          example: USD
          maxLength: 3
          minLength: 3
        processing_channel_id:
          type: string
          pattern: "^(pc)_(\\w{26})$"
          description: |
            The processing channel to be used for the session. Required if this was not set in the request for the OAuth token.
        marketplace:
          $ref: '#/components/schemas/SessionMarketplaceData'
        authentication_type:
          $ref: '#/components/schemas/AuthenticationType'
        authentication_category:
          $ref: '#/components/schemas/Category'
        account_info:
          $ref: '#/components/schemas/CardholderAccountInfo'
        challenge_indicator:
          $ref: '#/components/schemas/ChallengeIndicator'
        billing_descriptor:
          $ref: '#/components/schemas/SessionsBillingDescriptor'
        reference:
          $ref: '#/components/schemas/Reference'
        merchant_risk_info:
          $ref: '#/components/schemas/MerchantRiskInfo'
        transaction_type:
          $ref: '#/components/schemas/TransactionType'
        shipping_address:
          $ref: '#/components/schemas/SessionAddress'
        shipping_address_matches_billing:
          type: boolean
          description: >
            Indicates whether the cardholder shipping address and billing address are the same.
          example: false
        completion:
          $ref: '#/components/schemas/CompletionInfo'
        channel_data:
          $ref: '#/components/schemas/ChannelData'
        recurring:
          $ref: '#/components/schemas/Recurring'
        installment:
          $ref: '#/components/schemas/Installment'
        optimization:
          $ref: '#/components/schemas/Optimization'
        initial_transaction:
          $ref: '#/components/schemas/InitialTransaction'
        google_spa:
          type: object
          description: >
            This object contains the Google SPA properties (non-hosted only)
          properties:
            continue_url:
              type: string
              description: >
                Fully qualified URL for redirecting the user's browser session after authentication.<br/>
                For example, this field may be the merchant's website for purchase confirmation once payment is complete.<br/>
                Required if in full redirect (not iframe) mode.<br/>
        preferred_experiences:
          type: array
          items:
            $ref: '#/components/schemas/Experience'
          description: >
            Indicates the chosen experience(s) for this session.<br/> <br/>
            Available experiences include: <br/>
            • `3ds` <br/>
            • `google_spa` <br/>
        device_information:
          $ref: '#/components/schemas/DeviceInformation'
                              
    SessionSecret:
      description: >
        A base64 encoded value prefixed with `sek_` that gives access to client-side operations for a single authentication within the Sessions API. 
        This value is returned as the `session_secret` when requesting a session.
      type: string
      pattern: '^(sek)_(.{44})$'
      minLength: 48
      maxLength: 48
      example: sek_Dal7UyiH8rIFXA4PfgiIk2jUyQkVDeEWgVBEL4TsRTE=
    SessionSource:
      type: object
      description: The source of the authentication.
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/CardSource'
          id: '#/components/schemas/IdSource'
          token: '#/components/schemas/TokenSource'
          network_token: '#/components/schemas/NetworkTokenSource'
      required:
        - type
      properties:
        type:
          type: string
          default: 'card'
          description: The payment source type
          example: 'card'
        scheme:
          type: string
          description: Indicates the cardholder scheme choice
          enum:
            - amex
            - cartes_bancaires
            - diners
            - mastercard
            - visa
            - discover
            - upi
            - jcb
        number:
          type: string
          description: The card number.
          minLength: 13
          maxLength: 19
          example: '4242424242424242'
        expiry_month:
          type: integer
          minimum: 1
          maximum: 12
          minLength: 1
          maxLength: 2
          description: The expiry month of the card.
          example: 12
        expiry_year:
          type: integer
          minLength: 4
          maxLength: 4
          description: The expiry year of the card.
          example: 2077
        billing_address:
          description: The customer's billing address. Any special characters will be replaced.
          allOf:
            - $ref: '#/components/schemas/SessionAddress'
        home_phone:
          description: The cardholder's home phone number
          allOf:
            - $ref: '#/components/schemas/SessionPhone'
        mobile_phone:
          description: The cardholder's mobile phone number
          allOf:
            - $ref: '#/components/schemas/SessionPhone'
        work_phone:
          description: The cardholder's work phone number
          allOf:
            - $ref: '#/components/schemas/SessionPhone'
        email:
          type: string
          description: The email of the cardholder
          maxLength: 254
          example: 'bruce.wayne@email.com'
    Status:
      type: string
      enum:
        - challenged
        - pending
        - processing
        - challenge_abandoned
        - expired
        - approved
        - attempted
        - unavailable
        - declined
        - rejected
      description: Indicates the status of the session
    StatusReason:
      type: string
      description: >
        When the Session is unavailable this will point to the reason it is so.  <br/><br/>
      
        • ares_error = There was an issue in the Authentication response we got back from the Directory Server (scheme server - 3DS2) <br/>
        • ares_status = The status was set to the status in the Authentication response we got back from the Directory Server (scheme server - 3DS2) <br/>
        • rreq_error = There was an issue in the Response we got back from the Access Control Server (issuer server - 3DS2) <br/>
        • rreq_status = The status was set to the status in the Response we got back from the Access Control Server (issuer server - 3DS2) <br/>
        • risk_declined = The status was set to declined because the Risk engine recommended we decline the authentication <br/>
      enum:
        - ares_status
        - ares_error
        - rreq_error
        - rreq_status
        - risk_declined
    ThreeDsMethodCompletion:
      required:
        - three_ds_method_completion
      description: The result of the 3DS method url
      properties:
        three_ds_method_completion:
          type: string
          enum:
            - Y
            - N
            - U
          description: >
            The result of the 3DS method URL.<br> 
            Default to `U` if a response is not received from the 3DS Method URL within 10 seconds.
          minLength: 1
          maxLength: 1
          example: Y
      example:
        three_ds_method_completion: Y
    ThreeDsRequestorAuthenticationInfo:
      type: object
      description: Information about how the 3DS Requestor authenticated the cardholder before or during the transaction.
      properties:
        three_ds_req_auth_method:
          type: string
          description: The mechanism used by the cardholder to authenticate with the 3DS Requestor.
          enum:
            - no_threeds_requestor_authentication_occurred
            - three3ds_requestor_own_credentials
            - federated_id
            - issuer_credentials
            - third_party_authentication
            - fido_authenticator
            - fido_authenticator_fido_assurance_data_signed
            - src_assurance_data
        three_ds_req_auth_timestamp:
          type: string
          format: date-time
          description: The UTC date and time the cardholder authenticated with the 3DS Requestor, in ISO 8601 format.
        three_ds_req_auth_data:
          type: string
          description: Data that documents and supports a specific authentication process.
          maxLength: 20000
    TokenSource:
      type: object
      allOf:
        - $ref: '#/components/schemas/SessionSource'
        - type: object
          required:
            - token
          properties:
            token:
              type: string
              description: The Checkout.com card token
              example: 'tok_4gzeau5o2uqubbk6fufs3m7p54'
              maxLength: 100
    TransactionType:
      type: string
      enum:
        - goods_service
        - check_acceptance
        - account_funding
        - quasi_card_transaction
        - prepaid_activation_and_load
      description: Identifies the type of transaction being authenticated
      maxLength: 50
      example: goods_service
      default: goods_service
    TrustedBeneficiary:
      type: object
      description: Details of the trusted listing status of the merchant.
      properties:
        status:
          type: string
          description: >
            Enables the communication of trusted beneficiary status between the Access Control Server (ACS), the Directory Server (DS), and the 3D Secure (3DS) Requestor.<br/><br/>
            
            • Y = 3DS Requestor is allowlisted by cardholder<br/>
            • N = 3DS Requestor is not allowlisted by cardholder<br/>
            • E = Not eligible as determined by issuer<br/>
            • P = Pending confirmation by cardholder<br/>
            • R = Cardholder rejected<br/>
            • U = Allowlist status unknown, unavailable, or does not apply
          enum:
            - Y
            - N
            - E
            - P
            - R
            - U
          example: Y
        source:
          type: string
          description: > 
            The system setting trusted beneficiary status.<br/><br/>
          
            • 01 = 3DS Server <br/>
            • 02 = DS <br/>
            • 03 = ACS <br/>
            • 80-99 = DS-specific values <br/>
          example: '01'
    AccountUpdaterRequest:
      type: object
      properties:
        source_options:
          type: object
          description: The source to update. You must provide either `card` or `instrument` object, but not both.
          properties:
            card:
              $ref: '#/components/schemas/CardDetailsRequest'
            instrument:
              $ref: '#/components/schemas/Instrument'
    AccountUpdaterResponse:
      type: object
      required:
        - account_update_status
      properties:
        account_update_status:
          description: Result of the update operation.    
          type: string
          enum: [ CARD_UPDATED, CARD_EXPIRY_UPDATED, CARD_CLOSED, UPDATE_FAILED ]
          example: 'CARD_UPDATED'
        account_update_failure_code:
          type: string
          enum: [ CARDHOLDER_OPT_OUT, UP_TO_DATE, NON_PARTICIPATING_BIN, UNKNOWN ]
          description: |
            This field is returned when the update fails and the scheme returns an appropriate reason code. <p/>
      
            For more information, see [Standalone Account Updater](https://checkout.com/docs/payments/store-and-manage-credentials/update-stored-credentials/standalone-account-updater)
        card:
          $ref: "#/components/schemas/CardDetailsResponse"
    CardDetailsRequest:
      type: object
      description: The card details
      required:
        - number
        - expiry_month
        - expiry_year
      properties:
        number:
          type: string
          pattern: ^[0-9]+$
          example: "5436424242424242"
          description: The card number.
        expiry_month:
          type: integer
          format: int32
          minimum: 1
          maximum: 12
          example: 5
          description: The expiry month of the card
        expiry_year:
          type: integer
          format: int32
          example: 2025
          description: The four-digit expiry year of the card
    CardDetailsResponse:
      type: object
      description: Updated card details. Fields vary depending on PCI compliance level.
      required:
        - expiry_month
        - expiry_year
      properties:
        encrypted_card_number:
          type: string
          example: "3nCryp73dFPANv4lu3"
          description: The encrypted full Primary Account Number (PAN). Returned only for PCI SAQ D merchants.
        bin:
          type: string
          pattern: '^\d{6}$'
          example: "543642"
          description: The first 6 digits of the PAN.
        last4:
          type: string
          pattern: '^\d{4}$'
          example: "4242"
          description: Last 4 digits of the PAN.
        expiry_month:
          type: integer
          format: int32
          minimum: 1
          maximum: 12
          example: 5
          description: Expiry month. Expressed in number.
        expiry_year:
          type: integer
          format: int32
          example: 2025
          description: Four-digit expiry year.
        fingerprint:
          type: string
          example: "abc123fingerprint"
          description: Unique identifier for the card
    Instrument:
      type: object
      description: Instrument reference
      required:
        - id
      properties:
        id:
          type: string
          description: Unique instrument identifier
          example: src_nmukohhu7vbe5f55ndwqzwv2c4
    Timestamp:
      type: string
      description: ISO 8601 timestamp
      format: date-time
    01_CardTokenRequest:
      type: object
      description: Card Token Request
      required:
        - type
        - number
        - expiry_month
        - expiry_year
      properties:
        type:
          type: string
          description: The type of card details to be tokenized
          enum:
            - card
          example: card
        number:
          type: string
          description: The card number
          example: '4543474002249996'
        expiry_month:
          type: integer
          description: The expiry month of the card
          minimum: 1
          example: 6
          minLength: 1
          maxLength: 2
        expiry_year:
          type: integer
          description: The expiry year of the card
          example: 2025
          minLength: 4
          maxLength: 4
        name:
          type: string
          description: The cardholder's name
          example: 'Bruce Wayne'
        cvv:
          type: string
          description: The card verification value/code. 3 digits, except for American Express (4 digits)
          example: '956'
          minLength: 3
          maxLength: 4
        pin:
          type: string
          description: The first 2 digits of the card PIN
          example: '12'
          minLength: 2
          maxLength: 2
        billing_address:
          description: The payment source owner's billing address
          allOf:
            - $ref: '#/components/schemas/Address'
        phone:
          description: The payment source owner's phone number
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
    01_CardTokenResponse:
      type: object
      description: Card Token Response
      required:
        - type
        - token
        - expires_on
        - expiry_month
        - expiry_year
        - last4
        - bin
      properties:
        type:
          description: The type of card details to be tokenized
          allOf:
            - $ref: '#/components/schemas/TokenResponseType'
            - type: string
              enum:
                - card
        token:
          type: string
          description: The reference token
          example: tok_ubfj2q76miwundwlk72vxt2i7q
        expires_on:
          description: The date/time the token will expire
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        billing_address:
          description: The payment source owner's billing address
          allOf:
            - $ref: '#/components/schemas/Address'
        phone:
          description: The payment source owner's phone number
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
        expiry_month:
          type: integer
          description: The expiry month
          minimum: 1
          example: 6
          minLength: 1
          maxLength: 2
        expiry_year:
          type: integer
          description: The expiry year
          example: 2025
          minLength: 4
          maxLength: 4
        name:
          type: string
          description: The cardholder's name
          example: 'Bruce Wayne'
        scheme:
          type: string
          description: The card scheme
          example: 'VISA'
        scheme_local:
          type: string
          description: The local co-branded card scheme
          enum:
            - cartes_bancaires
          example: 'cartes_bancaires'
        last4:
          type: string
          description: The last four digits of the card number
          example: '9996'
          minLength: 4
          maxLength: 4
        bin:
          type: string
          description: The card issuer's Bank Identification Number (BIN)
          example: '454347'
          maxLength: 6
        card_type:
          type: string
          description: The card type
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
            - DEFERRED DEBIT
          example: CREDIT
        card_category:
          type: string
          description: The card category
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        issuer:
          type: string
          description: The name of the card issuer
          example: 'GOTHAM STATE BANK'
        issuer_country:
          type: string
          maxLength: 2
          minLength: 2
          description: The card issuer's country (<a href="https://www.checkout.com/docs/resources/codes/country-codes" target="blank">two-letter ISO code</a>)
          example: 'US'
        product_id:
          type: string
          description: The issuer/card scheme product identifier
          example: 'F'
        product_type:
          type: string
          description: The issuer/card scheme product type
          example: CLASSIC
    02_GooglePayTokenRequest:
      type: object
      description: Google Pay Token Request
      required:
        - type
      properties:
        type:
          type: string
          description: The type of card details to be tokenized
          enum:
            - googlepay
          example: googlepay
        token_data:
          type: object
          description: The Google Pay payment token
          properties:
            signature:
              type: string
              description: Verifies the message came from Google. The signature is created using ECDSA
            protocolVersion:
              type: string
              description: Identifies which encryption/signing scheme created this message. In this way, the protocol can evolve over time if needed. If it is not set, assume ECv0
            signedMessage:
              type: string
              description: A serialized JSON string containing the encryptedMessage, ephemeralPublicKey, and tag. To simplify the signature verification process, this value is serialized
          example:
            {
              'protocolVersion': 'ECv1',
              'signature': 'TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ',
              'signedMessage': '{"encryptedMessage":
                "ZW5jcnlwdGVkTWVzc2FnZQ==",
                "ephemeralPublicKey": "ZXBoZW1lcmFsUHVibGljS2V5",
                "tag": "c2lnbmF0dXJl"}',
            }
    02_GooglePayTokenResponse:
      type: object
      description: Google Pay Token Response
      required:
        - type
        - token
        - expires_on
        - expiry_month
        - expiry_year
        - last4
        - bin
      properties:
        type:
          description: The type of card details to be tokenized
          allOf:
            - $ref: '#/components/schemas/TokenResponseType'
            - type: string
              enum:
                - googlepay
        token:
          type: string
          description: The reference token
          example: tok_ubfj2q76miwundwlk72vxt2i7q
        expires_on:
          description: The date/time the token will expire
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        expiry_month:
          type: integer
          description: The expiry month
          minimum: 1
          example: 6
          minLength: 1
          maxLength: 2
        expiry_year:
          type: integer
          description: expiry year
          example: 2025
          minLength: 4
          maxLength: 4
        scheme:
          type: string
          description: The card scheme
          example: 'VISA'
        scheme_local:
          type: string
          description: The local co-branded card scheme
          enum:
            - cartes_bancaires
          example: 'cartes_bancaires'
        last4:
          type: string
          description: The last four digits of the card number
          example: '9996'
        bin:
          type: string
          description: The card issuer BIN
          example: '454347'
        card_type:
          type: string
          description: The card type
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
            - DEFERRED DEBIT
          example: CREDIT
        card_category:
          type: string
          description: The card category
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        issuer:
          type: string
          description: The name of the card issuer
          example: 'GOTHAM STATE BANK'
        issuer_country:
          type: string
          maxLength: 2
          minLength: 2
          description: The card issuer country ISO-2 code
          example: 'US'
        product_id:
          type: string
          description: The issuer/card scheme product identifier
          example: 'F'
        product_type:
          type: string
          description: The issuer/card scheme product type
          example: CLASSIC
        token_format:
          type: string
          description: The format of the token.
          enum:
            - pan_only
            - cryptogram_3ds
          example: 'pan_only'
    03_ApplePayTokenRequest:
      type: object
      description: Apple Pay Token Request
      required:
        - type
        - token_data
      properties:
        type:
          type: string
          description: The type of card details to be tokenized
          enum:
            - applepay
          example: applepay
        token_data:
          $ref: '#/components/schemas/TokenData'
    03_ApplePayTokenResponse:
      type: object
      description: Apple Pay Token Response
      required:
        - type
        - token
        - expires_on
        - expiry_month
        - expiry_year
        - last4
        - bin
      properties:
        type:
          description: The type of card details to be tokenized
          allOf:
            - $ref: '#/components/schemas/TokenResponseType'
            - type: string
              enum:
                - applepay
        token:
          type: string
          description: The reference token
          example: tok_ubfj2q76miwundwlk72vxt2i7q
        expires_on:
          description: The date/time the token will expire
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        expiry_month:
          type: integer
          description: The expiry month
          minimum: 1
          example: 6
          minLength: 1
          maxLength: 2
        expiry_year:
          type: integer
          description: expiry year
          example: 2025
          minLength: 4
          maxLength: 4
        scheme:
          type: string
          description: The card scheme
          example: 'VISA'
        scheme_local:
          type: string
          description: The local co-branded card scheme
          enum:
            - cartes_bancaires
          example: 'cartes_bancaires'
        last4:
          type: string
          description: The last four digits of the card number
          example: '9996'
        bin:
          type: string
          description: The card issuer BIN
          example: '454347'
        card_type:
          type: string
          description: The card type
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
            - DEFERRED DEBIT
          example: CREDIT
        card_category:
          type: string
          description: The card category
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        issuer:
          type: string
          description: The name of the card issuer
          example: 'GOTHAM STATE BANK'
        issuer_country:
          type: string
          maxLength: 2
          minLength: 2
          description: The card issuer country ISO-2 code
          example: 'US'
        product_id:
          type: string
          description: The issuer/card scheme product identifier
          example: 'F'
        product_type:
          type: string
          description: The issuer/card scheme product type
          example: CLASSIC
        token_format:
          type: string
          description: The format of the token.
          enum:
            - cryptogram_3ds
          example: 'cryptogram_3ds'
    04_CvvTokenRequest:
      type: object
      description: CVV Token Request
      required:
        - type
        - token_data
      properties:
        type:
          type: string
          description: The type of card details to be tokenized
          enum:
            - cvv
          example: cvv
        token_data:
          type: object
          description: Data containing the CVV token value
          properties:
            cvv:
              type: string
              description: The card verification value/code. 3 digits, except for American Express (4 digits)
              example: '956'
              minLength: 3
              maxLength: 4
          example:
            {
              "cvv": "123"
            }
    04_CvvTokenResponse:
      type: object
      description: CVV Token Response
      required:
        - type
        - token
        - expires_on
      properties:
        type:
          description: The type of card details to be tokenized
          allOf:
            - $ref: '#/components/schemas/TokenResponseType'
            - type: string
              enum:
                - cvv
        token:
          type: string
          description: The token id.
          example: 'tok_ubfj2q76miwundwlk72vxt2i7q'
        expires_on:
          type: string
          format: date-time
          description: The expiry value for the token id.
          example: '2023-07-11T15:57:32.435+00:00'
    05_PinTokenRequest:
      type: object
      description: PIN Token Request
      required:
        - type
        - token_data
      properties:
        type:
          type: string
          description: The type of card details to be tokenized
          enum:
            - pin
          example: pin
        token_data:
          type: object
          description: Data containing the PIN token value
          properties:
            pin:
              type: string
              description: The first 2 digits of the card PIN
          example:
            {
              "pin": "12"
            }
    05_PinTokenResponse:
      type: object
      description: PIN Token Response
      required:
        - type
        - token
        - expires_on
      properties:
        type:
          description: The type of card details to be tokenized
          allOf:
            - $ref: '#/components/schemas/TokenResponseType'
            - type: string
              enum:
                - pin
        token:
          type: string
          description: The token id.
          example: 'tok_ubfj2q76miwundwlk72vxt2i7q'
        expires_on:
          type: string
          format: date-time
          description: The expiry value for the token id.
          example: '2023-07-11T15:57:32.435+00:00'
    TokenData:
      type: object
      description: The Apple Pay payment token
      properties:
        version:
          type: string
          description: Version information about the payment token. The token uses `EC_v1` for ECC-encrypted data, and `RSA_v1` for RSA-encrypted data
        data:
          type: string
          description: Encrypted payment data. Base64 encoded as a string
        signature:
          type: string
          description: Signature of the payment and header data. The signature includes the signing certificate, its intermediate CA certificate, and information about the signing algorithm
        header:
          type: object
          description: Additional version-dependent information used to decrypt and verify the payment
      example:
        {
          'version': 'EC_v1',
          'data': 't7GeajLB9skXB6QSWfEpPA4WPhDqB7ekdd+F7588arLzvebKp3P0TekUslSQ8nkuacUgLdks2IKyCm7U3OL/PEYLXE7w60VkQ8WE6FXs/cqHkwtSW9vkzZNDxSLDg9slgLYxAH2/iztdipPpyIYKl0Kb6Rn9rboF+lwgRxM1B3n84miApwF5Pxl8ZOOXGY6F+3DsDo7sMCUTaJK74DUJJcjIXrigtINWKW6RFa/4qmPEC/Y+syg04x7B99mbLQQzWFm7z6HfRmynPM9/GA0kbsqd/Kn5Mkqssfhn/m6LuNKsqEmbKi85FF6kip+F17LRawG48bF/lT8wj/QEuDY0G7t/ryOnGLtKteXmAf0oJnwkelIyfyj2KI8GChBuTJonGlXKr5klPE89/ycmkgDl+T6Ms7PhiNZpuGEE2QE=',
          'signature': 'MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID5jCCA4ugAwIBAgIIaGD2mdnMpw8wCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTE2MDYwMzE4MTY0MFoXDTIxMDYwMjE4MTY0MFowYjEoMCYGA1UEAwwfZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtU0FOREJPWDEUMBIGA1UECwwLaU9TIFN5c3RlbXMxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgjD9q8Oc914gLFDZm0US5jfiqQHdbLPgsc1LUmeY+M9OvegaJajCHkwz3c6OKpbC9q+hkwNFxOh6RCbOlRsSlaOCAhEwggINMEUGCCsGAQUFBwEBBDkwNzA1BggrBgEFBQcwAYYpaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZWFpY2EzMDIwHQYDVR0OBBYEFAIkMAua7u1GMZekplopnkJxghxFMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUI/JJxE+T5O8n5sT2KGw/orv9LkswggEdBgNVHSAEggEUMIIBEDCCAQwGCSqGSIb3Y2QFATCB/jCBwwYIKwYBBQUHAgIwgbYMgbNSZWxpYW5jZSBvbiB0aGlzIGNlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRlIHBvbGljeSBhbmQgY2VydGlmaWNhdGlvbiBwcmFjdGljZSBzdGF0ZW1lbnRzLjA2BggrBgEFBQcCARYqaHR0cDovL3d3dy5hcHBsZS5jb20vY2VydGlmaWNhdGVhdXRob3JpdHkvMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlYWljYTMuY3JsMA4GA1UdDwEB/wQEAwIHgDAPBgkqhkiG92NkBh0EAgUAMAoGCCqGSM49BAMCA0kAMEYCIQDaHGOui+X2T44R6GVpN7m2nEcr6T6sMjOhZ5NuSo1egwIhAL1a+/hp88DKJ0sv3eT3FxWcs71xmbLKD/QJ3mWagrJNMIIC7jCCAnWgAwIBAgIISW0vvzqY2pcwCgYIKoZIzj0EAwIwZzEbMBkGA1UEAwwSQXBwbGUgUm9vdCBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwHhcNMTQwNTA2MjM0NjMwWhcNMjkwNTA2MjM0NjMwWjB6MS4wLAYDVQQDDCVBcHBsZSBBcHBsaWNhdGlvbiBJbnRlZ3JhdGlvbiBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATwFxGEGddkhdUaXiWBB3bogKLv3nuuTeCN/EuT4TNW1WZbNa4i0Jd2DSJOe7oI/XYXzojLdrtmcL7I6CmE/1RFo4H3MIH0MEYGCCsGAQUFBwEBBDowODA2BggrBgEFBQcwAYYqaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwNC1hcHBsZXJvb3RjYWczMB0GA1UdDgQWBBQj8knET5Pk7yfmxPYobD+iu/0uSzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFLuw3qFYM4iapIqZ3r6966/ayySrMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly9jcmwuYXBwbGUuY29tL2FwcGxlcm9vdGNhZzMuY3JsMA4GA1UdDwEB/wQEAwIBBjAQBgoqhkiG92NkBgIOBAIFADAKBggqhkjOPQQDAgNnADBkAjA6z3KDURaZsYb7NcNWymK/9Bft2Q91TaKOvvGcgV5Ct4n4mPebWZ+Y1UENj53pwv4CMDIt1UQhsKMFd2xd8zg7kGf9F3wsIW2WT8ZyaYISb1T4en0bmcubCYkhYQaZDwmSHQAAMYIBjTCCAYkCAQEwgYYwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTAghoYPaZ2cynDzANBglghkgBZQMEAgEFAKCBlTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNzA4MDIxNjA5NDZaMCoGCSqGSIb3DQEJNDEdMBswDQYJYIZIAWUDBAIBBQChCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEIGEfVr+4x9RQXyfF8IYA0kraoK0pcZEaBlINo6EGrOReMAoGCCqGSM49BAMCBEgwRgIhAKunK47QEr/ZjxPlVl+etzVzbKA41xPLWtO01oUOlulmAiEAiaFH9F9LK6uqTFAUW/WIDkHWiFuSm5a3NVox7DlyIf0AAAAAAAA=',
          'header':
            {
              'ephemeralPublicKey': 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEX1ievoT8DRB8T5zGkhHZHeDr0oBmYEgsDSxyT0MD0IZ2Mpfjz2LdWq6LUwSH9EmxdPEzMunsZKWMyOr3K/zlsw==',
              'publicKeyHash': 'tqYV+tmG9aMh+l/K6cicUnPqkb1gUiLjSTM9gEz6Nl0=',
              'transactionId': '3cee89679130a4b2617c76118a1c62fd400cd45b49dc0916d5b951b560cd17b4',
            },
        }
    TokenMetadataResponse:
      type: object
      required:
        - token
        - type
        - expires_on
        - expiry_month
        - expiry_year
        - last4
        - bin
      properties:
        token:
          type: string
          description: The token ID
          example: tok_4gzeau5o2uqubbk6fudbloo47a
        type:
          type: string
          description: The token type.
          example: card
        expires_on:
          description: The date/time the token will expire.
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        expiry_month:
          type: integer
          description: The card expiry month.
          minimum: 1
          maximum: 12
          example: 12
        expiry_year:
          type: integer
          description: The card expiry year.
          example: 2030
        scheme:
          type: string
          description: The card scheme.
          example: Visa
        last4:
          type: string
          description: The last four digits of the card number.
          example: '4242'
        bin:
          type: string
          description: The card issuer BIN.
          example: '424242'
        card_type:
          type: string
          description: The card type.
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
            - DEFERRED DEBIT
          example: CREDIT
        card_category:
          type: string
          description: The card category.
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        issuer:
          type: string
          description: The name of the card issuer.
          example: JPMORGAN CHASE BANK NA
        issuer_country:
          type: string
          minLength: 2
          maxLength: 2
          description: The card issuer's country (<a href="https://www.checkout.com/docs/previous/resources/codes/country-codes" target="blank">two-letter ISO code</a>).
          example: US
        product_id:
          type: string
          description: The issuer or card scheme's product identifier.
          example: A
        product_type:
          type: string
          description: The issuer or card scheme's product type.
          example: Visa Traditional
        billing_address:
          description: Partial billing address — city and country only.
          type: object
          nullable: true
          properties:
            city:
              type: string
              description: The address city
              example: London
            country:
              type: string
              minLength: 2
              maxLength: 2
              description: The billing address country's (<a href="https://www.checkout.com/docs/previous/resources/codes/country-codes" target="blank">two-letter ISO code</a>).
              example: GB
    TokenRequest:
      type: object
      description: The source of the payment
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/01_CardTokenRequest'
          googlepay: '#/components/schemas/02_GooglePayTokenRequest'
          applepay: '#/components/schemas/03_ApplePayTokenRequest'
          cvv: '#/components/schemas/04_CvvTokenRequest'
          pin: '#/components/schemas/05_PinTokenRequest'
      oneOf:
        - $ref: '#/components/schemas/01_CardTokenRequest'
        - $ref: '#/components/schemas/02_GooglePayTokenRequest'
        - $ref: '#/components/schemas/03_ApplePayTokenRequest'
        - $ref: '#/components/schemas/04_CvvTokenRequest'
        - $ref: '#/components/schemas/05_PinTokenRequest'
      required:
        - type
      properties:
        type:
          type: string
          description: The type of card details to be tokenized
          example: 'card'
    TokenResponse:
      type: object
      description: The source of the payment
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/01_CardTokenResponse'
          googlepay: '#/components/schemas/02_GooglePayTokenResponse'
          applepay: '#/components/schemas/03_ApplePayTokenResponse'
          cvv: '#/components/schemas/04_CvvTokenResponse'
          pin: '#/components/schemas/05_PinTokenResponse'
      oneOf:
        - $ref: '#/components/schemas/01_CardTokenResponse'
        - $ref: '#/components/schemas/02_GooglePayTokenResponse'
        - $ref: '#/components/schemas/03_ApplePayTokenResponse'
        - $ref: '#/components/schemas/04_CvvTokenResponse'
        - $ref: '#/components/schemas/05_PinTokenResponse'
      required:
        - type
        - token
        - expires_on
        - expiry_month
        - expiry_year
        - last4
        - bin
      properties:
        type:
          type: string
          allOf:
            - $ref: '#/components/schemas/TokenResponseType'
          description: The type of card details to be tokenized
          example: 'card'
        token:
          type: string
          description: The reference token
          example: tok_ubfj2q76miwundwlk72vxt2i7q
        expires_on:
          description: The date/time the token will expire
          allOf:
            - $ref: '#/components/schemas/ServerTimestamp'
        expiry_month:
          type: integer
          description: The expiry month
          minimum: 1
          example: 6
          minLength: 1
          maxLength: 2
        expiry_year:
          type: integer
          description: expiry year
          example: 2025
          minLength: 4
          maxLength: 4
        scheme:
          type: string
          description: The card scheme
          example: 'VISA'
        scheme_local:
          type: string
          description: The local co-branded card scheme
          enum:
            - cartes_bancaires
          example: 'cartes_bancaires'
        last4:
          type: string
          description: The last four digits of the card number
          example: '9996'
        bin:
          type: string
          description: The card issuer BIN
          example: '454347'
        card_type:
          type: string
          description: The card type
          enum:
            - CREDIT
            - DEBIT
            - PREPAID
            - CHARGE
            - DEFERRED DEBIT
          example: CREDIT
        card_category:
          type: string
          description: The card category
          enum:
            - CONSUMER
            - COMMERCIAL
          example: CONSUMER
        issuer:
          type: string
          description: The name of the card issuer
          example: 'GOTHAM STATE BANK'
        issuer_country:
          type: string
          maxLength: 2
          minLength: 2
          description: The card issuer country ISO-2 code
          example: 'US'
        product_id:
          type: string
          description: The issuer/card scheme product identifier
          example: 'F'
        product_type:
          type: string
          description: The issuer/card scheme product type
          example: CLASSIC
    TokenResponseType:
      type: string
      description: Ordered list of token response types used for discriminators
      enum:
        - card
        - googlepay
        - applepay
        - cvv
        - pin
    CreateTransferRequest:
      type: object
      title: Create transfer request
      properties:
        reference:
          type: string
          description: A reference you can use later to identify this transfer
          maxLength: 50
          example: superhero1234
        transfer_type:
          $ref: '#/components/schemas/TransferType'
        source:
          allOf:
            - $ref: '#/components/schemas/TransferSource'
          required:
            - id
            - amount
        destination:
          allOf:
            - $ref: '#/components/schemas/TransferDestination'
          required:
            - id
      required:
        - transfer_type
        - source
        - destination
    CreateTransferResponse:
      type: object
      title: Create transfer response
      properties:
        id:
          type: string
          description: The `id` representing the initiated transfer.
          example: tra_y3oqhf46pyzuxjbcn2giaqnb4
        status:
          $ref: '#/components/schemas/TransferStatus'
        _links:
          type: object
          properties:
            self:
              $ref: '#/components/schemas/TransferLink'
          example:
            self:
              href: "https://transfers.checkout.com/transfers/tra_y3oqhf46pyzuxjbcn2giaqnb4"
    Transfer:
      type: object
      title: The transfer information
      properties:
        id:
          type: string
          description: The transfer identifier
          example: tra_y3oqhf46pyzuxjbcn2giaqnb4
        reference:
          type: string
          description: A unique reference used to identify this transfer
          example: superhero1234
        status:
          $ref: '#/components/schemas/TransferStatus'
        transfer_type:
          $ref: '#/components/schemas/TransferType'
        requested_on:
          type: string
          description: The date the transfer was requested on
          example: '2021-12-15T09:15:02.3845763Z'
        reason_codes:
          type: array
          description: An optional set of reason codes describing why the transfer is in its current state 
          items:
            type: string
          example: ["destination_transfers_capability_disabled", "source_and_destination_currency_accounts_must_be_different"]
        source:
          type: object
          description: The source of the funds involved in the transfer
          properties:
            entity_id:
              type: string
              description: The ID of the entity that sent the transfer
              example: ent_azsiyswl7bwe2ynjzujy7lcjca
            amount:
              description: The amount transferred, in the minor unit of the currency represented by the `currency` property
              type: integer
              example: 100
            currency:
              description: The ISO currency code of the funds being transferred
              type: string
              example: GBP
        destination:
          type: object
          description: The destination of the funds involved in the transfer
          properties:
            entity_id:
              type: string
              description: The ID of the entity that received the transfer
              example: ent_bqik7gxoavwhmy3ot6kvmbx6py
        _links:
          type: object
          properties:
            self:
              $ref: '#/components/schemas/TransferLink'
          example:
            self:
              href: "https://transfers.checkout.com/transfers/tra_y3oqhf46pyzuxjbcn2giaqnb4"
      example:
        id: tra_y3oqhf46pyzuxjbcn2giaqnb4
        reference: superhero1234
        status: rejected
        transfer_type: commission
        requested_on: '2021-12-15T09:15:02.3845763Z'
        reason_codes:
        - destination_transfers_capability_disabled
        - source_and_destination_currency_accounts_must_be_different
        source:
          entity_id: ent_azsiyswl7bwe2ynjzujy7lcjca
          amount: 100
          currency: GBP
        destination:
          entity_id: ent_bqik7gxoavwhmy3ot6kvmbx6py
        _links:
          self:
            href: "https://transfers.checkout.com/transfers/tra_y3oqhf46pyzuxjbcn2giaqnb4"
    TransferDestination:
      type: object
      title: Transfer destination
      description: The object representing the destination of the funds involved in the transfer.
      properties:
        id:
          type: string
          description: The identifier representing the destination of the funds. Currently this should be an entity ID.
          example: ent_w4jelhppmfiufdnatam37wrfc4
    TransferLink:
      type: object
      title: Transfer link
      properties:
        href:
          description: The link URL.
          type: string
    TransferSource:
      type: object
      title: Transfer source
      description: The object representing the source of the funds involved in the transfer.
      properties:
        id:
          type: string
          description: The identifier representing the source of the funds. Currently this should be an entity ID.
          example: ent_azsiyswl7bwe2ynjzujy7lcjca
        amount:
          description: The amount to be transferred, in the minor unit of the currency (which is represented by the `id` and, optionally, the `currency` property)
          type: integer
          example: 100
        currency: 
          description: The currency that the transfer should be made in. This should be a currency supported by both the source and destination of the transfer.
          type: string
          format: ISO 4217
          example: GBP
    TransferStatus:
      type: string
      title: Transfer status
      description: The current state of the initiated transfer.
      enum:
        - pending
        - completed
        - rejected
    TransferType:
      type: string
      title: Transfer type
      description: The type of transfer
      enum:
        - commission
        - promotion
        - refund
    UnreferencedRefundRequestAccountHolder:
      type: object
      description: The unreferenced refund destination account holder.
      discriminator:
        propertyName: type
        mapping:
          individual: '#/components/schemas/UnreferencedRefundRequestIndividualAccountHolder'
          corporate: '#/components/schemas/UnreferencedRefundRequestCorporateAccountHolder'
          government: '#/components/schemas/UnreferencedRefundRequestGovernmentAccountHolder'
      oneOf:
        - $ref: '#/components/schemas/UnreferencedRefundRequestIndividualAccountHolder'
        - $ref: '#/components/schemas/UnreferencedRefundRequestCorporateAccountHolder'
        - $ref: '#/components/schemas/UnreferencedRefundRequestGovernmentAccountHolder'
      required:
        - type
      properties:
        type:
          type: string
          description: The account holder type.
    UnreferencedRefundRequestCorporateAccountHolder:
      type: object
      description: The unreferenced refund destination account holder's details.
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The type of account receiving the unreferenced refund.
          example: 'corporate'
        company_name:
          type: string
          description: |
            The corporate account holder's company name.
            
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
              - a single character
              - all non-alphabetic characters
          maxLength: 50
        billing_address:
          type: object
          description: |
            The account holder's billing address.
      
            If your company is incorporated in the United States, this field is required for all unreferenced refunds you perform.
          properties:
            address_line1:
              type: string
              description: |
                The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
            state:
              type: string
              description: |
                The address state.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                You must provide US ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: |
                The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2
        phone:
          type: object
          description: The account holder's phone number.
          required:
            - country_code
            - number
          properties:
            country_code:
              type: string
              description: The international dialing code for the account holder's address `country`, as an [ITU-T E.164 code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 7
              minLength: 1
            number:
              type: string
              description: The digits of the phone number, not including the `country_code`.
              maxLength: 25
              minLength: 6
        identification:
          type: object
          required:
            - type
            - number
          description: |
            The account holder's identification.
      
            Providing identification details for the unreferenced refund recipient increases the likelihood of a successful unreferenced refund.
          properties:
            type:
              type: string
              description: The type of identification for the account holder.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The account holder's identification number.
              maxLength: 25
            issuing_country:
              type: string
              description: |
                If applicable, the country that issued the account holder's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
      
                Providing `issuing_country` increases the likelihood of a successful identity verification.
              maxLength: 2
              minLength: 2
            date_of_expiry:
              type: string
              description: |
                If applicable, the expiration date of the account holder's identification, in the format `YYYY-MM-DD`.
      
                Providing `date_of_expiry` increases the likelihood of a successful identity verification.
              maxLength: 10
              minLength: 10
        email:
          type: string
          description: The account holder's email address.
          maxLength: 255
    UnreferencedRefundRequestGovernmentAccountHolder:
      type: object
      description: The unreferenced refund destination account holder's details.
      required:
        - type
        - company_name
      properties:
        type:
          type: string
          description: The type of account receiving the unreferenced refund.
          example: 'government'
        company_name:
          type: string
          description: |
            The account holder's company name.
      
            This must be a valid legal name. The following formats for the `company_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
      
              - a single character
              - all non-alphabetic characters
          maxLength: 50
        billing_address:
          type: object
          description: |
            The account holder's billing address.
      
            If your company is incorporated in the United States, this field is required for all unreferenced refunds you perform.
          properties:
            address_line1:
              type: string
              description: |
                The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
            state:
              type: string
              description: The address state.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                You must provide United States ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: |
                The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2
        phone:
          type: object
          description: The account holder's phone number.
          required:
            - country_code
            - number
          properties:
            country_code:
              type: string
              description: The international dialing code for the account holder's address `country`, as an [ITU-T E.164 code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 7
              minLength: 1
            number:
              type: string
              description: The digits for the phone number, not including the `country_code`.
              maxLength: 25
              minLength: 6
        identification:
          type: object
          required:
            - type
            - number
          description: |
            The account holder's identification.
      
            Providing identification details for the unreferenced refund recipient increases the likelihood of a successful unreferenced refund.
          properties:
            type:
              type: string
              description: The type of identification for the account holder.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The account holder's identification number.
              maxLength: 25
            issuing_country:
              type: string
              description: |
                If applicable, the country that issued the account holder's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
      
                Providing `issuing_country` increases the likelihood of a successful identity verification.
              maxLength: 2
              minLength: 2
            date_of_expiry:
              type: string
              description: |
                If applicable, the expiration date of the account holder's identification, in the format `YYYY-MM-DD`.
      
                Providing `date_of_expiry` increases the likelihood of a successful identity verification.
              maxLength: 10
              minLength: 10
        email:
          type: string
          description: The account holder's email address.
          maxLength: 255
    UnreferencedRefundRequestIndividualAccountHolder:
      type: object
      description: The unreferenced refund destination account holder's details.
      properties:
        type:
          type: string
          description: The type of account receiving the unreferenced refund.
          example: 'individual'
        first_name:
          type: string
          description: |
            The account holder's first name.
              
            This must be a valid legal name. The following formats for the `first_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
            - a single character
            - all numeric characters
            - all punctuation characters
          maxLength: 50
        middle_name:
          type: string
          description: |
            The account holder's middle name.
          maxLength: 50
        last_name:
          type: string
          description: |
            The account holder's last name.
      
            This must be a valid legal name. The following formats for the `last_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
              - a single character
              - all numeric characters
              - all punctuation characters
          maxLength: 50
        billing_address:
          type: object
          description: |
            The account holder's billing address.
      
            If your company is incorporated in the United States, this field is required for all unreferenced refunds you perform.
          properties:
            address_line1:
              type: string
              description: |
                The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
              minLength: 3
            state:
              type: string
              description: |
                The address state.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                You must provide United States ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: |
                The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2
        phone:
          type: object
          description: The account holder's phone number.
          required:
            - country_code
            - number
          properties:
            country_code:
              type: string
              description: The international dialing code for the account holder's address `country`, as an [ITU-T E.164 code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 7
              minLength: 1
            number:
              type: string
              description: The digits for the phone number, not including the `country_code`.
              maxLength: 25
              minLength: 6
        identification:
          type: object
          required:
            - type
            - number
          description: |
            The account holder's identification.
      
            Providing identification details for the unreferenced refund recipient increases the likelihood of a successful payout.
          properties:
            type:
              type: string
              description: The type of identification for the account holder.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The account holder's identification number.
              maxLength: 25
            issuing_country:
              type: string
              description: |
                If applicable, the country that issued the account holder's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
      
                Providing `issuing_country` increases the likelihood of a successful identity verification.
              maxLength: 2
              minLength: 2
            date_of_expiry:
              type: string
              description: |
                If applicable, the expiration date of the account holder's identification, in the format `YYYY-MM-DD`.
      
                Providing `date_of_expiry` increases the likelihood of a successful identity verification.
              maxLength: 10
              minLength: 10
        email:
          type: string
          description: The account holder's email address.
          maxLength: 255
        date_of_birth:
          type: string
          description: The account holder's date of birth, in the format `YYYY-MM-DD`.
          maxLength: 10
          minLength: 10
        country_of_birth:
          type: string
          description: The account holder's country of birth, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
          maxLength: 2
          minLength: 2
    UnreferencedRefundRequestIndividualCardTypeAccountHolder:
      type: object
      description: The unreferenced refund destination account holder's details.
      required:
        - type
        - first_name
        - last_name
      properties:
        type:
          type: string
          description: The type of account receiving the unreferenced refund.
          example: 'individual'
        first_name:
          type: string
          description: |
            The account holder's first name.
              
            This must be a valid legal name. The following formats for the `first_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
            - a single character
            - all non-alphabetic characters
          maxLength: 50
        middle_name:
          type: string
          description: |
            The account holder's middle name.
          maxLength: 50
        last_name:
          type: string
          description: |
            The account holder's last name.
      
            This must be a valid legal name. The following formats for the `last_name` value will return a [field validation error](https://www.checkout.com/docs/developer-resources/codes/error-codes#Field_validation_errors):
            
              - a single character
              - all non-alphabetic characters
          maxLength: 50
        billing_address:
          type: object
          description: |
            The account holder's billing address.
      
            If your company is incorporated in the United States, this field is required for all unreferenced refunds you perform.
          properties:
            address_line1:
              type: string
              description: |
                The first line of the address.
              maxLength: 200
            address_line2:
              type: string
              description: The second line of the address.
              maxLength: 200
            city:
              type: string
              description: The address city.
              maxLength: 50
              minLength: 3
            state:
              type: string
              description: The address state.
              maxLength: 3
              minLength: 2
            zip:
              type: string
              description: |
                The address ZIP or postal code.
      
                You must provide United States ZIPs in the format `00000`, or `00000-0000`.
              maxLength: 10
            country:
              type: string
              description: |
                The address country, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 2
              minLength: 2
        phone:
          type: object
          description: The account holder's phone number.
          required:
            - country_code
            - number
          properties:
            country_code:
              type: string
              description: The international dialing code for the account holder's address `country`, as an [ITU-T E.164 code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
              maxLength: 7
              minLength: 1
            number:
              type: string
              description: The digits for the phone number, not including the `country_code`.
              maxLength: 25
              minLength: 6
        identification:
          type: object
          required:
            - type
            - number
          description: |
            The account holder's identification.
      
            Providing identification details for the unreferenced refund recipient increases the likelihood of a successful unreferenced refund.
          properties:
            type:
              type: string
              description: The type of identification for the account holder.
              enum:
                - passport
                - driving_license
                - national_id
                - company_registration
                - tax_id
            number:
              type: string
              description: The account holder's identification number.
              maxLength: 25
            issuing_country:
              type: string
              description: |
                If applicable, the country that issued the account holder's identification, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
      
                Providing `issuing_country` increases the likelihood of a successful identity verification.
              maxLength: 2
              minLength: 2
            date_of_expiry:
              type: string
              description: |
                If applicable, the expiration date of the account holder's identification, in the format `YYYY-MM-DD`.
      
                Providing `date_of_expiry` increases the likelihood of a successful identity verification.
              maxLength: 10
              minLength: 10
        email:
          type: string
          description: The account holder's email address.
          maxLength: 255
        date_of_birth:
          type: string
          description: The account holder's date of birth, in the format `YYYY-MM-DD`.
          maxLength: 10
          minLength: 10
        country_of_birth:
          type: string
          description: The account holder's country of birth, as a [two-letter ISO country code](https://www.checkout.com/docs/developer-resources/codes/country-codes).
          maxLength: 2
          minLength: 2
    UnreferencedRefundRequestNameRequiredAccountHolder:
      type: object
      description: The unreferenced refund destination account holder.
      discriminator:
        propertyName: type
        mapping:
          individual: '#/components/schemas/UnreferencedRefundRequestIndividualCardTypeAccountHolder'
          corporate: '#/components/schemas/UnreferencedRefundRequestCorporateAccountHolder'
          government: '#/components/schemas/UnreferencedRefundRequestGovernmentAccountHolder'
      oneOf:
        - $ref: '#/components/schemas/UnreferencedRefundRequestIndividualCardTypeAccountHolder'
        - $ref: '#/components/schemas/UnreferencedRefundRequestCorporateAccountHolder'
        - $ref: '#/components/schemas/UnreferencedRefundRequestGovernmentAccountHolder'
      required:
        - type
      properties:
        type:
          type: string
          description: The account holder type.
    UnreferencedRefundRequestDestinationTypeCard:
      type: object
      description: The destination of the unreferenced refund.
      required:
        - type
        - number
        - expiry_month
        - expiry_year
        - account_holder
      properties:
        type:
          type: string
          description: The unreferenced refund destination type.
        number:
          type: string
          description: The card number.
          maxLength: 19
        expiry_month:
          type: integer
          description: The card's expiration month.
          maxLength: 2
          minLength: 1
        expiry_year:
          type: integer
          description: The card's expiration year.
          maxLength: 4
          minLength: 4
        account_holder:
          $ref: '#/components/schemas/UnreferencedRefundRequestNameRequiredAccountHolder'
    UnreferencedRefundRequestDestinationTypeId:
      type: object
      description: The destination of the unreferenced refund.
      required:
        - type
        - id
      properties:
        type:
          type: string
          description: The unreferenced refund destination type.
        id:
          type: string
          pattern: ^(src)_(\w{26})$
          maxLength: 30
          minLength: 30
          description: The payment source ID. This will be an ID with the prefix `src_`.
        account_holder:
          $ref: '#/components/schemas/UnreferencedRefundRequestAccountHolder'
    UnreferencedRefundRequestDestinationTypeNetworkToken:
      type: object
      description: The destination of the unreferenced refund.
      required:
        - type
        - token
        - expiry_month
        - expiry_year
        - token_type
        - account_holder
      properties:
        type:
          type: string
          description: The unreferenced refund destination type.
        token:
          type: string
          description: The network token's Primary Account Number (PAN).
          example: '4543474002249996'
        expiry_month:
          type: integer
          description: The network token's expiration month.
          minimum: 1
          example: 6
          minLength: 1
          maxLength: 2
        expiry_year:
          type: integer
          description: The network token's expiration year.
          example: 2025
          minLength: 4
          maxLength: 4
        token_type:
          type: string
          description: The network token type.
          enum:
            - vts
            - mdes
            - applepay
            - googlepay
        cryptogram:
          type: string
          description: |
            The network token's Base64-encoded cryptographic identifier (TAVV).
            
            The cryptogram is used by card schemes to validate the token verification result.
          maxLength: 50
          example: hv8mUFzPzRZoCAAAAAEQBDMAAAA=
        eci:
          type: string
          description: The network token's Electronic Commerce Indicator (ECI) security level.
          maxLength: 2
          example: '05'
        account_holder:
          $ref: '#/components/schemas/UnreferencedRefundRequestNameRequiredAccountHolder'
    UnreferencedRefundRequestDestinationTypeToken:
      type: object
      description: The destination of the unreferenced refund.
      required:
        - type
        - token
      properties:
        type:
          type: string
          description: The unreferenced refund destination type.
        token:
          type: string
          pattern: ^(tok)_(\w{26})$
          maxLength: 30
          minLength: 30
          description: The Checkout.com card token ID. This will be an ID with the prefix `tok_`.
        account_holder:
          $ref: '#/components/schemas/UnreferencedRefundRequestAccountHolder'
    UnreferencedRefundAcceptedResponse:
      title: Unreferenced Refund
      type: object
      description: Unreferenced refund accepted response
      required:
        - id
        - status
      properties:
        id:
          type: string
          description: The payment's unique identifier.
          pattern: '^(pay)_(\w{26})$'
          maxLength: 30
          minLength: 30
          example: pay_g4blr3juzouutaijarea5hejd4
        status:
          type: string
          enum:
            - Accepted
            - Rejected
            - Pending
          description: The refund status.
          example: Pending
        reference:
          type: string
          description: The reference you provided in the refund request.
          maxLength: 50
          example: REF-FQSGRB
        instruction:
          allOf:
           - $ref: '#/components/schemas/PaymentInstructionResponse'
        destination:
          type: object
          description: The refund destination.
          properties:
            account_holder:
              type: object
              description: The account holder details.
              properties:
                id:
                  type: string
                  description: The payment destination identifier (e.g., a card source identifier)
                  pattern: '^(src)_(\w{26})$'
                  minLength: 30
                  maxLength: 30
                  example: src_nwd3m4in3hkuddfpjsaevunhdy
        _links:
          type: object
          description: The links related to the refund.
          required:
            - self
          properties:
            self:
              type: object
              description: The refund URI.
              properties:
                href:
                  type: string
                  description: The link URL
                  example: https://{prefix}.api.sandbox.checkout.com/payments/pay_g4blr3juzouutaijarea5hejd4
            actions:
              type: object
              description: The refund actions URI.
              properties:
                href:
                  type: string
                  description: The link URL
                  example: https://{prefix}.api.sandbox.checkout.com/payments/pay_g4blr3juzouutaijarea5hejd4/actions 
    UnreferencedRefundRequestDestination:
      type: object
      description: The destination of the unreferenced refund.
      required:
        - type
      discriminator:
        propertyName: type
        mapping:
          token: '#/components/schemas/UnreferencedRefundRequestDestinationTypeToken'
          id: '#/components/schemas/UnreferencedRefundRequestDestinationTypeId'
          card: '#/components/schemas/UnreferencedRefundRequestDestinationTypeCard'
          network_token: '#/components/schemas/UnreferencedRefundRequestDestinationTypeNetworkToken'
      oneOf:
        - $ref: '#/components/schemas/UnreferencedRefundRequestDestinationTypeToken'
        - $ref: '#/components/schemas/UnreferencedRefundRequestDestinationTypeId'
        - $ref: '#/components/schemas/UnreferencedRefundRequestDestinationTypeCard'
        - $ref: '#/components/schemas/UnreferencedRefundRequestDestinationTypeNetworkToken'
      properties:
        type:
          type: string
          description: The unreferenced refund destination type.
          example: 'card'
    UpdateCustomerRequest:
      type: object
      description: The customer's details
      properties:
        id:
          type: string
          pattern: "^(cus)_(\\w{26})$"
          description: The identifier of an existing customer
          example: 'cus_y3oqhf46pyzuxjbcn2giaqnb44'
        default:
          type: boolean
          description: 'If true, sets this instrument as the default for the customer'
          example: true
    ValidationError:
      type: object
      properties:
        request_id:
          type: string
          example: 0HL80RJLS76I7
        error_type:
          type: string
          example: request_invalid
        error_codes:
          type: array
          items:
            type: string
            example: payment_source_required
  headers:
    Cko-Request-Id:
      description: The unique identifier of the request
      schema:
        type: string
    Cko-Version:
      description: The version of the API
      schema:
        type: string
  examples:
    adv_address_document_verification_creation_request_body:
      value:
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        declared_data:
          name: Hannah Bret
    adv_address_document_verification_creation_response_body:
      value:
        id: adv_tkoi5db4hryu5cei5vwoabr7we
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        declared_data:
          name: Hannah Bret
        status: created
        response_codes: []
        _links:
          self:
            href: 'https://identity-verification.checkout.com/address-document-verifications/adv_tkoi5db4hryu5cei5vwoabr7we'
          applicant:
            href: 'https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7we'
    adv_address_document_verification_response_body_anonymized:
      value:
        id: adv_tkoi5db4hryu5cei5vwoabr7we
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        status: approved
        response_codes:
          - code: 10000
            summary: approved
        _links:
          self:
            href: 'https://identity-verification.checkout.com/address-document-verifications/adv_tkoi5db4hryu5cei5vwoabr7we'
          applicant:
            href: 'https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7we'
    adv_attempt_creation_request_body:
      value:
        document: |
          data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD…
    adv_attempt_creation_response_body:
      value:
        id: adva_tkoi5db4hryu5cei5vwoabr7we
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        status: quality_checks_in_progress
        response_codes: []
        _links:
          self:
            href: 'https://identity-verification.checkout.com/address-document-verifications/adv_tkoi5db4hryu5cei5vwoabr7we/attempts/adva_tkoi5db4hryu5cei5vwoabr7we'
    adv_attempt_get_response_body:
      value:
        id: adva_tkoi5db4hryu5cei5vwoabr7we
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        status: completed
        response_codes:
          - code: 10000
            summary: approved
        _links:
          self:
            href: 'https://identity-verification.checkout.com/address-document-verifications/adv_tkoi5db4hryu5cei5vwoabr7we/attempts/adva_tkoi5db4hryu5cei5vwoabr7we'
    adv_attempt_list_response_body:
      value:
        total_count: 1
        skip: 0
        limit: 10
        data:
          - id: adva_tkoi5db4hryu5cei5vwoabr7we
            created_on: '2025-07-21T17:32:28Z'
            modified_on: '2025-07-21T17:40:32Z'
            status: completed
            response_codes:
              - code: 10000
                summary: approved
            _links:
              self:
                href: 'https://identity-verification.checkout.com/address-document-verifications/adv_tkoi5db4hryu5cei5vwoabr7we/attempts/adva_tkoi5db4hryu5cei5vwoabr7we'
        _links:
          self:
            href: 'https://identity-verification.checkout.com/address-document-verifications/adv_tkoi5db4hryu5cei5vwoabr7we/attempts'
    aml_verification_response_body:
      value:
        id: amlv_tkoi5db4hryu5cei5vwoabr7we
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        status: created
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        search_parameters:
          configuration_identifier: 8eb79430-c014-41e5-be73-2c2c091322b8
        monitored: false
        _links:
          self:
            href: 'https://identity-verification.checkout.com/aml-verifications/amlv_tkoi5db4hryu5cei5vwoabr7we'
          applicant:
            href: 'https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7AE'
    fav_attempt_assets_response_body:
      value:
        total_count: 2
        skip: 0
        limit: 10
        data:
          - type: face_image
            _links:
              asset_url:
                href: "https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/face_image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600"
          - type: face_video
            _links:
              asset_url:
                href: "https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/face_video.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600"
        _links:
          self:
            href: "https://identity-verification.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts/fatp_nk1wbmmczqumwt95k3v39mhbh2w/assets"
          next:
            href: "https://identity-verification.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts/fatp_nk1wbmmczqumwt95k3v39mhbh2w/assets?..."
          previous:
            href: "https://identity-verification.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts/fatp_nk1wbmmczqumwt95k3v39mhbh2w/assets?..."
    fav_attempt_creation_request_body_max:
      value:
        client_information:
          pre_selected_residence_country: "FR"
          pre_selected_language: "en-US"
        redirect_url: https://myweb.site?query-param=hello
    fav_attempt_creation_request_body_min:
      value:
        redirect_url: https://myweb.site?query-param=hello
    fav_attempt_creation_response_body:
      value:
        id: "fatp_nk1wbmmczqumwt95k3v39mhbh2w"
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        client_information:
          pre_selected_residence_country: "FR"
          pre_selected_language: "en-US"
        redirect_url: https://myweb.site?query-param=hello
        status: "pending_redirection"
        response_codes: []
        _links: 
          verification_url: 
            href: "https://idv.checkout.com/4hryu5cei5/"
          self: 
            href: "https://identity-verification.sandbox.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts/fatp_nk1wbmmczqumwt95k3v39mhbh2w"
    fav_attempt_get_response_body:
      value:
        id: "fatp_nk1wbmmczqumwt95k3v39mhbh2w"
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        redirect_url: "https://myweb.site?query-param=hello"
        status: "capture_in_progress"
        client_information:
          pre_selected_residence_country: FR
          pre_selected_language: "en-US"
        applicant_session_information:
          ip_address: "123.123.123.01"
        response_codes: []
        _links: 
          verification_url: 
            href: "https://idv.checkout.com/4hryu5cei5/"
          self: 
            href: "https://identity-verification.sandbox.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts/fatp_nk1wbmmczqumwt95k3v39mhbh2w"
    fav_attempt_list_response_body:
      value:
        total_count: 2
        skip: 10
        limit: 10
        data:
          - id: "fatp_nk1wbmmczqumwt95k3v39mhbh2w"
            created_on: 2025-07-21T17:32:28Z
            modified_on: 2025-07-21T17:40:32Z
            status: "completed"
            response_codes: []
            redirect_url: "https://myweb.site?query-param=hello"
            _links:
              verification_url:
                href: "https://idv.checkout.com/4hryu5cei5/"
              self: 
                href: "https://identity-verification.sandbox.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts/fatp_nk1wbmmczqumwt95k3v39mhbh2w"
        _links:
          self:
            href: 'https://identity-verification.sandbox.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts'
          next:
            href: 'https://identity-verification.sandbox.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts?...'
          previous:
            href: 'https://identity-verification.sandbox.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts?...'
    fav_face_authentication_creation_request_body:
      value:
        user_journey_id: usj_t5bdzsdmi57ehhkrnmp5omjimu
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
    fav_face_authentication_creation_request_invalid_body:
      value:
        error_type: request_invalid
        error_codes:
          - applicant_id_required
    fav_face_authentication_creation_response_body:
      value:
        id: fav_mtta050yudd54y5iqb5ijh8jtvz
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        status: created
        response_codes: []
        risk_labels: []
        _links:
          self:
            href: https://identity-verification.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz
          applicant:
            href: https://identity-verification.checkout.com/applicants/aplt_lkoi5db4hryu5cei5vwoabqere
    fav_face_authentication_response_body_anonymized:
      value:
        id: fav_mtta050yudd54y5iqb5ijh8jtvz
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_t5bdzsdmi57ehhkrnmp5omjimu
        status: approved
        response_codes:
          - code: 10000
            summary: approved
        risk_labels:
          - multiple_faces_detected
        _links:
          self:
            href: https://identity-verification.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz
          applicant:
            href: https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7ou
    fav_face_authentication_response_body_approved:
      value:
        id: fav_mtta050yudd54y5iqb5ijh8jtvz
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_t5bdzsdmi57ehhkrnmp5omjimu
        status: approved
        response_codes:
          - code: 10000
            summary: approved
        risk_labels:
          - multiple_faces_detected
        face:
          image_signed_url: https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/live_face/bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921946714.png?response-content-type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163223Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=2b7d87fec4f11f0df949da7beade2519cf1a51ce70fe9cc1cf0470d73f5340e4
        _links:
          self:
            href: https://identity-verification.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz
          applicant:
            href: https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7ou
    fav_face_authentication_response_body_declined:
      value:
        id: fav_mtta050yudd54y5iqb5ijh8jtvz
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_t5bdzsdmi57ehhkrnmp5omjimu
        status: declined
        response_codes:
          - code: 61412
            summary: face_not_turned
          - code: 62321
            summary: face_face_mismatch
        risk_labels:
          - multiple_faces_detected
        face:
          image_signed_url: https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/live_face/bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921946714.png?response-content-type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163223Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=2b7d87fec4f11f0df949da7beade2519cf1a51ce70fe9cc1cf0470d73f5340e4
        _links:
          self:
            href: https://identity-verification.checkout.com/face-authentications/fav_mtta050yudd54y5iqb5ijh8jtvz
          applicant:
            href: https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7ou
    fav_face_authentication_unprocessable_entity_body:
      value:
        error_type: unprocessable_entity
        error_codes:
          - organization_no_configuration
    iddv_attempt_creation_response_body:
      value:
        id: datp_tkoi5db4hryu5cei5vwoabr7we
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        status: completed
        response_codes: []
        _links:
          self:
            href: 'https://identity-verification.sandbox.checkout.com/id-document-verifications/datp_tkoi5db4hryu5cei5vwoabr7we'
    iddv_attempt_get_response_body:
      value:
        id: datp_tkoi5db4hryu5cei5vwoabr7we
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        status: completed
        response_codes: []
        _links:
          self:
            href: "https://idv.checkout.com/datp_tkoi5db4hryu5cei5vwoabr7we"
    iddv_attempt_list_response_body:
      value:
        total_count: 2  
        skip: 10
        limit: 10
        data:
        - id: datp_tkoi5db4hryu5cei5vwoabr7we
          created_on: 2025-07-21T17:32:28Z
          modified_on: 2025-07-21T17:40:32Z
          status: completed
          response_codes: []
          _links:
            self:
              href: "https://idv.checkout.com/iddv_tkoi5db4hryu5cei5vwoabr7we"
        _links:
          self:
            href: 'https://identity-verification.sandbox.checkout.com/id-document-verifications/iddv_tkoi5db4hryu5cei5vwoabr7we/attempts'
          next:
            href: 'https://identity-verification.sandbox.checkout.com/id-document-verifications/iddv_tkoi5db4hryu5cei5vwoabr7we/attempts?...'
          previous:
            href: 'https://identity-verification.sandbox.checkout.com/id-document-verifications/iddv_tkoi5db4hryu5cei5vwoabr7we/attempts?...'
    iddv_id_document_verification_attempt_creation_request_body_max:
      value:
        document_front: |
          data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD…
        document_back: |
          data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA…
    iddv_id_document_verification_attempt_creation_request_body_min:
      value:
        document_front: |
          data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD…
    iddv_id_document_verification_creation_request_body:
      value:
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        declared_data:
          name: Hannah Bret
    iddv_id_document_verification_creation_response_body:
      value:
        id: iddv_tkoi5db4hryu5cei5vwoabr7we
        created_on: "2025-07-21T17:32:28Z"
        modified_on: "2025-07-21T17:40:32Z"
        user_journey_id: "usj_tkoi5db4hryu5cei5vwoabr7we"
        applicant_id: "aplt_tkoi5db4hryu5cei5vwoabr7we"
        status: approved
        response_codes:
          - code: 10000
            summary: approved
        declared_data:
          name: "Hannah Bret"
        document:
          full_name: Hannah Bret
          birth_date: 1994-10-15
          document_type: ID
          document_issuing_country: US
          front_image_signed_url: https://storage-b.env/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/tight_crops/FRA-I5-Front-bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921906596.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163228Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=87d8467ab92cbad7c00171af28e613d495f3ff441ce0ea59dd013d68abc50555
        _links:
          self:
            href: "https://identity-verification.checkout.com/id-document-verifications/iddv_tkoi5db4hryu5cei5vwoabr7we"
          applicant:
            href: "https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7we"
    iddv_id_document_verification_response_body_anonymized:
      value:
        id: iddv_tkoi5db4hryu5cei5vwoabr7we
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        status: approved
        response_codes:
          - code: 10000
            summary: approved
        declared_data:
          name: Hannah Bret
        _links:
          self:
            href: "https://identity-verification.checkout.com/identity-verifications/iddv_tkoi5db4hryu5cei5vwoabr7we"
          applicant:
            href: "https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7we"
    idv_applicant_creation_request_body:
      value:
        external_applicant_id: ext_osdfdfdb4hryu5cei5vwoabrk5k
        email: hannah.bret@example.com
        external_applicant_name: Hannah Bret
    idv_applicant_response_body_anonymized:
      value:
        id: aplt_tkoi5db4hryu5cei5vwoabr7we
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        external_applicant_id: ext_osdfdfdb4hryu5cei5vwoabrk5k
        _links:
          self:
            href: https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7we
    idv_applicant_response_body:
      value:
        id: aplt_tkoi5db4hryu5cei5vwoabr7we
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        external_applicant_id: ext_osdfdfdb4hryu5cei5vwoabrk5k
        email: hannah.bret@example.com
        external_applicant_name: Hannah Bret
        _links:
          self:
            href: https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7we
    idv_applicant_update_request_body:
      value:
        email: hannah.bret@example.com
        external_applicant_name: Hannah Bret
    idv_attempt_assets_response_body:
      value:
        total_count: 4
        skip: 0
        limit: 10
        data:
          - type: face_image
            _links:
              asset_url:
                href: "https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/face_image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600"
          - type: face_video
            _links:
              asset_url:
                href: "https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/face_video.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600"
          - type: document_front_image
            _links:
              asset_url:
                href: "https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/document_front.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600"
          - type: document_back_image
            _links:
              asset_url:
                href: "https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/document_back.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600"
        _links:
          self:
            href: "https://identity-verification.checkout.com/identity-verifications/idv_tkoi5db4hryu5cei5vwoabr7we/attempts/iatp_tkoi5db4hryu5cei5vwoabrPoQ/assets"
          next:
            href: "https://identity-verification.checkout.com/identity-verifications/idv_tkoi5db4hryu5cei5vwoabr7we/attempts/iatp_tkoi5db4hryu5cei5vwoabrPoQ/assets?..."
          previous:
            href: "https://identity-verification.checkout.com/identity-verifications/idv_tkoi5db4hryu5cei5vwoabr7we/attempts/iatp_tkoi5db4hryu5cei5vwoabrPoQ/assets?..."
    idv_attempt_creation_request_body_max:
      value:
        client information:
          pre_selected_residence_country: "FR"
          pre_selected_language: "en-US"
        redirect_url: https://myweb.site?query-param=hello
    idv_attempt_creation_request_body_min:
      value:
        redirect_url: https://myweb.site?query-param=hello
    idv_attempt_creation_response_body:
      value:
        id: "iatp_tkoi5db4hryu5cei5vwoabrPoQ"
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        client_information:
          pre_selected_residence_country: "FR"
          pre_selected_language: "en-US"
        applicant_session_information:
          ip_address: "123.123.123.01"
        redirect_url: https://myweb.site?query-param=hello
        status: "pending_redirection"
        response_codes: []
        _links: 
          verification_url: 
            href: "https://idv.checkout.com/4hryu5cei5/"
          self: 
            href: "https://identity-verification.sandbox.checkout.com/identity-verifications/idv_01j58p8rw1hvterhqt66xn6js2/attempts/iatp_tkoi5db4hryu5cei5vwoabrPoQ"
    idv_attempt_get_response_body:
      value:
        id: "iatp_tkoi5db4hryu5cei5vwoabrPoQ"
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        redirect_url: "https://myweb.site?query-param=hello"
        status: "capture_in_progress"
        client_information:
          pre_selected_residence_country: FR
          pre_selected_language: "en-US"
        applicant_session_information:
          ip_address: "123.123.123.01"
          selected_documents:
            - country: FR
              document_type: Passport
        response_codes: []
        _links:
          self:
            href: 'https://identity-verification.sandbox.checkout.com/identity-verifications/idv_tkoi5db4hryu5cei5vwoabr7we/attempts/iatp_tkoi5db4hryu5cei5vwoabraio'
          verification_url:
            href: "https://idv.checkout.com/4hryu5cei5/"
    idv_attempt_list_response_body:
      value:
        total_count: 2
        skip: 10
        limit: 10
        data:
          - id: "iatp_tkoi5db4hryu5cei5vwoabrPoQ"
            created_on: 2025-07-21T17:32:28Z
            modified_on: 2025-07-21T17:40:32Z
            status: "completed"
            response_codes: []
            applicant_session_information:
              ip_address: "123.123.123.01"
            redirect_url: "https://myweb.site?query-param=hello"
            _links:
              verification_url:
                href: "https://idv.checkout.com/4hryu5cei5/"
        _links:
          self:
            href: 'https://identity-verification.sandbox.checkout.com/identity-verifications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts'
          next:
            href: 'https://identity-verification.sandbox.checkout.com/identity-verifications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts?...'
          previous:
            href: 'https://identity-verification.sandbox.checkout.com/identity-verifications/fav_mtta050yudd54y5iqb5ijh8jtvz/attempts?...'
    idv_identity_verification_creation_helper_request_body_max:
      value:
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        declared_data:
          name: Hannah Bret
        redirect_url: https://myweb.site?query-param=hello
    idv_identity_verification_creation_helper_request_body_min_plus_aplt:
      value:
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        declared_data:
          name: Hannah Bret
        redirect_url: https://myweb.site?query-param=hello
    idv_identity_verification_creation_helper_request_body_min:
      value:
        declared_data:
          name: Hannah Bret
        redirect_url: https://myweb.site?query-param=hello
    idv_identity_verification_creation_helper_response_body:
      value:
        id: idv_tkoi5db4hryu5cei5vwoabr7we
        created_on: 2025-07-21T17:32:28Z
        modified_on: 2025-07-21T17:40:32Z
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        status: pending
        response_codes: []
        risk_labels: []
        declared_data:
          name: Hannah Bret
        documents: []
        redirect_url: https://myweb.site?query-param=hello
        _links:
          self:
            href: "https://identity-verification.checkout.com/identity-verifications/idv_tkoi5db4hryu5cei5vwoabr7we"
          verification_url:
            href: "https://idv.checkout.com/4hryu5cei5/"
    idv_identity_verification_creation_request_body_max:
      value:
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        declared_data:
          name: Hannah Bret
        redirect_url: https://example.com?query-param=hello
    idv_identity_verification_creation_request_body_min:
      value:
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        declared_data:
          name: Hannah Bret
        redirect_url: https://example.com?query-param=hello
    idv_identity_verification_creation_request_invalid_body:
      value:
        error_type: request_invalid
        error_codes:
          - declared_data__name__required
    idv_identity_verification_creation_response_body:
      value:
        id: idv_tkoi5db4hryu5cei5vwoabr7we
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        status: pending
        response_codes: []
        risk_labels: []
        declared_data:
          name: Hannah Bret
        documents:
          - full_name: Hannah Bret
            birth_date: '1934-10-02'
            document_type: ID
            document_issuing_country: US
            front_image_signed_url: https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/tight_crops/FRA-I5-Front-bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921906596.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163228Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=87d8467ab92cbad7c00171af28e613d495f3ff441ce0ea59dd013d68abc50555
        _links:
          self:
            href: https://identity-verification.checkout.com/identity-verifications/idv_tkoi5db4hryu5cei5vwoabr7we
          applicant:
            href: https://identity-verification.checkout.com/applicants/aplt_lkoi5db4hryu5cei5vwoabqere
    idv_identity_verification_pdf_response_body:
      value:
        pdf_report: https://www.example.com/pdf
        signed_url: https://www.example.com/signed/pdf
    idv_identity_verification_response_body_anonymized:
      value:
        id: idv_tkoi5db4hryu5cei5vwoabr7we
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        status: approved
        response_codes:
          - code: 10000
            summary: approved
        risk_labels:
          - multiple_faces_detected
        declared_data:
          name: Hannah Bret
        documents:
          - full_name: Hannah Bret
            birth_date: '1934-10-02'
            document_type: ID
            document_issuing_country: US
            front_image_signed_url: https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/tight_crops/FRA-I5-Front-bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921906596.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163228Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=87d8467ab92cbad7c00171af28e613d495f3ff441ce0ea59dd013d68abc50555
        _links:
          self:
            href: https://identity-verification.checkout.com/identity-verifications/idv_tkoi5db4hryu5cei5vwoabr7we
          applicant:
            href: https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7ou
    idv_identity_verification_response_body_approved:
      value:
        id: idv_tkoi5db4hryu5cei5vwoabr7we
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        status: approved
        response_codes:
          - code: 10000
            summary: approved
        risk_labels:
          - multiple_faces_detected
        verified_identity:
          full_name: Hannah Bret
          birth_date: '1934-10-02'
        declared_data:
          name: Hannah Bret
        documents:
          - full_name: Hannah Bret
            birth_date: '1934-10-02'
            document_type: ID
            document_issuing_country: US
            front_image_signed_url: https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/tight_crops/FRA-I5-Front-bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921906596.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163228Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=87d8467ab92cbad7c00171af28e613d495f3ff441ce0ea59dd013d68abc50555
        face:
          image_signed_url: https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/live_face/bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921946714.png?response-content-type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163223Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=2b7d87fec4f11f0df949da7beade2519cf1a51ce70fe9cc1cf0470d73f5340e4
        _links:
          self:
            href: https://identity-verification.checkout.com/identity-verifications/idv_tkoi5db4hryu5cei5vwoabr7we
          applicant:
            href: https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7ou
    idv_identity_verification_response_body_declined:
      value:
        id: idv_tkoi5db4hryu5cei5vwoabr7we
        created_on: '2025-07-21T17:32:28Z'
        modified_on: '2025-07-21T17:40:32Z'
        applicant_id: aplt_tkoi5db4hryu5cei5vwoabr7we
        user_journey_id: usj_tkoi5db4hryu5cei5vwoabr7we
        status: declined
        response_codes:
          - code: 61310
            summary: document_front_not_captured
          - code: 62102
            summary: document_not_accepted
        risk_labels:
          - multiple_faces_detected
        declared_data:
          name: Hannah Bret
        documents:
          - full_name: Hannah Bret
            birth_date: '1934-10-02'
            document_type: ID
            document_issuing_country: US
            front_image_signed_url: https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/tight_crops/FRA-I5-Front-bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921906596.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163228Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=87d8467ab92cbad7c00171af28e613d495f3ff441ce0ea59dd013d68abc50555
        face:
          image_signed_url: https://storage-b.env.ubble.ai/ubble-ai/NDYOOVHGZPAQ/a54b3393-f02a-47c9-a9c5-2f6ee73560e1/bb603e2f-5de9-40f2-9631-8285a33c24c0/live_face/bb603e2f-5de9-40f2-9631-8285a33c24c0-1679921946714.png?response-content-type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=V9jgOdpOdeVSFTkA4ZsG%2F20230327%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230327T163223Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=2b7d87fec4f11f0df949da7beade2519cf1a51ce70fe9cc1cf0470d73f5340e4
        _links:
          self:
            href: https://identity-verification.checkout.com/identity-verifications/idv_tkoi5db4hryu5cei5vwoabr7we
          applicant:
            href: https://identity-verification.checkout.com/applicants/aplt_tkoi5db4hryu5cei5vwoabr7ou
    idv_identity_verification_unprocessable_entity_body:
      value:
        error_type: unprocessable_entity
        error_codes:
          - organization__no_configuration
    PaymentResponse:
      value:
                      id: 'pay_mbabizu24mvu3mela5njyhpit4'
                      action_id: 'act_mbabizu24mvu3mela5njyhpit4'
                      amount: 6540
                      currency: 'USD'
                      approved: true
                      status: 'Authorized'
                      auth_code: '770687'
                      response_code: '10000'
                      response_summary: 'Approved'
                      3ds:
                        downgraded: true
                        enrolled: 'N'
                      risk:
                        flagged: true
                      source:
                        type: 'card'
                        id: 'src_nwd3m4in3hkuddfpjsaevunhdy'
                        billing_address:
                          address_line1: '123 High St.'
                          address_line2: 'Flat 456'
                          city: 'London'
                          state: 'GB'
                          zip: 'SW1A 1AA'
                          country: 'GB'
                        phone:
                          country_code: '+1'
                          number: '415 555 2671'
                        scheme: 'Visa'
                        last4: '6584'
                        fingerprint: 'B16D9C2EF0C861A8825C9BD59CCE9171D84EBC45E89CC792B5D1D2D0DDE3DAB7'
                        bin: '448504'
                        card_type: 'CREDIT'
                        card_category: 'COMMERCIAL'
                        issuer: 'GE CAPITAL FINANCIAL, INC.'
                        issuer_country: 'US'
                        product_type: 'PURCHASING'
                        avs_check: 'G'
                        cvv_check: 'Y'
                        payment_account_reference: 'V001898055688657091'
                      customer:
                        id: 'cus_udst2tfldj6upmye2reztkmm4i'
                        email: 'johnsmith@example.com'
                        name: 'John Smith'
                        phone:
                          country_code: '+1'
                          number: '415 555 2671'
                      processed_on: '2019-09-10T10:11:12Z'
                      reference: 'ORD-5023-4E89'
                      processing:
                        retrieval_reference_number: '909913440644'
                        acquirer_transaction_id: '440644309099499894406'
                        recommendation_code: "02"
                        partner_order_id: "5GK24544NA744002L"
                      eci: '06'
                      scheme_id: '489341065491658'
                      _links:
                        self:
                          href: 'https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4'
                        actions:
                          href: 'https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions'
                        void:
                          href: 'https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/voids'
                        capture:
                          href: 'https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/captures'
  parameters:
    ckoIdempotencyKey:
      in: header
      name: Cko-Idempotency-Key
      schema:
        type: string
      required: false
      description: An optional idempotency key for safely retrying payment requests
    ckoIdempotencyKeyRequired:
      in: header
      name: Cko-Idempotency-Key
      schema:
        type: string
      required: true
      description: An idempotency key for safely retrying transfer requests
    EntityId:
      name: id
      in: path
      description: The ID of the entity.
      required: true
      allowEmptyValue: false
      example: ent_w4jelhppmfiufdnatam37wrfc4
      style: simple
      schema:
        type: string
    IssuingCkoIdempotencyKey:
      in: header
      name: Cko-Idempotency-Key
      schema:
        type: string
        minLength: 1
        maxLength: 256
        pattern: '^[A-Za-z0-9._-]+$'
      required: false
      description: An optional idempotency key for safely retrying Issuing requests.
      example: 7c1b9f96-4f2e-4b1a-bc2b-3d0f1a2e9f3a
    IssuingCkoIdempotencyKeyRequired:
      in: header
      name: Cko-Idempotency-Key
      schema:
        type: string
        minLength: 1
        maxLength: 256
        pattern: '^[A-Za-z0-9._-]+$'
      required: true
      description: An idempotency key for safely retrying requests.
      example: 7c1b9f96-4f2e-4b1a-bc2b-3d0f1a2e9f3a
    Query:
      name: query
      in: query
      description: The query to apply to limit the currency accounts.
      required: false
      allowEmptyValue: false
      example: currency:EUR
      style: form
      schema:
        type: string
  securitySchemes:
    ApiPublicKey:
      description: |
        Public keys are for client-side authentication and supported only in JavaScript or native applications.
          
        #### Format
      
        - Sandbox – `pk_sbox_xxxxxxxxxxxxxxxxxxxxxxxxxx`
      
        - Production – `pk_xxxxxxxxxxxxxxxxxxxxxxxxxx`
      
        When specifying your public key, use the format `Bearer {{PublicApiKey}}`.
      
      name: Authorization
      type: apiKey
      in: header
      x-cko-type: publicKey
    ApiSecretKey:
      description: |
        You can pass your secret API key in the `Authorization` header of your requests for supported endpoints.
      
        #### Format
      
        - Sandbox – `sk_sbox_xxxxxxxxxxxxxxxxxxxxxxxxxx`
      
        - Production – `sk_xxxxxxxxxxxxxxxxxxxxxxxxxx`
      
        When specifying your secret key, use the format `Bearer {{SecretApiKey}}`.
      
        ```
        curl --location --request POST 'https://{prefix}.api.checkout.com/{{path}}' \
        --header 'Content-Type: application/json' \
        --header 'Accept: application/json' \
        --header 'Authorization: Bearer {{SecretApiKey}}' \
        --data-raw '{
        "amount": 10000,
        "currency": "USD",
        "reference": "Visa-USD-Test",
        ...
        }'
        ```
      
       
      
      name: Authorization
      type: apiKey
      in: header
      x-cko-type: secretKey
    OAuth:
      type: oauth2
      description: |
        Your OAuth credentials include an access key ID and an access key secret. They correspond to an OAuth 2.0 client ID and a client secret respectively. 
        
        To exchange these credentials for an access token, call the [Request an access token](#operation/requestAnAccessToken) endpoint. Authenticate using basic authentication, with your access key ID as the username and your access key secret as the password.
      
        | Environment   |      Authorization server                            |
        |---------------|------------------------------------------------------|
        | Sandbox       |  https://{prefix}.access.sandbox.checkout.com/connect/token   |
        | Production    |  https://{prefix}.access.checkout.com/connect/token           |
      
        ```
        curl --location 'https://{prefix}.access.checkout.com/connect/token' \
        --header 'Content-Type: application/x-www-form-urlencoded' \
        --data-urlencode 'grant_type=client_credentials' \
        --data-urlencode 'client_id=ack_...' \
        --data-urlencode 'client_secret=...' 
        ```
      
        The token server returns a Bearer `access_token` in JSON Web Token (JWT) format. Use this token in the `Authorization` header of your API requests.
      
        ```
        curl --location --request POST 'https://{prefix}.api.checkout.com/{{path}}' \
        --header 'Content-Type: application/json' \
        --header 'Accept: application/json' \
        --header 'Authorization: Bearer {{AccessToken}}' \
        --data-raw '{
          "amount": 10000,
          "currency": "USD",
          "reference": "Visa-USD-Test",
          ...
        }'
        ```
      
        The `expires_in` field in the response indicates the validity period of your access token in seconds. When your token expires, you must request a new one.
      
        Depending on the Environment against which you're making your requests against you'll need to request the token from a different Authorization Server.
      
        | Environment   |      Authorization Server                            |
        |---------------|------------------------------------------------------|
        | Sandbox       |  https://{prefix}.access.sandbox.checkout.com/connect/token   |
        | Production    |  https://{prefix}.access.checkout.com/connect/token           |
      
        Your base URL `{prefix}` is unique. To learn how to retrieve your unique base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints).
      
      flows:
        clientCredentials:
          tokenUrl: string
          scopes:
            vault: Access to all Vault resources
            'vault:apme-enrollment': Manage Apple Pay Domain Enrollment
            'vault:customers': Manage customers
            'vault:card-metadata': Read card metadata
            'vault:instruments': Create instruments
            'vault:network-tokens': Manage network tokens
            'vault:tokenization': Tokenize payment instruments
            'vault:real-time-account-updater': Access to real-time account updater
            gateway: Access to all Gateway resources
            'gateway:payment': Request payments
            'gateway:payment-details': Get payment details
            'gateway:payment-authorizations': Increment authorizations
            'gateway:payment-voids': Void payments
            'gateway:payment-captures': Capture payments
            'gateway:payment-contexts': Manage payment contexts
            'gateway:payment-cancellations': Manage payment cancellations
            'gateway:payment-refunds': Refund payments
            'fx': Foreign exchange services
            'payouts:bank-details': Get bank details
            'sessions:app': App-based authentication
            'sessions:browser': Browser-based authentication
            disputes: Access to all Disputes resources
            'disputes:view': View disputes
            'disputes:provide-evidence': Provide dispute evidence
            'disputes:accept': Accept disputes
            'disputes:scheme-files': Read dispute scheme files
            accounts: Manage sub-entities
            flow: Access to all Flow resources
            'flow:workflows': Manage workflows
            'flow:events': Retrieve events
            'flow:reflow': Manage workflows
            files: Access to all Files resources
            'files:retrieve': Retrieve files
            'files:upload': Upload files
            'files:download': Download files
            forward: Access to Forward api
            'forward:secrets': Manage secrets in Forward api
            balances: Access to all Balances resources
            'balances:view': View balances
            transfers: Access to all Transfers resources
            'transfers:view': View transfers
            'transfers:create': Create transfers
            middleware: Access to all Middleware resources
            'middleware:merchants-secret': Allows merchant identity and Middleware token exchange from a secure execution environment
            'middleware:merchants-public': Allows merchant identity and Middleware token exchange from an insecure execution environment
            payment-sessions: Access to all Payment Sessions resources
            'payments:search': Search payments
            reports: Access to all Reports resources
            'reports:view': View reports
            financial-actions: Access to all Financial actions resources
            'financial-actions:view': View financial actions
            card-management: Access to all Card management resources
            'issuing:card-management-read': Gives access to card management endpoints with GET operations
            'issuing:card-management-write': Gives access to card management endpoints with POST/ PUT / DELETE operations
            'issuing:controls-read': Gives access to card control endpoints with GET operations
            'issuing:controls-write': Gives access to card control endpoints with POST/ PUT / DELETE operations
            transactions: Access to all transactions resources
            'issuing:transactions-read': Gives access to get and search transactions
            'issuing:transactions-write': Gives access to simulate transactions for testing purposes
            issuing-disputes: Access to Issuing disputes resources
            'issuing:disputes-read': Gives access to get disputes
            'issuing:disputes-write': Gives access to create and submit Issuing disputes
            identity-verification: Access to all Identities endpoints
            'Payment Context': Read payment context
    SessionSecret:
      name: Authorization
      type: apiKey
      in: header
      description: >
        A base64 encoded value prefixed with `sek_` that gives access to client-side operations for a single authentication within the Sessions API. This value is returned as the `session_secret` when requesting a session.
