openapi: 3.0.0
servers:
  - url: https://sandbox-api.ryftpay.com/v1
    description: Sandbox environment
  - url: https://api.ryftpay.com/v1
    description: Production environment
info:
  version: 1.1.0
  title: Ryft Payment API
  contact:
    name: Ryft
    email: support@ryftpay.com
    url: https://ryftpay.com
  description: >
    Ryft provides a collection of APIs that you can use to accept and process
    payments + marketplace functionality (payouts). We have a testing
    environment called sandbox, which you can sign up for to test API calls
    without affecting live data.


    # Authentication


    When you sign up for an account, you are given a secret and public API key
    pair. You authenticate with our API by providing the appropriate key in the
    request Authorization header. Never share your secret keys. Keep them
    guarded and secure.


    ## Public API key


    Public keys should only be used in JavaScript or native applications.

    This key is solely used to identify the partner making requests.

    Supply this key in the `Authorization` header.


    ## Secret API key


    Your secret key should always be supplied in the `Authorization` header.
    Make sure this key is stored securely on your backend and never surfaced
    client-side.


    # Rate Limiting


    We use rate limiting on a per-user basis to protect our APIs against abuse.

    Our Sandbox environment is limited to 5 requests per second.

    Our production environment is limited to 50 requests per second.


    We also allow a brief burst above this limit to accommodate a sudden
    increase in traffic.


    If you exceed the above quota then the API will respond with a 429 status
    code and you will need to retry the API call (we recommend implementing a
    retry policy with an exponential back-off).
tags:
  - name: Payments
    description: |
      Process payments with Ryft: authorizations, voids, captures, refunds etc.
  - name: Webhooks
    description: >-
      Create and manage webhooks.

      ### Signatures

      As an additional security measure, you can verify the integrity of any
      webhook event you receive by checking the signature we provide within the
      `Signature` header. To do this simply take the webhook endpoint secret and
      `HMAC-SHA256` the request body. If the signatures are not equal then you
      may want to discard the message.

      ### Retry Policy

      If your webhook URL begins to fail we will start our retry mechanism. For
      each failing event we immediately retry several times before then retrying
      with an increasing delay until we've exhausted the maximum number of
      attempts.

      Each retry happens after (0, 1, 5, 10, 10, 10 minutes)
  - name: Events
    description: >
      Events are persisted throughout the lifecycle of a payment/action as you
      use our API. We use events to notify you when something important happens
      in your account (or a linked sub account). The most commonly used event
      occurs when a payment is captured, in which case we persist a
      `PaymentSession.captured` event and then (optionally) send it to any
      webhooks you have registered that are listening for that event type.


      Note that if you are taking payments as a platform (for sub accounts),
      events are saved against the sub account `accountId`, but will be sent to
      any webhooks that your account has configured.
  - name: Accounts
    description: Account registration for your sub accounts
  - name: Persons
    description: >
      The Persons API allows the creation and management of one or more persons
      for the purpose of verification for `Business` sub accounts. Recommended
      if you wish to implement verification programmatically for your sub
      accounts. This API cannot be accessed for `Individual` sub accounts.
  - name: Payout Methods
    description: >
      The Payout Methods API allows the creation and management of payout
      methods for use when receiving payouts, e.g. bank accounts. Recommended if
      you wish to implement payouts programmatically for your sub accounts.
  - name: Payouts
    description: >
      A payout represents the transfer of money from Ryft to a connected payout
      method (bank account), i.e. when we send money you're owed. Typically this
      is automated.


      However, the payouts API allows you to explicitly create payouts for your
      sub accounts. Generally we'd recommend this if you are a marketplace who
      wants to control exactly when payouts should be sent out.
  - name: Transfers
    description: >
      A Transfer represents the movement of money between Ryft accounts.


      This API allows platforms/marketplaces to transfer money from/to
      particular sub accounts, useful when:
       - you owe a sub account money from a particular transaction and want to explicitly send it after the fact
       - you want to recoup funds from a sub account, such as when dealing with disputes
       - you want to collect additional/new commission from the sub account
  - name: Balances
    description: >
      The balances API allows you to view your own or a particular sub accounts
      balances in real-time.


      Typically useful when making use of manual payouts or our transfers API so
      you can determine the funds available prior to initiating requests.
  - name: Balance Transactions
    description: >
      Allows you to query for balance transactions. These transactions represent
      all actions within a Ryft account that impact account balances.


      This API can only be used for reconciliation on transactions created from
      July 2025 onwards
  - name: Conversions
    description: >
      Convert funds held in one currency into another using foreign exchange
      (FX).
  - name: Account Links
    description: >
      Generate temporary account link URLs to our portal for your sub accounts
      to register and configure their payout details. This API can only be
      accessed for `Hosted` sub accounts.
  - name: Platform Fees
    description: >-
      Query any platform fees that your account has taken (when taking payments
      on behalf of linked sub accounts)
  - name: Customers
    description: >
      The Customers API allows you to persist customer details across sessions.
      You should use this if you wish to support saving a customer's payment
      methods and thereby enabling them to reuse previously entered details for
      future payments.
  - name: Payment Methods
    description: >
      The Payment Methods API allows you to tokenize and store previously used
      payment methods.
  - name: Subscriptions
    description: >
      The subscriptions API allows you to automatically have Ryft schedule and
      charge recurring payments for a specific day and time. This API is not
      required to process recurring payments. After additional configuration,
      you can use our payment-sessions API to create and charge the recurring
      payments yourself.
  - name: Files
    description: >
      The Files API allows you to query for and upload files to Ryft. Some files
      may be generated internally by Ryft when requesting reports, or
      alternatively you may have uploaded evidence/verification documents
  - name: Apple Pay
    description: >
      Allows implementation of Apple Pay on the web via the API with Ryft's
      Apple Pay processing certificate.
  - name: Disputes
    description: >
      Disputes (also known as chargebacks) occur when a cardholder wants to
      query or challenge a transaction on their card statement. The Disputes API
      allows you to keep track of and manage disputes.
  - name: In-Person Products
    description: >
      The in-person products API allows you query for the products we offer for
      in-person payments. Useful to view and decide which SKUs you wish to
      order.

      Note that products themselves cannot be ordered. You must select one or
      more SKUs to purchase equipment.
  - name: In-Person SKUs
    description: >
      The in-person SKUs API allows you query for the SKUs we offer for
      in-person payments. SKUs are ultimately the items you order when
      purchasing equipment. Each SKU is scoped to a specific country and
      currency.
  - name: In-Person Orders
    description: >
      The in-person orders API allows you to request physical terminal orders to
      specific locations. Used in combination with our terminal API you can
      integrate in-person (card present) payments.
  - name: In-Person Locations
    description: >
      The in-person locations API allows you to setup and manage the locations
      in which terminals reside.
  - name: In-Person Terminals
    description: >
      The in-person terminals API allows you to setup and manage your physical
      terminal hardware for in-person (card present) payments.
paths:
  /payment-sessions:
    post:
      operationId: paymentSessionCreate
      tags:
        - Payments
      summary: Create a new payment session
      description: >-
        The start of the payment flow. Call this request once the customer has
        proceeded to checkout. Payment Sessions will auto-expire after several
        days if you don't take payment via the `attempt-payment` endpoint.
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          required: false
          examples:
            with-sub-account:
              value: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
              summary: >-
                Specify an account ID to route the payment to a specific sub
                account
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          $ref: '#/components/responses/CreatePaymentSessionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
      requestBody:
        $ref: '#/components/requestBodies/PaymentSessionRequest'
    get:
      operationId: paymentSessionGetBetweenTimestamps
      tags:
        - Payments
      summary: Retrieve payment sessions between timestamps
      description: >-
        This is used to fetch payment sessions within a timestamp range,
        paginated
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
        - name: startTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641859200
          description: >-
            The timestamp when to return payment sessions from (inclusive), it
            must be before the endTimestamp. If not provided it will default to
            midnight on the current date (UTC).
          required: false
        - name: endTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641945599
          description: >-
            The timestamp when to return payment sessions up to (inclusive), it
            must be after the startTimestamp. If not provided it will default to
            the current time (UTC).
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the payment sessions
            are returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `50`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: ps_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify the payment session to start querying after.
            This is most commonly used to get the next page of results after a
            previous response did not return all payment sessions, due to the
            imposed `limit`. The value of the `paginationToken` field from that
            response should be supplied here as `startsAfter`, to retrieve the
            next page of results for that timestamp range.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the payment sessions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSessions'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /payment-sessions/{paymentSessionId}:
    get:
      operationId: paymentSessionGet
      tags:
        - Payments
      summary: Retrieve a payment session by Id
      description: This is used to fetch a payment session by its paymentSessionId
      parameters:
        - name: paymentSessionId
          in: path
          description: Payment Id to retrieve
          required: true
          schema:
            type: string
            pattern: ^ps_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given paymentSessionId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSession'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    patch:
      operationId: paymentSessionUpdate
      tags:
        - Payments
      summary: Update a payment session by Id
      description: >-
        This is used to update a payment session by its Id. Note that this can
        only be used prior to a successful payment. Once payment has been
        approved, you cannot update a PaymentSession.
      parameters:
        - name: paymentSessionId
          in: path
          description: Payment Id to update
          required: true
          schema:
            type: string
            pattern: ^ps_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/UpdatePaymentSessionRequest'
      responses:
        '200':
          description: Successfully retrieved the given paymentSessionId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSession'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /payment-sessions/attempt-payment:
    post:
      operationId: paymentSessionAttemptPayment
      tags:
        - Payments
      summary: Initiate a payment attempt
      description: >-
        This is used to supply the card you have collected from the customer to
        pay for this payment session. Only call this endpoint from your
        front-end once you have collected the customer's card details.


        If you want the lowest PCI burden we recommend using our embedded
        payment forms in place of this endpoint. This ensures Ryft store &
        transmit the card details securely from our servers rather than your
        own. Please contact your account manager if you want to opt for this.
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - publicApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttemptPaymentRequestBody'
            examples:
              with-card:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  cardDetails:
                    number: '4444333322221111'
                    expiryMonth: '10'
                    expiryYear: '2024'
                    cvc: '100'
              with-card-and-save:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  cardDetails:
                    number: '4444333322221111'
                    expiryMonth: '10'
                    expiryYear: '2024'
                    cvc: '100'
                  paymentMethodOptions:
                    store: true
              with-saved-payment-method:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  paymentMethod:
                    id: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
              with-google-pay-token:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  walletDetails:
                    type: GooglePay
                    googlePayToken: >-
                      {"signature":"MEYCIQCOjFuUGDkyieeJCQkm23qMSsQtGRjjVcWuAEHjdcGtNH+fx9GD342jNa","intermediateSigningKey":{"signedKey":"{\"keyValue\":\"MFkwEjHIVnhmXEs2OjgvsLYCuiwXttkLpM5EFA3snvzPBUzT9hFeUuPCBTyP+83vbpNo5WFqjObGuVj3EFYRa0bGQ0+4ZYlk16tk4cGqVliuD2VS+ooPiDzztKahTj3tNicjyUjpD7AxiMPf/RHsHTlXs+m79EibjQxyE/CjlqrwfA3qpxJpdkt/ihS8JlVhQP8d/gnV/Get36o02gZc/F9s7kfG6Ur/rZ0Nf5F0yVCfZfgYCIeEPE415sjm0yJehlmVJ+iWrsdoUjrTlDfNqUj8m44vfxyrmTbk2HaAgy+LWyu0DtBFHtQsecZpGyYLGbiTRbL/F6wXEZEcM9W8lFy7pNtyx2FpvGFKPOnM8hAEhJ6OkDHMNmBSZWoqY9PLeVeXvbuW9KdKzHeGkFQmsypKBrkT5XDmP49AFAnaGyVfvtBunLdt4SrPqJgSpvLdBhvOwHNQRSAaaUx6xBQqEecVAZF/fdwpcMXc2Mc\",\"ephemeralPublicKey\":\"BEPsTEoiu6nyicBC9EhvTE45t8+IxjiKiifT/tmytIhn+O6d+cGSuiSmzeg1k1X0xZqr...",\"tag\":\"pDKKl7MBNL+CnyrY6XB8E/T6hbbnEo8q4\\u003d\"}"}
              with-apple-pay-token:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  walletDetails:
                    type: ApplePay
                    applePayToken: >-
                      eyJ2ZXJzaW9uIjoiRUNfdjEiLCJkYXRhIjoiN21Fay9BSGh2OXJzSmM1K0NFbVhRaERHaHZCMjViaDFxb0hTZmVVWHpiNFA5Nk5ieWd6alV3ZnR3RXJUYmRhQ3FFMXFi......
              with-billing-address-included:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  cardDetails:
                    number: '4444333322221111'
                    expiryMonth: '10'
                    expiryYear: '2024'
                    cvc: '100'
                  billingAddress:
                    firstName: Fox
                    lastName: Mulder
                    lineOne: Stonehenge
                    postalCode: SP4 7DE
                    city: Salisbury
                    country: GB
              with-shipping-details-included:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  cardDetails:
                    number: '4444333322221111'
                    expiryMonth: '10'
                    expiryYear: '2024'
                    cvc: '100'
                  shippingDetails:
                    address:
                      firstName: Fox
                      lastName: Mulder
                      lineOne: Stonehenge
                      postalCode: SP4 7DE
                      city: Salisbury
                      country: GB
                    phoneNumber: '+447900000000'
              with-customer-included:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  cardDetails:
                    number: '4444333322221111'
                    expiryMonth: '10'
                    expiryYear: '2024'
                    cvc: '100'
                  customerDetails:
                    email: example@mail.com
              with-three-ds-request-details:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  cardDetails:
                    number: '4444333322221111'
                    expiryMonth: '10'
                    expiryYear: '2024'
                    cvc: '100'
                  threeDsRequestDetails:
                    deviceChannel: Browser
                    browserDetails:
                      acceptHeader: application/json,text/plain,text/html,*/*
                      colorDepth: 24
                      javaEnabled: true
                      language: en-GB
                      screenHeight: 900
                      screenWidth: 1440
                      timeZoneOffset: -120
                      userAgent: >-
                        Mozilla/5.0 (Windows NT 10.0; Win64; x64)
                        AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0
                        Safari/537.36
      responses:
        '200':
          description: >-
            Request ok, check the 'status' field to determine if the payment was
            successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSession'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /payment-sessions/continue-payment:
    post:
      operationId: paymentSessionContinuePayment
      tags:
        - Payments
      summary: Continue taking payment after the initial attempt.
      description: >-
        Submit additional data for payment sessions that require further action
        after using `attempt-payment`.

        **Note** that our SDKs handle this step automatically.
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - publicApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContinuePaymentRequestBody'
            examples:
              submit-3ds-fingerprint-result:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  threeDs:
                    fingerprint: >-
                      ewogICJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ICI4ZjAxNzdhNC0yY2VkLTQ4NjUtODViNy1iYWQ5YmZhMzk4ZDIiLAogICJ0aHJlZURTQ29tcEluZCI6IlkiCn0=
              submit-3ds-challenge-result:
                value:
                  clientSecret: >-
                    ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
                  threeDs:
                    challengeResult: ewogICJ0cmFuc1N0YXR1cyI6IlkiCn0=
      responses:
        '200':
          description: >-
            Request ok, check the 'status' field to determine if the payment was
            successful. If `status` remains in `PendingAction` then further
            action is required before the payment can be authorized. Check the
            `requiredAction` field for the next step.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicPaymentSession'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /payment-sessions/{paymentSessionId}/transactions:
    get:
      operationId: paymentSessionListTransactions
      tags:
        - Payments
      summary: List payment transaction(s)
      description: List the transaction(s) for a particular payment
      parameters:
        - name: paymentSessionId
          in: path
          description: Payment Id to list transactions for
          required: true
          schema:
            type: string
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
        - name: startTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641859200
          description: >-
            The timestamp when to return transactions from (inclusive). If
            provided, `endTimestamp` must also be provided.
          required: false
        - name: endTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641945599
          description: >-
            The timestamp when to return transactions up to (inclusive). If
            provided, `startTimestamp` must also be provided.
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the transactions are
            returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `50`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: txn_01FCTS1XMKH9FF43CAFA4CXT3P_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to identify the item to start querying after. This is most
            commonly used to get the next page of results after a previous
            response did not return all items, due to the imposed `limit`. The
            value of the `paginationToken` field from that response should be
            supplied here as `startsAfter`, to retrieve the next page of results
            for that timestamp range.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Request Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentTransactions'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /payment-sessions/{paymentSessionId}/transactions/{paymentTransactionId}:
    get:
      operationId: paymentSessionGetTransactionById
      tags:
        - Payments
      summary: Retrieve a payment transaction
      description: Retrieve the transaction for a particular payment
      parameters:
        - name: paymentSessionId
          in: path
          description: Payment Id that the transaction is under
          required: true
          schema:
            type: string
        - name: paymentTransactionId
          in: path
          description: Payment transaction Id to retrieve
          required: true
          schema:
            type: string
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Request Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentTransaction'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /payment-sessions/{paymentSessionId}/captures:
    post:
      operationId: paymentSessionCaptureById
      tags:
        - Payments
      summary: Manually capture a payment session
      description: >-
        Call this endpoint to capture funds you have previously authorized on a
        payment session.

        You can only call this endpoint when the payment session is in status
        `Approved` and its `captureFlow` value is `Manual`.
      parameters:
        - name: paymentSessionId
          in: path
          description: Payment Id to update
          required: true
          schema:
            type: string
            pattern: ^ps_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CapturePaymentRequestBody'
            examples:
              with-partial-amount:
                value:
                  amount: 50
              multi-capture-notfinal:
                value:
                  amount: 50
                  captureType: NotFinal
              split-payments:
                value:
                  splits:
                    items:
                      - accountId: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
                        amount: 50
                        fee:
                          amount: 5
                        metadata:
                          productId: '123'
                      - accountId: ac_b83f2653-06d7-44a9-a548-5825e8186004
                        amount: 250
                        description: 2x The Big Gundown
                        fee:
                          amount: 20
                        metadata:
                          productId: '321'
              split-payments-book-fees-to-sub-account:
                value:
                  splits:
                    items:
                      - accountId: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
                        amount: 50
                        fee:
                          amount: 5
                        metadata:
                          productId: '123'
                  settings:
                    platform:
                      paymentFees:
                        combined:
                          bookTo: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
              split-payments-book-fees-to-multiple-sub-account:
                value:
                  splits:
                    items:
                      - accountId: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
                        amount: 50
                        fee:
                          amount: 5
                        metadata:
                          productId: '123'
                      - accountId: ac_bd3dc1e4-a963-44a3-9c6f-38b94fb4f547
                        amount: 100
                        fee:
                          amount: 5
                        metadata:
                          productId: '123'
                  settings:
                    platform:
                      paymentFees:
                        interchange:
                          bookTo: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
                        network:
                          bookTo: ac_bd3dc1e4-a963-44a3-9c6f-38b94fb4f547
                        miscPassThrough:
                          bookTo: ac_bd3dc1e4-a963-44a3-9c6f-38b94fb4f547
      responses:
        '202':
          $ref: '#/components/responses/CaptureResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /payment-sessions/{paymentSessionId}/voids:
    post:
      operationId: paymentSessionVoidById
      tags:
        - Payments
      summary: Void a payment session
      description: >-
        Call this endpoint to void a payment session currently awaiting manual
        capture.

        This will reverse the amount authorized on the payment and return it to
        the customer. If voided on the same-day, the transaction will not show
        up on the customer's card statement(s).

        You can only call this endpoint when the payment session is in status
        `Approved` and its `captureFlow` value is `Manual`.
      parameters:
        - name: paymentSessionId
          in: path
          description: Payment Id to void
          required: true
          schema:
            type: string
            pattern: ^ps_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '202':
          $ref: '#/components/responses/VoidResponse'
        '400':
          description: Invalid request (e.g. invalid status for voiding)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                default:
                  $ref: '#/components/examples/BadRequestErrorResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /payment-sessions/{paymentSessionId}/refunds:
    post:
      operationId: paymentSessionCreateRefund
      tags:
        - Payments
      summary: Refund a payment
      description: >-
        Use this endpoint to refund an already captured payment session. Unlike
        voids, which are typically completed in minutes, refunds can take
        several days to be cleared by the card schemes.
      parameters:
        - name: paymentSessionId
          in: path
          description: Payment Id to refund
          required: true
          schema:
            type: string
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when operating on payments related to
            a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRefundRequestBody'
            examples:
              partial-refund:
                value:
                  amount: 250
              with-reason:
                value:
                  amount: 250
                  reason: Returned by customer
              refund-remaining:
                value: {}
              refund-multi-capture-transaction:
                value:
                  amount: 750
                  captureTransaction:
                    id: txn_01FCTS1XMKH9FF43CAFA4CXT3P_01FCTS1XMKH9FF43CAFA4CXT3P
              marketplace-refund-platform-fee:
                value:
                  amount: 250
                  refundPlatformFee: true
              marketplace-full-refund-split-payments:
                value:
                  splits:
                    items:
                      - id: sp_01FCTS1XMKH9FF43CAFA4CXT3P
                      - id: sp_01FCTS1XMKH9FF43CAFA4CXT4P
              marketplace-partial-refund-split-payments:
                value:
                  splits:
                    items:
                      - id: sp_01FCTS1XMKH9FF43CAFA4CXT3P
                        amount: 50
                      - id: sp_01FCTS1XMKH9FF43CAFA4CXT4P
                        amount: 150
                        fee:
                          amount: 50
      responses:
        '202':
          $ref: '#/components/responses/RefundResponse'
        '400':
          description: Invalid request (e.g. invalid refund amount)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                default:
                  $ref: '#/components/examples/BadRequestErrorResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /webhooks:
    post:
      operationId: webhookCreate
      tags:
        - Webhooks
      summary: Create/Register a webhook endpoint
      description: Create/Register a webhook endpoint to start receiving events
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/CreateWebhookEndpointRequest'
      responses:
        '200':
          description: Webhook successfully registered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointCreated'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: webhooksList
      tags:
        - Webhooks
      summary: List your webhook endpoints
      description: >-
        Returns a list of your webhook endpoints. They are returned in sorted
        (by epoch) order (default is newest first).
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved your webhook endpoints
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /webhooks/{webhookId}:
    get:
      operationId: webhookGetById
      tags:
        - Webhooks
      summary: Retrieve a webhook endpoint
      description: This is used to fetch a webhook by its unique Id
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: webhookId
          in: path
          description: Webhook Id to retrieve
          required: true
          schema:
            type: string
            example: wh_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: Webhook endpoint successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpoint'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    patch:
      operationId: webhookUpdateById
      tags:
        - Webhooks
      summary: Update a webhook endpoint
      description: This is used to update a webhook by its unique Id
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: webhookId
          in: path
          description: Webhook Id to update
          required: true
          schema:
            type: string
            example: wh_01FCTS1XMKH9FF43CAFA4CXT3P
      requestBody:
        $ref: '#/components/requestBodies/UpdateWebhookEndpointRequest'
      responses:
        '200':
          description: Webhook endpoint successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpoint'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    delete:
      operationId: webhookDeleteById
      tags:
        - Webhooks
      summary: Delete a webhook endpoint
      description: This is used to delete a webhook by its unique Id
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: webhookId
          in: path
          description: Webhook Id to delete
          required: true
          schema:
            type: string
            example: wh_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: Webhook endpoint successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointDeleted'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /events:
    get:
      operationId: eventGetList
      tags:
        - Events
      summary: Retrieves events in sorted (by epoch) order
      description: >-
        Retrieves a list of events. They are returned in sorted (by epoch) order
        (default is newest first). You can query one of your sub-account's
        events buy using the `Account` header.
      parameters:
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the events are
            returned. `false` will arrange the results with newest first whereas
            `true` shows oldest first.
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 20
            description: >-
              Control how many items are returned in the result list. The max
              limit we allow is `50`.
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to fetch events related
            to a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved a list of events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /events/{eventId}:
    get:
      operationId: eventGetById
      tags:
        - Events
      summary: Retrieve an Event by Id
      description: This is used to fetch an Event by its eventId
      parameters:
        - name: eventId
          in: path
          description: Event to retrieve
          required: true
          schema:
            type: string
            example: ev_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to fetch events related
            to a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given Event
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /accounts:
    post:
      operationId: subAccountCreate
      tags:
        - Accounts
      summary: Create a new sub account
      description: >-
        This is for registering new users onto your platform that will act as
        one of your 'sub' accounts
      responses:
        '200':
          description: The account was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
      security:
        - secretApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubAccountRequestBody'
            examples:
              hosted-onboarding-minimum:
                value:
                  email: test@example.com
              hosted-onboarding-prepopulated-business:
                value:
                  onboardingFlow: Hosted
                  entityType: Business
                  business:
                    name: Test Ltd
                    type: PublicCompany
                    registrationNumber: '12345678'
                    registeredAddress:
                      lineOne: 123 Street
                      city: Manchester
                      country: GB
                      postalCode: M1 1AA
                    contactEmail: contact@test.com
              hosted-onboarding-prepopulated-individual:
                value:
                  onboardingFlow: Hosted
                  entityType: Individual
                  individual:
                    firstName: Fred
                    lastName: Jones
                    email: fred.jones@example.com
                    dateOfBirth: '1990-01-20'
                    gender: Male
                    nationalities:
                      - GB
                    address:
                      lineOne: 123 Road
                      city: London
                      country: GB
                      postalCode: SW1 1AA
              nonhosted-onboarding-minimum:
                value:
                  onboardingFlow: NonHosted
              nonhosted-onboarding-business:
                value:
                  onboardingFlow: NonHosted
                  entityType: Business
                  business:
                    name: Test Ltd
                    type: PublicCompany
                    registrationNumber: '12345678'
                    registeredAddress:
                      lineOne: 123 Street
                      city: Manchester
                      country: GB
                      postalCode: M1 1AA
                    contactEmail: contact@test.com
              nonhosted-onboarding-individual:
                value:
                  onboardingFlow: NonHosted
                  entityType: Individual
                  individual:
                    firstName: Fred
                    lastName: Jones
                    email: fred.jones@example.com
                    dateOfBirth: '1990-01-20'
                    gender: Male
                    nationalities:
                      - GB
                    address:
                      lineOne: 123 Road
                      city: London
                      country: GB
                      postalCode: SW1 1AA
  /accounts/{id}:
    get:
      operationId: subAccountGetById
      tags:
        - Accounts
      summary: Retrieve a sub account by Id
      description: This is used to fetch details for one of your sub accounts.
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
      responses:
        '200':
          description: The account was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
      security:
        - secretApiKeyAuth: []
    patch:
      operationId: subAccountUpdate
      tags:
        - Accounts
      summary: Update a sub account by Id
      description: >-
        This is used to update the details of one of your sub accounts. This API
        can only be accessed for `NonHosted` sub accounts.
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
      responses:
        '200':
          description: The account was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/UpdateSubAccountRequest'
  /accounts/{id}/verify:
    post:
      operationId: subAccountVerify
      tags:
        - Accounts
      summary: Verify a 'Business' entity sub account
      deprecated: true
      description: >-
        This endpoint is now deprecated - all account types and persons are
        submitted for verification automatically, when all fields & documents
        have been provided.

        Once you have created all Persons and satisfied all the verification
        requirements for them and the Business, you submit these details for
        verification. This endpoint cannot be accessed for `Individual` sub
        accounts as this process is done automatically after satisfying the
        verification requirements.
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
      responses:
        '200':
          description: Verification was successfully submitted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
      security:
        - secretApiKeyAuth: []
  /accounts/{id}/payouts:
    post:
      operationId: payoutCreate
      tags:
        - Accounts
        - Payouts
      summary: Create a manual payout for a sub account
      description: >-
        Used to create manual payouts for a specified sub account.

        This API can only be accessed for `NonHosted` sub accounts that are
        configured for manual payouts.

        **Note** that the following requirements must be met:
          - the `payoutMethodId` supplied must have status equal to `Valid`
          - `amount` must be greater than or equal to the minimum configured payout amount for the account (e.g. £100)
          - `verification.status` cannot be `Required` on the account
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
      security:
        - secretApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayoutRequestBody'
      responses:
        '200':
          description: Successfully created payout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: payoutsList
      tags:
        - Accounts
        - Payouts
      summary: List payouts for a sub account
      description: Used to fetch a paginated list of payouts for the given sub account
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: ascending
          in: query
          required: false
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the payouts are
            returned. `false` will arrange the results with newest first whereas
            `true` shows oldest first.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            example: 20
            default: 20
            description: >-
              Control how many payouts are returned in the result list. The max
              limit we allow is `50`.
        - name: startsAfter
          in: query
          required: false
          schema:
            type: string
            example: po_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here in order to retrieve the next page of results.
        - name: startDate
          in: query
          deprecated: true
          required: false
          schema:
            type: string
            format: date
          description: >-
            The date when payments were taken to search for payouts from
            (inclusive), in the format yyyy-MM-dd
        - name: endDate
          in: query
          deprecated: true
          required: false
          schema:
            type: string
            format: date
          description: >-
            The date when payments were taken to search for payouts to
            (inclusive), in the format yyyy-MM-dd
        - name: startTimestamp
          in: query
          required: false
          schema:
            type: integer
            format: int64
            example: 1641859200
          description: The start timestamp (inclusive), it must be before the endTimestamp.
        - name: endTimestamp
          in: query
          required: false
          schema:
            type: integer
            format: int64
            example: 1641945599
          description: >-
            The timestamp when to return payouts up to (inclusive), it must be
            after the startTimestamp.
      responses:
        '200':
          description: Payouts were retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
      security:
        - secretApiKeyAuth: []
  /accounts/{id}/payouts/{payoutId}:
    get:
      operationId: payoutGetById
      tags:
        - Accounts
        - Payouts
      summary: Retrieve a a payout for a sub account by Id
      description: This is used to fetch a payout by its unique Id
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: payoutId
          in: path
          description: Payout to retrieve
          required: true
          schema:
            type: string
            pattern: ^po_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: po_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given Payout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /accounts/authorize:
    post:
      operationId: subAccountAuthorize
      tags:
        - Accounts
      summary: Create a link for a sub account to authorize their account
      description: >-
        We recommend calling this endpoint first when you onboard your users to
        cater for those that may already have Ryft accounts.

        If the email supplied is not registered with Ryft then you should
        instead use our account-links API to register a new user.

        This API can only be accessed for `Hosted` sub accounts.
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully created temporary auth link
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAuthLinkResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          description: No sub accounts were found with this email
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                default:
                  $ref: '#/components/examples/NotFoundErrorResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
      requestBody:
        $ref: '#/components/requestBodies/CreateAuthLinkRequest'
  /accounts/{id}/persons:
    post:
      operationId: personCreate
      tags:
        - Persons
      summary: Creates a new person under the account, for verification of Businesses
      security:
        - secretApiKeyAuth: []
      description: >-
        This is for creating persons under your or your sub accounts account,
        required for verification of businesses. The following limits apply: -
        Maximum of 9 persons - Maximum of 5 persons with a role of `Director` -
        Maximum of 4 persons with a role of `UltimateBeneficialOwner` - Maximum
        of 1 person with a role of `BusinessContact`
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
      requestBody:
        $ref: '#/components/requestBodies/CreatePersonRequest'
      responses:
        '200':
          description: The person was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: personList
      tags:
        - Persons
      summary: Retrieves persons in sorted (by epoch) order
      description: >-
        Retrieves a list of the persons you've created for one of your sub
        accounts They are returned in sorted (by epoch) order (default is newest
        first)
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: ascending
          in: query
          required: false
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the persons are
            returned. `false` will arrange the results with newest first whereas
            `true` shows oldest first.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            example: 20
            description: >-
              Control how many persons are returned in the result list. The max
              limit we allow is `50`.
        - name: startsAfter
          in: query
          required: false
          schema:
            type: string
            example: per_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here, to retrieve the next page of results.
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved your persons
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /accounts/{id}/persons/{personId}:
    get:
      operationId: personGetById
      tags:
        - Persons
      summary: Retrieve a person by Id
      description: This is used to fetch a person by its unique Id
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: personId
          in: path
          description: Person to retrieve
          required: true
          schema:
            type: string
            pattern: ^per_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: per_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given Person
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    patch:
      operationId: personUpdateById
      tags:
        - Persons
      summary: Update a person by Id
      description: This is used to update an existing person
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: personId
          in: path
          description: Person to update
          required: true
          schema:
            type: string
            pattern: ^per_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: per_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/UpdatePersonRequest'
      responses:
        '200':
          description: Successfully updated the given Person
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    delete:
      operationId: personDeleteById
      tags:
        - Persons
      summary: Deletes a person by Id
      description: >-
        Deletes a person under the account. This will also delete any files
        currently attached to the person. Note that you can only delete a person
        if `verification.status` is `NotRequired` or `Required`
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: personId
          in: path
          description: Person to delete
          required: true
          schema:
            type: string
            pattern: ^per_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: per_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully deleted the given Person
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /accounts/{id}/payout-methods:
    post:
      operationId: payoutMethodCreate
      tags:
        - Payout Methods
      summary: Creates a new payout method for a sub account
      security:
        - secretApiKeyAuth: []
      description: >-
        This is for creating payout methods for one of your sub accounts, so
        they can receive payouts. You can only create 1 payout method per
        currency
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
      requestBody:
        $ref: '#/components/requestBodies/CreatePayoutMethodRequest'
      responses:
        '200':
          description: The payout method was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutMethod'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: payoutMethodsList
      tags:
        - Payout Methods
      summary: Retrieves payout methods in sorted (by epoch) order
      description: >-
        Retrieves a list of the payout methods you've created for one of your
        sub accounts They are returned in sorted (by epoch) order (default is
        newest first)
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the payout methods are
            returned. `false` will arrange the results with newest first whereas
            `true` shows oldest first
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `25`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: pm_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here, to retrieve the next page of results.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved your payout methods
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutMethods'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /accounts/{id}/payout-methods/{payoutMethodId}:
    get:
      operationId: payoutMethodGet
      tags:
        - Payout Methods
      summary: Retrieve a payout method by Id
      description: >-
        This is used to fetch a payout method by its unique Id for one of your
        sub accounts
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: payoutMethodId
          in: path
          description: Payout method to retrieve
          required: true
          schema:
            type: string
            pattern: ^pm_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: pm_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given payout method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutMethod'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    patch:
      operationId: payoutMethodUpdate
      tags:
        - Payout Methods
      summary: Update a payout method by Id
      description: >-
        This is used to update an existing payout method for one of your sub
        accounts
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: payoutMethodId
          in: path
          description: Payout method to retrieve
          required: true
          schema:
            type: string
            pattern: ^pm_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: pm_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/UpdatePayoutMethodRequest'
      responses:
        '200':
          description: Successfully updated the given payout method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutMethod'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    delete:
      operationId: payoutMethodDelete
      tags:
        - Payout Methods
      summary: Delete a payout method
      description: >-
        This is used to delete a payout method by its unique Id for one of your
        sub accounts
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: the account id of one of your sub accounts
          required: true
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        - name: payoutMethodId
          in: path
          description: Payout method to retrieve
          required: true
          schema:
            type: string
            pattern: ^pm_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: pm_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: Payout method successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutMethod'
        '404':
          description: Payout method not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /account-links:
    post:
      operationId: accountLinksCreate
      tags:
        - Account Links
      summary: Generate a new temporary account link
      description: >-
        Generate a temporary account link to redirect the user to, in order for
        them to complete registration and payout setup via our portal
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully created temporary account link
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAccountLinkResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
      requestBody:
        $ref: '#/components/requestBodies/CreateAccountLinkRequest'
  /transfers:
    post:
      operationId: transferCreate
      tags:
        - Transfers
      summary: Initiates a transfer of money between Ryft accounts
      description: Used to initiate a transfer of money between Ryft accounts.
      security:
        - secretApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTransferRequestBody'
            examples:
              Send money from your account to a sub account:
                value:
                  amount: 1500
                  currency: GBP
                  destination:
                    accountId: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
                  reason: Money owed from payments on 2012-01-30
              Pull money from a sub account into your own account:
                value:
                  amount: 1500
                  currency: GBP
                  source:
                    accountId: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
                  reason: Dispute Fees
      responses:
        '200':
          description: Successfully initiated the transfer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transfer'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: transfersList
      tags:
        - Transfers
      summary: Fetches a paginated list of your transfers
      description: >-
        Retrieves a list of the transfers you've requested. Returned in sorted
        (by epoch) order (default is newest first)
      parameters:
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the transfers are
            returned. `false` will arrange the results with newest first whereas
            `true` shows oldest first
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 20
            default: 20
            description: >-
              Control how many transfers are returned in the result list. The
              max limit we allow is `50`.
        - name: startsAfter
          in: query
          schema:
            type: string
            example: tfr_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here in order to retrieve the next page of results.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved your transfers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transfers'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /transfers/{id}:
    get:
      operationId: transferGetById
      tags:
        - Transfers
      summary: Retrieve a transfer by Id
      description: This is used to fetch a transfer by its unique Id
      parameters:
        - name: id
          in: path
          description: Transfer to retrieve
          required: true
          schema:
            type: string
            pattern: ^tfr_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: tfr_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given Transfer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transfer'
        '404':
          description: The requested account/transfer could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                default:
                  $ref: '#/components/examples/NotFoundErrorResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /balances:
    get:
      operationId: balancesList
      tags:
        - Balances
      summary: List balances
      description: Retrieves a list of balances for the given account
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this to list balances for a specific sub
            account)
          required: false
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: currency
          in: query
          description: >-
            Filter for one or more currencies. By default all currencies will be
            returned when this field is omitted.
          required: false
          schema:
            type: string
            example: GBP
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the balances for the account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Balances'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /balance-transactions:
    get:
      operationId: balanceTransactionsList
      tags:
        - Balance Transactions
      summary: List balance transactions
      description: Retrieves a list of balance transactions for the given account.
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this to list balance transactions for a
            specific sub account)
          required: false
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: limit
          in: query
          required: false
          description: >-
            Control how many items are returned in the result list. The max
            limit we allow is `50`.
          schema:
            type: integer
            format: int32
            example: 20
        - name: startsAfter
          in: query
          schema:
            type: string
            example: bltxn_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to identify the previous item to start querying after. The
            value of the `paginationToken` field from that response should be
            supplied here, to retrieve the next page of results for that
            timestamp range.
          required: false
        - name: payoutId
          in: query
          schema:
            type: string
            example: po_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            You may specify a Payout ID to retrieve all transactions which made
            up a particular payout.


            Note that this is only available for accounts on `Automated`
            payouts. For `Manual` payouts if specified, this will return an
            empty result set.

            Also consider that if you switch between payout frequency (`Manual`
            to `Automatic`) then the initial payout after switching is not
            supported here.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the balance transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceTransactions'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /conversions:
    post:
      operationId: conversionCreate
      tags:
        - Conversions
      summary: Create a conversion
      description: >-
        Creates an FX conversion, selling funds in one currency to buy funds in
        another.
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this to create a conversion for a specific
            sub account)
          required: false
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/CreateConversionRequest'
      responses:
        '200':
          description: Conversion created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversion'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: conversionsList
      tags:
        - Conversions
      summary: List conversions
      description: >-
        Retrieves a list of conversions for the given account, returned in
        sorted (by epoch) order (default is newest first).
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this to list conversions for a specific
            sub account)
          required: false
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: limit
          in: query
          required: false
          description: Control how many items are returned in the result list.
          schema:
            type: integer
            format: int32
            maximum: 50
            example: 20
        - name: ascending
          in: query
          required: false
          description: >-
            Control the order (newest or oldest) in which the conversions are
            returned. `false` will arrange the results with newest first whereas
            `true` shows oldest first.
          schema:
            type: boolean
            example: false
        - name: startsAfter
          in: query
          required: false
          description: >-
            A token to identify the previous item to start querying after. The
            value of the `paginationToken` field from that response should be
            supplied here, to retrieve the next page of results.
          schema:
            type: string
            example: cv_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
        - name: startTimestamp
          in: query
          required: false
          description: The start timestamp (inclusive, epoch seconds)
          schema:
            type: integer
            format: int64
            example: 1641859200
        - name: endTimestamp
          in: query
          required: false
          description: The end timestamp (inclusive, epoch seconds)
          schema:
            type: integer
            format: int64
            example: 1641945599
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the conversions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversions'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /conversions/{conversionId}:
    get:
      operationId: conversionGetById
      tags:
        - Conversions
      summary: Retrieve a conversion by Id
      description: This is used to fetch a conversion by its unique conversionId.
      parameters:
        - name: conversionId
          in: path
          description: Conversion to retrieve
          required: true
          schema:
            type: string
            example: cv_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: Account
          in: header
          description: >-
            The linked accountId (use this to retrieve a conversion for a
            specific sub account)
          required: false
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given conversion
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversion'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /conversions/rate:
    get:
      operationId: conversionsGetRate
      tags:
        - Conversions
      summary: Get an estimated conversion rate
      description: >-
        Returns an estimated rate for an FX conversion between two currencies.


        The rate, amount & fees are indicative only and the rate is not held -
        the rate applied when you create a conversion may differ.


        ### Rate Limiting

        This API enforces a stricter rate limit - if you exceed it you will
        receive a `429 Too Many Requests` response. We recommend requesting a
        rate only when you need one rather than polling for rates.


        ### Rate Availability

        Rates are briefly unavailable during a short daily window (~90 seconds)
        while FX trading closes. During this window you will receive a `400 Bad
        Request` response with a message indicating that rates are temporarily
        unavailable - retry shortly.
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this to get an estimated rate for a
            specific sub account)
          required: false
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: sellCurrency
          in: query
          required: true
          description: The three-letter ISO-4217 currency code to sell.
          schema:
            type: string
            example: GBP
        - name: buyCurrency
          in: query
          required: true
          description: The three-letter ISO-4217 currency code to buy.
          schema:
            type: string
            example: EUR
        - name: amount
          in: query
          required: true
          description: >-
            The amount to sell in minor units. Minimum and maximum amounts [vary
            by
            currency](https://developer.ryftpay.com/documentation/overview/core_concepts/currencies).
          schema:
            type: integer
            format: int64
            example: 100000
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Estimated rate retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversionRate'
        '400':
          description: >-
            One or more inputs are invalid, or rates are temporarily unavailable
            while FX trading closes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                default:
                  $ref: '#/components/examples/BadRequestErrorResponse'
                ratesTemporarilyUnavailable:
                  summary: Rates temporarily unavailable (daily FX trading close)
                  value:
                    requestId: b83f2653-06d7-44a9-a548-5825e8186004
                    code: '400'
                    errors:
                      - code: bad_request
                        message: >-
                          Live rates are briefly unavailable. Try again in a
                          minute.
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '429':
          description: >-
            Too many requests - you have exceeded the rate limit for this
            endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /platform-fees:
    get:
      operationId: platformFeeGetList
      tags:
        - Platform Fees
      summary: Retrieves your platform fees in sorted (by epoch) order
      description: >-
        Retrieves a list of the application fees you've collected. They are
        returned in sorted (by epoch) order (default is newest first)
      parameters:
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the platform fees are
            returned. `false` will arrange the results with newest first whereas
            `true` shows oldest first
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 20
            description: >-
              Control how many platform-fees are returned in the result list.
              The max limit we allow is `50`.
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved your platform fees
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformFeesResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /platform-fees/{platformFeeId}:
    get:
      operationId: platformFeeGetById
      tags:
        - Platform Fees
      summary: Retrieve a platform fee by Id
      description: This is used to fetch a platform fee by its platformFeeId
      parameters:
        - name: platformFeeId
          in: path
          description: PlatformFee to retrieve
          required: true
          schema:
            type: string
            example: pf_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given PlatformFee
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformFee'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /platform-fees/{platformFeeId}/refunds:
    get:
      operationId: platformFeeGetRefunds
      tags:
        - Platform Fees
      summary: Retrieve platform fee refund(s)
      description: This is used to fetch a platform fee refunds by their platformFeeId
      parameters:
        - name: platformFeeId
          in: path
          description: PlatformFee to retrieve refunds for
          required: true
          schema:
            type: string
            example: pf_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the platform fee refunds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformFeeRefundsResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /payment-methods/{paymentMethodId}:
    get:
      operationId: paymentMethodGetById
      tags:
        - Payment Methods
      summary: Retrieve a payment method by Id
      description: This is used to fetch a payment method by its unique Id
      parameters:
        - name: paymentMethodId
          in: path
          description: Payment Method to retrieve
          required: true
          schema:
            type: string
            pattern: ^pmt_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: pmt_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given Payment Method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethod'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    patch:
      operationId: paymentMethodUpdateById
      tags:
        - Payment Methods
      summary: Update a payment method by Id
      description: This is used to update an existing payment method
      parameters:
        - name: paymentMethodId
          in: path
          description: Payment Method to update
          required: true
          schema:
            type: string
            pattern: ^pmt_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: pmt_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/UpdatePaymentMethodRequest'
      responses:
        '200':
          description: Successfully updated the given PaymentMethod
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethod'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    delete:
      operationId: paymentMethodDeleteById
      tags:
        - Payment Methods
      summary: Delete a payment method by Id
      description: >-
        This is used to delete a payment method by instead. Note that you can
        only delete payment-methods that aren't single-use. For example you can
        delete a customer's saved payment method, but you cannot delete a token
        generated for one-time purchases
      parameters:
        - name: paymentMethodId
          in: path
          description: Payment Method to delete
          required: true
          schema:
            type: string
            pattern: ^pmt_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: pmt_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully delete the given Payment Method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodDeleted'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /disputes:
    get:
      operationId: disputesList
      tags:
        - Disputes
      summary: List disputes
      description: Used to fetch a paginated list of disputes
      parameters:
        - name: startTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641859200
          description: The start timestamp (inclusive), it must be before the endTimestamp.
          required: false
        - name: endTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641945599
          description: >-
            The timestamp when to return payment sessions up to (inclusive), it
            must be after the startTimestamp.
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the disputes are
            returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `25`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: dsp_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here, to retrieve the next page of results for that
            timestamp range.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the disputes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Disputes'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /disputes/{disputeId}:
    get:
      operationId: disputeGetById
      tags:
        - Disputes
      summary: Retrieve a dispute
      description: This is used to fetch a dispute by its unique Id
      parameters:
        - name: disputeId
          in: path
          description: Dispute to retrieve
          required: true
          schema:
            type: string
            pattern: ^dsp_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: dsp_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given Dispute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dispute'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /disputes/{disputeId}/accept:
    post:
      operationId: disputeAcceptById
      tags:
        - Disputes
      summary: Accept a dispute
      description: >-
        Accepts a specific dispute by Id. Typically you should use this if the
        dispute is in fact legitimate and you are accepting the financial
        impact. **Note** that this operation cannot be done.
      parameters:
        - name: disputeId
          in: path
          description: Dispute to accept
          required: true
          schema:
            type: string
            pattern: ^dsp_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: dsp_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully accepted the given Dispute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dispute'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /disputes/{disputeId}/evidence:
    patch:
      operationId: disputeAddEvidenceById
      tags:
        - Disputes
      summary: Add evidence to a dispute
      description: >-
        Adds or updates the evidence currently attached to the dispute. Note
        that for file evidence, you must first upload the file via our files
        API. Once you have attached all relevant evidence, call the /challenge
        endpoint to submit the evidence for review. **Note:** the Dispute must
        be in status `Open` for this operation.
      parameters:
        - name: disputeId
          in: path
          description: Dispute to attach evidence to
          required: true
          schema:
            type: string
            pattern: ^dsp_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: dsp_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/AddEvidenceToDisputeRequest'
      responses:
        '200':
          description: Successfully added the provided evidence given Dispute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dispute'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    delete:
      operationId: disputeRemoveEvidenceById
      tags:
        - Disputes
      summary: Remove evidence from a dispute
      description: >-
        Removes evidence currently attached to a dispute. **Note:** the Dispute
        must be in status `Open` for this operation.
      parameters:
        - name: disputeId
          in: path
          description: Dispute to remove evidence from
          required: true
          schema:
            type: string
            pattern: ^dsp_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: dsp_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/RemoveEvidenceFromDisputeRequest'
      responses:
        '200':
          description: Successfully removed the provided evidence from the Dispute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dispute'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /disputes/{disputeId}/challenge:
    post:
      operationId: disputeChallengeById
      tags:
        - Disputes
      summary: Challenge a dispute
      description: >-
        Challenges a specific dispute. You should call this endpoint once you
        have attached all the relevant evidence. **Note** that you can no longer
        submit further evidence once challenged, so make sure you have gathered
        as much as possible to ensure a better chance of winning the dispute.
      parameters:
        - name: disputeId
          in: path
          description: Dispute to challenge
          required: true
          schema:
            type: string
            pattern: ^dsp_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: dsp_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully challenged the given Dispute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dispute'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /customers:
    post:
      operationId: customerCreate
      tags:
        - Customers
      summary: Creates a new customer within your account
      security:
        - secretApiKeyAuth: []
      description: >-
        This is for creating customers within your Ryft account (to enable
        features such as saved payment methods)
      requestBody:
        $ref: '#/components/requestBodies/CreateCustomerRequest'
      responses:
        '200':
          description: The customer was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: customersList
      tags:
        - Customers
      summary: List customers
      description: Used to fetch a paginated list of one or more Customers
      parameters:
        - name: email
          in: query
          schema:
            type: string
            example: example@mail.com
          description: >-
            A case insensitive email to search by. Note that emails are unique
            per `Customer` so you can expect a single item within the response.
            Any other query parameters will be ignored if this is provided.
        - name: startTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641859200
          description: The start timestamp (inclusive), it must be before the endTimestamp.
          required: false
        - name: endTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641945599
          description: >-
            The timestamp when to return payment sessions up to (inclusive), it
            must be after the startTimestamp.
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the items are
            returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `25`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: cus_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here, to retrieve the next page of results for that
            timestamp range.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the customers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customers'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /customers/{customerId}:
    get:
      operationId: customerGetById
      tags:
        - Customers
      summary: Retrieve a customer by Id
      description: This is used to fetch a customer by its unique Id
      parameters:
        - name: customerId
          in: path
          description: Customer to retrieve
          required: true
          schema:
            type: string
            pattern: ^cus_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: cus_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given Customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    patch:
      operationId: customerUpdateById
      tags:
        - Customers
      summary: Update a customer by Id
      description: This is used to update an existing customer
      parameters:
        - name: customerId
          in: path
          description: Customer to update
          required: true
          schema:
            type: string
            pattern: ^cus_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: cus_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      requestBody:
        $ref: '#/components/requestBodies/UpdateCustomerRequest'
      responses:
        '200':
          description: Successfully updated the given Customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    delete:
      operationId: customerDeleteById
      tags:
        - Customers
      summary: Delete a customer (and all their payment methods)
      description: This is used to delete a customer by its unique Id
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: customerId
          in: path
          description: Customer to delete
          required: true
          schema:
            type: string
            pattern: ^cus_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: cus_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: Customer successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerDeleted'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /customers/{customerId}/payment-methods:
    get:
      operationId: customerGetPaymentMethods
      tags:
        - Customers
      summary: Retrieve a customer's payment methods
      description: This is used to fetch a customer's payment methods
      parameters:
        - name: customerId
          in: path
          description: Customer whose payment methods to retrieve
          required: true
          schema:
            type: string
            pattern: ^cus_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: cus_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given Customer's payment methods
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPaymentMethods'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /subscriptions:
    post:
      operationId: subscriptionCreate
      tags:
        - Subscriptions
      summary: Creates a new subscription
      security:
        - secretApiKeyAuth: []
      description: >-
        Use to create a Subscription (whereby Ryft manage the automatic
        scheduling and billing of a recurring payment series)
      requestBody:
        $ref: '#/components/requestBodies/CreateSubscriptionRequest'
      responses:
        '200':
          description: The subscription was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: subscriptionsList
      tags:
        - Subscriptions
      summary: List subscriptions
      description: Used to fetch a paginated list of subscriptions
      parameters:
        - name: startTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641859200
          description: >-
            The start timestamp (inclusive), it must be before the endTimestamp.
            If not provided will default to midnight on the current date (UTC).
          required: false
        - name: endTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641945599
          description: >-
            The timestamp when to return payment sessions up to (inclusive), it
            must be after the startTimestamp. If not provided it will default to
            the current time (UTC).
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the subscriptions are
            returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `25`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: sub_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here, to retrieve the next page of results for that
            timestamp range.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the subscriptions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscriptions'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /subscriptions/{subscriptionId}:
    get:
      operationId: subscriptionGetById
      tags:
        - Subscriptions
      summary: Retrieve a subscription by Id
      description: This is used to fetch a subscription by its unique Id
      parameters:
        - name: subscriptionId
          in: path
          description: Subscription to retrieve
          required: true
          schema:
            type: string
            pattern: ^sub_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: sub_01FCTS1XMKH9FF43CAFA4CXT3P
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given Subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    patch:
      operationId: subscriptionUpdateById
      tags:
        - Subscriptions
      summary: Updates a subscription by Id
      security:
        - secretApiKeyAuth: []
      description: >-
        Use to update a Subscription. **Cannot** be used if the Subscription is
        `Cancelled` or `Ended`.
      parameters:
        - name: subscriptionId
          in: path
          description: Subscription to retrieve
          required: true
          schema:
            type: string
            pattern: ^sub_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: sub_01FCTS1XMKH9FF43CAFA4CXT3P
      requestBody:
        $ref: '#/components/requestBodies/UpdateSubscriptionRequest'
      responses:
        '200':
          description: The subscription was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /subscriptions/{subscriptionId}/pause:
    patch:
      operationId: subscriptionPauseById
      tags:
        - Subscriptions
      summary: Pause a subscription by Id
      security:
        - secretApiKeyAuth: []
      description: >-
        Used to schedule a pause for a Subscription. Only 'Active' subscriptions
        can be paused, though the details for already 'Paused' subscriptions can
        also be edited. The subscription will remain in 'Active' and will be
        moved to 'Paused' when it was next due to be billed. The reason or
        duration of the pause can be edited by calling this endpoint again, even
        after it has moved to 'Paused'. After a pause is scheduled but whilst
        still in 'Active', the pause can be unscheduled via the 'unschedule'
        flag.
      parameters:
        - name: subscriptionId
          in: path
          description: Subscription to pause
          required: true
          schema:
            type: string
            pattern: ^sub_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: sub_01FCTS1XMKH9FF43CAFA4CXT3P
      requestBody:
        $ref: '#/components/requestBodies/PauseSubscriptionRequest'
      responses:
        '200':
          description: The subscription was paused successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /subscriptions/{subscriptionId}/resume:
    patch:
      operationId: subscriptionResumeById
      tags:
        - Subscriptions
      summary: Resume a subscription by Id
      security:
        - secretApiKeyAuth: []
      description: Use to resume a paused Subscription.
      parameters:
        - name: subscriptionId
          in: path
          description: Subscription to resume
          required: true
          schema:
            type: string
            pattern: ^sub_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: sub_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: The subscription was resumed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /subscriptions/{subscriptionId}/cancel:
    delete:
      operationId: subscriptionCancelById
      tags:
        - Subscriptions
      summary: Cancel a subscription by Id
      description: >-
        Cancel a subscription by its unique Id. This will immediately move the
        subscription to `Cancelled` and stop billing the customer. This state is
        terminal and cannot be reversed.
      parameters:
        - name: subscriptionId
          in: path
          description: Subscription to cancel
          required: true
          schema:
            type: string
            pattern: ^sub_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: sub_01FCTS1XMKH9FF43CAFA4CXT3P
      requestBody:
        $ref: '#/components/requestBodies/CancelSubscriptionRequest'
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully cancelled the given Subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /subscriptions/{subscriptionId}/payment-sessions:
    get:
      operationId: subscriptionsListPaymentSessions
      tags:
        - Subscriptions
      summary: Retrieve a list of the payments specific to a subscription
      description: >-
        Used to fetch a paginated list of the payment sessions making up the
        subscription
      parameters:
        - name: subscriptionId
          in: path
          description: Subscription to retrieve
          required: true
          schema:
            type: string
            pattern: ^sub_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: sub_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: startTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641859200
          description: >-
            The timestamp when to return payment sessions from (inclusive), it
            must be before the endTimestamp. If not provided it will default to
            0
          required: false
        - name: endTimestamp
          in: query
          schema:
            type: integer
            format: int64
            example: 1641945599
          description: >-
            The timestamp when to return payment sessions up to (inclusive), it
            must be after the startTimestamp. If not provided it will default to
            the current time (UTC).
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the payment sessions
            are returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `25`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here, to retrieve the next page of results.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the payment sessions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionPayments'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /files:
    get:
      operationId: filesList
      tags:
        - Files
      summary: List files
      description: Used to fetch a paginated list of files under your account
      parameters:
        - name: category
          in: query
          schema:
            type: string
            enum:
              - Evidence
              - VerificationDocument
              - Report
            example: Evidence
          description: Filter for files in a specific category.
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the files are
            returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `25`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: fl_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here, to retrieve the next page of results for that
            timestamp range.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the files
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Files'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    post:
      operationId: fileCreate
      tags:
        - Files
      summary: Create/Upload a new file to your account.
      security:
        - secretApiKeyAuth: []
      description: |-
        Upload a file to Ryft via our API. Useful if you need to:
          - upload evidence when challenging disputes
          - upload KYB/KYC documents for sub accounts
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when uploading `VerificationDocument`
            files for sub accounts)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      requestBody:
        $ref: '#/components/requestBodies/CreateFileRequest'
      responses:
        '200':
          description: The file was created & uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /files/{fileId}:
    get:
      operationId: fileGetById
      tags:
        - Files
      summary: Retrieve a file
      description: Retrieve a file by its unique ID
      parameters:
        - name: fileId
          in: path
          description: File to retrieve
          required: true
          schema:
            type: string
            pattern: ^fl_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: fl_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: Account
          in: header
          description: >-
            The linked accountId (use this if you need to fetch a particular
            file for a sub account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the given File
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /apple-pay/web-domains:
    post:
      operationId: applePayWebDomainRegister
      tags:
        - Apple Pay
      summary: Register a domain for Apple Pay
      description: >-
        Registers a domain name for Apple Pay on the web. Note that this is
        required if relying on Ryft's Apple Pay processing certificate.


        A **Maxiumum** of 99 domains can be registered against a single Ryft
        account.


        Each domain must host our verification file under
        `/.well-known/apple-developer-merchantid-domain-association`.


        **Important:** the `Content-Type` of the hosted file must be
        `application/octet-stream`.
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this if you are processing payments
            directly under a sub account's URL)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Apple Pay web domain successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplePayWebDomain'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
      requestBody:
        $ref: '#/components/requestBodies/ApplePayRegisterWebDomainRequest'
    get:
      operationId: applePayWebDomainsList
      tags:
        - Apple Pay
      summary: List Apple Pay web domains
      description: List the web domains you have registered for Apple Pay
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this if you are processing Apple Pay
            directly under a sub account's registered Apple Pay domain)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the payment sessions
            are returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `50`. The default is `20`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: apwd_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify where to resume a subsequent paginated query.
            The value of the `paginationToken` field from that response should
            be supplied here, to retrieve the next page of results for that
            timestamp range.
          required: false
      security:
        - secretApiKeyAuth: []
      responses:
        '200':
          description: Successfully retrieved the Apple Pay web domains
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplePayWebDomains'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /apple-pay/web-domains/{id}:
    get:
      operationId: applePayWebDomainGetById
      tags:
        - Apple Pay
      summary: Retrieve an Apple Pay web domain
      description: This is used to fetch an Apple Pay web domain by its unique Id
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Apple Pay web domain Id to retrieve
          required: true
          schema:
            type: string
            example: apwd_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: Account
          in: header
          description: >-
            The linked accountId (Required if you registered the domain under a
            specific sub account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      responses:
        '200':
          description: Apple Pay web domain successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplePayWebDomain'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    delete:
      operationId: applePayWebDomainDeleteById
      tags:
        - Apple Pay
      summary: Delete an Apple Pay web domain
      description: This is used to delete an Apple Pay web domain by its unique Id
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Apple Pay web domain Id to delete
          required: true
          schema:
            type: string
            example: apwd_01FCTS1XMKH9FF43CAFA4CXT3P
        - name: Account
          in: header
          description: >-
            The linked accountId (Required if you registered the domain under a
            specific sub account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      responses:
        '200':
          description: Apple Pay web domain successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplePayWebDomainDeleted'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /apple-pay/sessions:
    post:
      operationId: applePayCreateSession
      tags:
        - Apple Pay
      summary: Create an Apple Pay web session
      description: >-
        Request a new Apple Pay web session. Use this endpoint if you process
        Apple Pay on the web and:
          - you want to rely on Ryft's Apple Pay processing certificate
          - have an existing integration or want to implement Apple Pay via our API (without using our SDKs)
      security:
        - publicApiKeyAuth: []
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this if you are processing Apple Pay
            directly under a sub account's registered Apple Pay domain)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      requestBody:
        $ref: '#/components/requestBodies/ApplePayWebSessionRequest'
      responses:
        '200':
          description: Apple Pay session successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplePayWebSessionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/products:
    get:
      operationId: inPersonProductsList
      tags:
        - In-Person Products
      summary: List all in-person products
      description: List the products that are offered for in-person payments
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the items are
            returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `50`. The default is `50`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: ippd_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to identify the item to start querying after. This is used
            to get the next page of results after a previous response returned a
            non-null `paginationToken`. The value of the `paginationToken` field
            from that response should be supplied here, to retrieve the next
            page of results for that timestamp range.
          required: false
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonProducts'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/products/{id}:
    get:
      operationId: inPersonProductGetById
      tags:
        - In-Person Products
      summary: Retrieve an in-person product
      description: Fetches an in-person product via its unique ID
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: the unique ID of the product
          required: true
          schema:
            type: string
            pattern: ^ippd_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: ippd_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonProduct'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/skus:
    get:
      operationId: inPersonSkusList
      tags:
        - In-Person SKUs
      summary: List all in-person SKUs
      description: List the SKUs that are offered for in-person payments
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `50`. The default is `50`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: ipsku_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to identify the item to start querying after. This is used
            to get the next page of results after a previous response returned a
            non-null `paginationToken`. The value of the `paginationToken` field
            from that response should be supplied here, to retrieve the next
            page of results for that timestamp range.
          required: false
        - name: country
          in: query
          schema:
            type: string
            example: EU
          description: >-
            Filter for the SKUs available in a specific country. Typically you
            should always use this to ensure the SKUs you attempt to order are
            available in the country the order is shipped to.
          required: true
        - name: productId
          in: query
          schema:
            type: string
            example: ippd_01FCTS1XMKH9FF43CAFA4CXT3P
          description: Filter for all SKUs belonging to a specific product.
          required: false
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonProductSkus'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/skus/{id}:
    get:
      operationId: inPersonSkuGetById
      tags:
        - In-Person SKUs
      summary: Retrieve an in-person SKU
      description: Fetches an in-person SKU via its unique ID
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: the unique ID of the SKU
          required: true
          schema:
            type: string
            pattern: ^ipsku_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: ipsku_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonProductSku'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/orders:
    get:
      operationId: inPersonOrderList
      tags:
        - In-Person Orders
      summary: List in-person orders
      description: Fetches an paginated list of in-person orders
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to fetch in person
            orders under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the items are
            returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `50`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: ipord_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify the item to start querying after. This is used
            to get the next page of results after a previous response returned a
            non-null `paginationToken`. The value of the `paginationToken` field
            from that response should be supplied here, to retrieve the next
            page of results for that timestamp range.
          required: false
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonOrders'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/orders/{id}:
    get:
      operationId: inPersonOrderGetById
      tags:
        - In-Person Orders
      summary: Retrieve an in-person order
      description: Fetches an in-person order via its unique ID
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to fetch an in person
            order under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
        - name: id
          in: path
          description: the unique ID of the order
          required: true
          schema:
            type: string
            pattern: ^ipord_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: ipord_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonOrder'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/locations:
    post:
      operationId: inPersonCreateLocationOperation
      tags:
        - In-Person Locations
      summary: Create an location at which one or more terminals will reside
      description: >-
        Use this endpoint to setup a new location which will be used for housing
        one or more terminals. Note that once created a location's address & geo
        co-ordinates cannot be changed and instead a new location must be
        created
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to create an in person
            location under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
      requestBody:
        $ref: '#/components/requestBodies/CreateInPersonLocationRequest'
      responses:
        '200':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonLocation'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: inPersonLocationList
      tags:
        - In-Person Locations
      summary: List in-person locations
      description: Fetches an paginated list of in-person locations
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to list in person
            location under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          required: false
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the items are
            returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `50`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify the item to start querying after. This is used
            to get the next page of results after a previous response returned a
            non-null `paginationToken`. The value of the `paginationToken` field
            from that response should be supplied here, to retrieve the next
            page of results for that timestamp range.
          required: false
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonLocations'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/locations/{id}:
    get:
      operationId: inPersonLocationGetById
      tags:
        - In-Person Locations
      summary: Retrieve an in-person location
      description: Fetches an in-person location via its unique ID
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to get an in person
            location under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the location
          required: true
          schema:
            type: string
            pattern: ^iploc_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonLocation'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    patch:
      operationId: inPersonLocationUpdateById
      tags:
        - In-Person Locations
      summary: Update an in-person location
      description: >-
        Updates an in-person location via its unique ID. Note that addresses and
        geo co-ordinates cannot be updated, to do this you must create a new
        location and delete the old one
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to update an in person
            location under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the location
          required: true
          schema:
            type: string
            pattern: ^iploc_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
      requestBody:
        $ref: '#/components/requestBodies/UpdateInPersonLocationRequest'
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonLocation'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    delete:
      operationId: inPersonLocationDeleteById
      tags:
        - In-Person Locations
      summary: Delete an in-person location
      description: >-
        Deletes an in-person location. Note that once deleted, the location will
        no longer be available. You can only the location if it has no terminal
        assigned to it.
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to delete an in person
            location under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the location
          required: true
          schema:
            type: string
            pattern: ^iploc_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: The resource was successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InPersonLocationDeleted'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/terminals:
    post:
      operationId: inPersonCreateTerminalOperation
      tags:
        - In-Person Terminals
      summary: Create a terminal to register a physical device
      description: >-
        Use this endpoint to setup and register a physical terminal and begin
        accepting payments.
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to create an in person
            terminal under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
      requestBody:
        $ref: '#/components/requestBodies/CreateTerminalRequest'
      responses:
        '200':
          description: Resource successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Terminal'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    get:
      operationId: inPersonTerminalList
      tags:
        - In-Person Terminals
      summary: List terminals
      description: Fetches an paginated list of terminals
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to list in person
            terminals under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: ascending
          in: query
          schema:
            type: boolean
            format: boolean
            example: false
          description: >-
            Control the order (newest or oldest) in which the items are
            returned. `false` will arrange the results with newest first,
            whereas `true` shows oldest first. The default is `false`.
          required: false
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            example: 10
          description: >-
            Control how many items are return in a given page The max limit we
            allow is `50`. The default is `10`.
          required: false
        - name: startsAfter
          in: query
          schema:
            type: string
            example: tml_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to identify the item to start querying after. This is used
            to get the next page of results after a previous response returned a
            non-null `paginationToken`. The value of the `paginationToken` field
            from that response should be supplied here, to retrieve the next
            page of results for that timestamp range.
          required: false
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Terminals'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/terminals/{id}:
    get:
      operationId: inPersonTerminalGetById
      tags:
        - In-Person Terminals
      summary: Retrieve a terminal
      description: Fetches a terminal via its unique ID
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to get an in person
            terminal under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the terminal
          required: true
          schema:
            type: string
            pattern: ^tml_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Terminal'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    patch:
      operationId: inPersonTerminalUpdateById
      tags:
        - In-Person Terminals
      summary: Update a terminal
      description: Updates a terminal via its unique ID
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to update an in person
            terminal under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the terminal
          required: true
          schema:
            type: string
            pattern: ^tml_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
      requestBody:
        $ref: '#/components/requestBodies/UpdateTerminalRequest'
      responses:
        '200':
          description: The resource was retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Terminal'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
    delete:
      operationId: inPersonTerminalDeleteById
      tags:
        - In-Person Terminals
      summary: Delete a terminal
      description: >-
        Deletes a terminal. Note that once deleted, the terminal will no longer
        be able to accept payments.
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to delete an in person
            terminal under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the terminal
          required: true
          schema:
            type: string
            pattern: ^tml_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: The resource was successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminalDeleted'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/terminals/{id}/payment:
    post:
      operationId: inPersonTerminalInitPayment
      tags:
        - In-Person Terminals
      summary: Initiate a payment on a terminal
      description: >-
        Initiate a payment on a specific terminal. The cardholder can present
        their card to complete the purchase.
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to initiate the payment
            to an in person terminal under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the terminal
          required: true
          schema:
            type: string
            pattern: ^tml_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
      requestBody:
        $ref: '#/components/requestBodies/TerminalPaymentRequest'
      responses:
        '200':
          description: >-
            The payment was initiated on the terminal. Note that the result is
            asynchronous and will be available via webhook events.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Terminal'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/terminals/{id}/refund:
    post:
      operationId: inPersonTerminalInitRefund
      tags:
        - In-Person Terminals
      summary: Initiate a refund on a terminal
      description: >-
        Initiate a refund on a specific terminal. The cardholder can present
        their card to complete the refund.
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to initiate the refund
            to an in person terminal under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the terminal
          required: true
          schema:
            type: string
            pattern: ^tml_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
      requestBody:
        $ref: '#/components/requestBodies/TerminalRefundRequest'
      responses:
        '200':
          description: >-
            The refund was initiated on the terminal. Note that the result is
            asynchronous and will be available via webhook events.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Terminal'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
        '502':
          $ref: '#/components/responses/BadGatewayErrorResponse'
  /in-person/terminals/{id}/cancel-action:
    post:
      operationId: inPersonTerminalCancelAction
      tags:
        - In-Person Terminals
      summary: Cancel the current action on a terminal
      description: >-
        Cancel the action that has been initiated and is currently in-progress
        on a specific terminal.
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to cancel the current
            action on an in person terminal under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the terminal
          required: true
          schema:
            type: string
            pattern: ^tml_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
      responses:
        '200':
          description: >-
            The action was successfully cancelled on the terminal. A new action
            can now be initiated on this terminal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Terminal'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
  /in-person/terminals/{id}/confirm-receipt:
    post:
      operationId: inPersonTerminalConfirmReceipt
      tags:
        - In-Person Terminals
      summary: Confirm the result of receipt printing via POS for the current action
      description: >-
        Confirm the result of receipt printing via POS for the action that has
        been initiated and is currently waiting for a receipt to be printed on a
        specific terminal. This endpoint is required if the transaction's
        'receiptPrintingSource' was set to 'PointOfSale'
      security:
        - secretApiKeyAuth: []
      parameters:
        - name: Account
          in: header
          description: >-
            The linked accountId (use this when you want to cancel the current
            action on an in person terminal under a linked account)
          schema:
            type: string
            pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        - name: id
          in: path
          description: the unique ID of the terminal
          required: true
          schema:
            type: string
            pattern: ^tml_[0-7][0-9A-HJKMNP-TV-Z]{25}
            example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
      requestBody:
        $ref: '#/components/requestBodies/TerminalConfirmReceiptRequest'
      responses:
        '200':
          description: >-
            The result of receipt printing has been confirmed for the current
            action 
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Terminal'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalErrorResponse'
components:
  securitySchemes:
    secretApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    publicApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
  schemas:
    AccountTypes:
      type: string
      enum:
        - Standard
        - Sub
      description: The type of account
      example: Sub
    AccountStatuses:
      type: string
      nullable: true
      enum:
        - ActionRequired
        - Unverified
        - VerificationPending
        - Verified
      description: The overall status of the account
    AccountActions:
      type: string
      enum:
        - PayoutDetailsRequired
        - PayoutMethodRequired
        - PayoutMethodInvalid
        - VerificationRequired
        - AccountLocked
      description: >-
        The possible actions required to take if an account is in the
        'ActionRequired' status
      example: PayoutDetailsRequired
    AccountPayoutStatuses:
      type: string
      enum:
        - Completed
        - Failed
        - PendingReview
        - InProgress
        - Returned
      description: The status of the payout
      example: InProgress
    PayoutScheme:
      type: string
      nullable: true
      enum:
        - Ach
        - Bacs
        - Certis
        - Chaps
        - DataclearingenAch
        - DirectEntry
        - ElectronicFundsTransfer
        - Elixir
        - Fast
        - FedAch
        - Fps
        - GiroZrt
        - NorwegianInterbankClearingSystem
        - Swift
        - Sepa
        - SepaInstant
        - StraksclearingInstant
        - SwissInterbankClearing
        - TransFonDSentAch
      example: Fps
      description: The scheme used to payout to your account
    ErrorElement:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          example: Required property 'amount' not found in JSON
    ErrorResponse:
      type: object
      properties:
        requestId:
          type: string
          example: b83f2653-06d7-44a9-a548-5825e8186004
        code:
          type: string
          example: '400'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorElement'
    PaymentMethodOptionSettingsRequest:
      type: object
      nullable: true
      description: >-
        Use of this field is not enabled by default and subject to approval,
        please contact our support team if you wish to request it.
      properties:
        disabled:
          type: array
          items:
            type: string
            enum:
              - Amex
          description: >-
            Use this field to explicitly disable specific options from being
            used to complete payment. e.g. if you have your own requirements for
            accepting Amex on only particular transactions.


            If your customer attempts to pay with a disabled option, the payment
            session will be updated with `lastError:
            "payment_method_option_amex_disabled"`


            You can re-enable a disabled option by removing it from this array.
    PaymentSettingsRequest:
      type: object
      nullable: true
      description: Allows for customisation of various payment settings.
      properties:
        paymentMethodOptions:
          $ref: '#/components/schemas/PaymentMethodOptionSettingsRequest'
        platform:
          $ref: '#/components/schemas/PaymentPlatformSettingsRequest'
        threeDs:
          $ref: '#/components/schemas/PaymentThreeDsSettingsRequest'
    PaymentSettingsUpdateRequest:
      type: object
      description: Allows for customisation of various payment settings.
      properties:
        paymentMethodOptions:
          $ref: '#/components/schemas/PaymentMethodOptionSettingsRequest'
        threeDs:
          $ref: '#/components/schemas/PaymentThreeDsSettingsRequest'
    PaymentThreeDsSettingsRequest:
      type: object
      nullable: true
      description: >-
        Allow for customisation of various 3D-secure settings when leveraging
        Ryft's 3D-secure MPI
      properties:
        challengeIndicator:
          type: string
          nullable: true
          enum:
            - NoPreference
            - NoChallengeRequested
            - ChallengeRequested
            - TransactionRiskAnalysisAlreadyPerformed
          example: NoPreference
          description: >-
            Optional 3DS challenge preference.


            - `NoPreference`: No explicit challenge preference is requested.

            - `NoChallengeRequested`: Request a frictionless flow where
            possible.

            - `ChallengeRequested`: Request that the issuer performs a
            challenge.

            - `TransactionRiskAnalysisAlreadyPerformed`: Indicates TRA has
            already been performed before authentication which requests an
            exemption from the issuer


            If omitted, no explicit preference is requested.
    PaymentTransactionSettingsRequest:
      type: object
      description: >-
        Allows for customisation of various settings for this particular
        transaction.
      properties:
        platform:
          $ref: '#/components/schemas/PaymentPlatformSettingsRequest'
    PaymentMethodOptionSettings:
      type: object
      nullable: true
      properties:
        disabled:
          type: array
          items:
            type: string
            enum:
              - Amex
          description: >-
            Specific payment method options that have been disabled during
            payment.


            These options cannot be used to complete payment on this payment
            session.
    PaymentSessionPaymentSettings:
      type: object
      nullable: true
      description: Allows for customisation of various payment settings.
      properties:
        paymentMethodOptions:
          $ref: '#/components/schemas/PaymentMethodOptionSettings'
        platform:
          $ref: '#/components/schemas/PaymentPlatformSettings'
        threeDs:
          $ref: '#/components/schemas/PaymentThreeDsSettings'
    PaymentThreeDsSettings:
      type: object
      nullable: true
      description: 3DS challenge preference configured for this payment session.
      properties:
        challengeIndicator:
          type: string
          nullable: true
          enum:
            - NoPreference
            - NoChallengeRequested
            - ChallengeRequested
            - TransactionRiskAnalysisAlreadyPerformed
          example: NoPreference
    CreatePaymentSessionRequestBody:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          format: int32
          example: 500
          minimum: 30
          maximum: 1000000000
          description: >-
            The amount of the sale/purchase in minor digits. Minimum and maximum
            amounts [vary by
            currency](https://developer.ryftpay.com/documentation/overview/core_concepts/currencies).
        currency:
          type: string
          example: GBP
          description: The ISO currency code
        customerEmail:
          type: string
          example: example@mail.com
          description: >-
            The email address of the customer This is required for a payment to
            be taken and must be provided either here or when attempting
            payment. We recommend providing the email here when payment is being
            taken via your checkout page or the user is logged in, otherwise
            request it when attempting payment. This can be omitted if you
            supply a `customerId` instead, in which case we will use the email
            stored against the customer. If you don't supply a 'customerId' we
            will implicitly create a customer using this email
          nullable: true
        customerDetails:
          type: object
          properties:
            id:
              type: string
              example: cus_01G0EYVFR02KBBVE2YWQ8AKMGJ
              description: >-
                The Id of an existing Ryft customer. This is relevant if you are
                checking out a customer who isn't a guest.
              nullable: true
            firstName:
              type: string
              description: >-
                The first name of the new Ryft customer that will be implicitly
                created when you do not provide a customer id. You cannot use
                this to update an existing customer's first name, if you wish to
                do this then use the update customer endpoint. This will be sent
                with any associated customer events on your webhooks,
              nullable: true
              minLength: 1
              maxLength: 80
              example: Isaac
            lastName:
              type: string
              description: >-
                The last name of the new Ryft customer that will be implicitly
                created when you do not provide a customer id. You cannot use
                this to update an existing customer's last name, if you wish to
                do this then use the update customer endpoint. This will be sent
                with any associated customer events on your webhooks.
              nullable: true
              minLength: 1
              maxLength: 80
              example: Clarke
            homePhoneNumber:
              type: string
              description: >-
                The home phone number of the new Ryft customer that will be
                implicitly created when you do not provide a customer id. You
                cannot use this to update an existing customer's home phone
                number, if you wish to do this then use the update customer
                endpoint. This will be sent with any associated customer events
                on your webhooks, Must be in E.164 format!
              nullable: true
              example: '+447900000000'
            mobilePhoneNumber:
              type: string
              description: >-
                The mobile phone number of the new Ryft customer that will be
                implicitly created when you do not provide a customer id. You
                cannot use this to update an existing customer's mobile phone
                number, if you wish to do this then use the update customer
                endpoint. This will be sent with any associated customer events
                on your webhooks, Must be in E.164 format!
              nullable: true
              example: '+447900000000'
            metadata:
              type: object
              description: >-
                The key-value data to be attached to the new Ryft customer that
                will be implicitly created when you do not provide a customer
                id. You cannot use this to update an existing customer's
                metadata, if you wish to do this then use the update customer
                endpoint. These will be sent with any associated customer events
                on your webhooks. You can have a maximum of 5 pieces of
                metadata.
              example:
                customerId: '123'
              nullable: true
        platformFee:
          type: integer
          nullable: true
          format: int32
          example: 50
          minimum: 0
          maximum: 1000000000
          description: >-
            The amount (if any) that will be taken and applied to the platform
            account. This cannot be greater than the "amount" property Supply
            this if you also are supplying the "Account" header and want to take
            a fee from that account
        passThroughProcessingFee:
          type: boolean
          nullable: true
          deprecated: true
          example: false
          description: >-
            Use this flag to control which account pays our processing fee. Use
            of this feature is disabled by default, please contact our support
            team if you wish to use it.


            This field is no longer supported. Please refer to the
            `platformSettings.paymentFees` field instead.
        splits:
          $ref: '#/components/schemas/SplitPaymentRequestDetail'
        captureFlow:
          type: string
          enum:
            - Automatic
            - Manual
          nullable: true
          example: Automatic
          description: >-
            By default we will automatically capture payment once the customer
            authorizes the payment. If you want to manually capture a payment
            yourself then set this to `Manual`. Typically this is recommended if
            you wish to authorize a particular amount from a customer for up to
            7 days and then capture the funds once you can fulfil the order.
        paymentType:
          type: string
          nullable: true
          enum:
            - Standard
            - Unscheduled
            - MOTO
            - Recurring
          default: Standard
          example: Standard
          description: >-
            The type of the payment. Use this to control whether the payment is
            classified as a Customer-Initiated Transaction (CIT) or
            Merchant-Initiated Transaction (MIT).

            (MIT) - customer is not actively participating in the transaction
            and has instead given consent for you to charge their stored card
            off session.

            (CIT) - customer is actively in your checkout flow and is on hand to
            react to and complete any supplementary steps to complete the
            payment (e.g. 3DS).

            CIT values:
              - `Standard` - A regular one-off e-commerce payment, made by a customer on your website/app

            MIT values:
             - `Unscheduled` (subsequent) - Uses an already stored card on file for a fixed or variable amount that does not occur on a scheduled or regular basis
             such as recurring payments/subcriptions.

            `Recurring` or `Unscheduled` are classified as CIT if it is the
            initial payment in the series and MIT if it is a subsequent (follow
            up) payment in the series.


            `MOTO` has now been deprecated in favour of the `entryMode` (`MOTO`)
            field.
        entryMode:
          $ref: '#/components/schemas/EntryModeRequest'
        previousPayment:
          type: object
          nullable: true
          description: >-
            For recurring/unscheduled payments - details of the initial payment
            in the series. Required for:
              - partners who want to externally schedule `Recurring` payments.
              - partners who process `Unscheduled` payments
          properties:
            id:
              type: string
              pattern: ^ps_[0-7][0-9A-HJKMNP-TV-Z]{25}
              description: The Id of the initial Payment Session in the series
              example: ps_01JW8YG06VVT1AK044C9J1C0YZ
        rebillingDetail:
          anyOf:
            - $ref: '#/components/schemas/RebillingDetailRequest'
          description: >-
            Details the parameters specific to recurring payments (e.g.
            Subscriptions).

            Required if:
              - this is the initial transaction in the recurring series.
              - you are creating the Recurring transactions (`paymentType: Recurring`)
        verifyAccount:
          type: boolean
          nullable: true
          description: >-
            Set this field to `true` and `amount: 0` to perform an account
            verification payment (no financial impact on the customer). In this
            flow, you should have the customer complete the payment on the
            client. We recommend always using our iOS/Android/Web SDKs to handle
            any required actions (e.g. 3DS). **Note** that:
              - `CaptureFlow` will default to `Manual`, do not pass `Automatic` otherwise the request will be rejected.
              - `platformFee` cannot be provided in your request - sub accounts cannot be charged for these payments.
              - `splits` cannot be provided in your request - there is no amount to split.
          example: null
        shippingDetails:
          anyOf:
            - $ref: '#/components/schemas/ShippingDetailsRequest'
          description: >-
            The shipping details for the purchase/payment. This is optional but
            recommended to reduce fraudulent payments.
        orderDetails:
          anyOf:
            - $ref: '#/components/schemas/OrderDetails'
          description: >-
            The details of the customer's order. Currently includes line item
            information.
        metadata:
          type: object
          nullable: true
          description: >-
            Use this parameter to attach key-value data to the payment. These
            will be sent with any associated payment events on your webhooks.
            You can have a maximum of 10 pieces of metadata.


            Keys must be between 1 and 30 characters in length.


            Values must be between 1 and 250 characters in length.
          example:
            orderId: '1'
            customerId: '123'
        statementDescriptor:
          allOf:
            - $ref: '#/components/schemas/NullableStatementDescriptor'
          example:
            descriptor: Ryft Ltd
            city: London
        returnUrl:
          type: string
          nullable: true
          example: https://ryftpay.com/checkout?orderId=123
          description: >-
            URL to send the customer back to after a redirection (e.g. 3DS).
            This field is optional and if not specified we will use the URL
            setup against your account. For **Web** The URL should use protocol
            https://

            We recommend you include your own query parameters on this URL so
            you can identify the transaction that the payment relates too, e.g.
            `?orderId=123`.

            We will append the payment session id onto the URL under param `ps`.
        attemptPayment:
          $ref: '#/components/schemas/CreatePaymentSessionAttemptPaymentRequest'
        paymentSettings:
          $ref: '#/components/schemas/PaymentSettingsRequest'
    UpdatePaymentSessionRequestBody:
      type: object
      properties:
        amount:
          type: integer
          format: int32
          example: 500
          minimum: 30
          maximum: 1000000000
          description: >-
            The amount of the sale/purchase in minor digits. Minimum and maximum
            amounts [vary by
            currency](https://developer.ryftpay.com/documentation/overview/core_concepts/currencies).
        customerEmail:
          type: string
          example: example@mail.com
          description: The email address of the customer
        platformFee:
          type: integer
          nullable: true
          format: int32
          example: 50
          minimum: 0
          maximum: 1000000000
          description: >-
            The amount (if any) that will be taken and applied to the platform
            account. This cannot be greater than the "amount" property
        splits:
          $ref: '#/components/schemas/SplitPaymentRequestDetail'
        metadata:
          type: object
          nullable: true
          description: >-
            Use this parameter to attach key-value data to the payment. These
            will be sent with any associated payment events on your webhook. You
            can have a maximum of 10 pieces of metadata.


            Keys must be between 1 and 30 characters in length.


            Values must be between 1 and 250 characters in length.
          example:
            orderId: '2'
        captureFlow:
          type: string
          enum:
            - Automatic
            - Manual
          nullable: true
          example: Automatic
          description: >-
            By default we will automatically capture payment once the customer
            authorizes the payment. If you want to manually capture a payment
            yourself then set this to `Manual`. Typically this is recommended if
            you wish to authorize a particular amount from a customer for up to
            7 days and then capture the funds once you can fulfil the order.
        shippingDetails:
          anyOf:
            - $ref: '#/components/schemas/ShippingDetails'
          description: >-
            The shipping details for the purchase/payment. This is optional but
            recommended to reduce fraudulent payments.
        orderDetails:
          anyOf:
            - $ref: '#/components/schemas/OrderDetails'
          description: >-
            The details of the customer's order. Currently includes line item
            information.
        paymentSettings:
          $ref: '#/components/schemas/PaymentSettingsUpdateRequest'
    PaymentRequestPaymentMethod:
      type: object
      properties:
        id:
          type: string
          example: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The Id of the payment method to pay with
        cvc:
          type: string
          description: >-
            The card verification code. 3/4 digits This is primarily not
            required, but can be collected again from the customer and submitted
            with an existing payment-method (card-only) if you want to run a cvc
            check again. Note that if this check fails the payment too will
            fail.
          example: '100'
          nullable: true
    AttemptPaymentPaymentMethodOptions:
      type: object
      properties:
        store:
          type: boolean
          example: false
          description: >-
            Set this to `true` if you want to store the customer's card details
            on file. This will currently only be applied to `cardDetails`
            payments. If `true`, we will set the stored payment method as the
            customer's default/preferred payment method.
    ShippingDetailsRequest:
      type: object
      nullable: true
      required:
        - address
      properties:
        address:
          $ref: '#/components/schemas/CustomerAddress'
        phoneNumber:
          type: string
          nullable: true
          description: >-
            The phone number of the recipient receiving the goods. Must be in
            E.164 format
          example: '+447900000000'
          minLength: 1
          maxLength: 17
      example:
        address:
          firstName: Fox
          lastName: Mulder
          lineOne: Stonehenge
          postalCode: SP4 7DE
          city: Salisbury
          country: GB
        phoneNumber: '+447900000000'
    AttemptPaymentRequestBody:
      type: object
      required:
        - clientSecret
      properties:
        clientSecret:
          type: string
          description: The client secret of the payment session.
          example: >-
            ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
        paymentMethodType:
          type: string
          enum:
            - Card
          nullable: true
          default: Card
          description: The type of the payment method the customer has opted to pay with.
          example: Card
        cardDetails:
          $ref: '#/components/schemas/CardDetails'
        walletDetails:
          $ref: '#/components/schemas/WalletDetails'
        paymentMethod:
          $ref: '#/components/schemas/PaymentRequestPaymentMethod'
        paymentMethodOptions:
          $ref: '#/components/schemas/AttemptPaymentPaymentMethodOptions'
        billingAddress:
          $ref: '#/components/schemas/CustomerAddress'
        customerDetails:
          $ref: '#/components/schemas/CustomerDetails'
        shippingDetails:
          $ref: '#/components/schemas/ShippingDetailsRequest'
        threeDsRequestDetails:
          $ref: '#/components/schemas/ThreeDsRequestDetails'
    CreatePaymentSessionAttemptPaymentRequest:
      type: object
      nullable: true
      description: >-
        Use to immediately attempt payment at the time of creating the
        PaymentSession.
      required:
        - paymentMethod
      properties:
        paymentMethod:
          $ref: '#/components/schemas/PaymentRequestPaymentMethod'
    ContinuePaymentRequestBody:
      type: object
      required:
        - clientSecret
        - threeDs
      properties:
        clientSecret:
          type: string
          description: The client secret of the payment session.
          example: >-
            ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
        threeDs:
          $ref: '#/components/schemas/ContinueThreeDsRequest'
    CapturePaymentRequestBody:
      type: object
      properties:
        amount:
          type: integer
          format: int32
          nullable: true
          example: 500
          minimum: 1
          maximum: 1000000000
          description: >-
            The amount to capture in minor digits. This must be <= to the amount
            already authorised on the payment. If you don't supply this then we
            will capture the full amount. **Note:** typically any remainder will
            be reversed/refunded to the customer on the same day, however not
            all acquirers support this and will instead return the remainder
            once the initial authorization has expired (e.g. after 7 days).
        captureType:
          type: string
          enum:
            - Final
            - NotFinal
          nullable: true
          default: Final
          description: >-
            The type of capture. Typically only used for payments that support
            multi-capture. Once `Final`, any remaining uncaptured amount will be
            marked as void within 7 days. **Note** that if your account or the
            chosen payment does not support multi-capture then this field will
            be ignored.
          example: Final
        platformFee:
          type: integer
          nullable: true
          format: int32
          example: 50
          minimum: 0
          maximum: 1000000000
          description: >-
            The amount (if any) that will be taken and applied to the platform
            account. This cannot be greater than the `amount` to capture. Supply
            this if you also are supplying the "Account" header and want to take
            a fee from that account as part of this capture. If not supplied
            this defaults to the `platformFee` used when creating the payment
            session (if any) but still cannot be greater than the `amount` to
            capture here.
        splits:
          $ref: '#/components/schemas/SplitPaymentRequestDetail'
        settings:
          $ref: '#/components/schemas/PaymentTransactionSettingsRequest'
    CreateRefundRequestBody:
      type: object
      properties:
        amount:
          type: integer
          format: int32
          example: 500
          minimum: 1
          maximum: 1000000000
          nullable: true
          description: >-
            The amount to refund in minor digits. Can be omitted when not using
            partial captures or splits; the remaining amount will be refunded.
        reason:
          type: string
          nullable: true
          description: The reason for the refund
          example: Requested by the customer
        refundPlatformFee:
          type: boolean
          nullable: true
          description: >-
            A flag to indicate whether the platform fee should be refunded. If
            the payment amount is fully refunded, the platform fee will be too.
            If this is a partial refund then the platform fee will be refunded
            proportionally to the amount being refunded. By default this flag is
            false.
          example: false
        splits:
          type: object
          nullable: true
          properties:
            items:
              type: array
              minItems: 1
              maxItems: 10
              items:
                $ref: '#/components/schemas/SplitPaymentRefundItem'
        captureTransaction:
          type: object
          nullable: true
          description: >-
            Required if you have actioned multiple captures against a single
            PaymentSession. This must match the Id of a particular capture
            transaction as returned from the /captures endpoint. Note that the
            amount to refund cannot exceed the amount you captured for that
            /captures request.
          properties:
            id:
              type: string
              description: The unique Id of the partial capture transaction
              example: txn_01FCTS1XMKH9FF43CAFA4CXT3P_01FCTS1XMKH9FF43CAFA4CXT3P
    StatementDescriptor:
      type: object
      properties:
        descriptor:
          type: string
          example: Ryft Ltd
          minLength: 5
          maxLength: 22
          description: >-
            The statement descriptor that will be shown on the customer's bank
            statement for this payment. If you don't specify this then the
            descriptor set on your account will be used instead.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            ]*[A-Za-z][A-Za-z0-9 ]*$
        city:
          type: string
          minLength: 1
          maxLength: 13
          example: London
          description: >-
            This is the city that will be shown on the statements of the
            account's customers. If you don't specify this then the descriptor
            set on your account will be used instead.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            ]*[A-Za-z][A-Za-z0-9 ]*$
    NullableStatementDescriptor:
      type: object
      nullable: true
      properties:
        descriptor:
          type: string
          example: Ryft Ltd
          minLength: 5
          maxLength: 22
          description: >-
            The statement descriptor that will be shown on the customer's bank
            statement for this payment. If you don't specify this then the
            descriptor set on your account will be used instead.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            ]*[A-Za-z][A-Za-z0-9 ]*$
        city:
          type: string
          minLength: 1
          maxLength: 13
          example: London
          description: >-
            This is the city that will be shown on the statements of the
            account's customers. If you don't specify this then the descriptor
            set on your account will be used instead.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            ]*[A-Za-z][A-Za-z0-9 ]*$
    SubscriptionStatementDescriptorRequest:
      type: object
      nullable: true
      description: >-
        Used to supply a dynamic statement descriptor for the payments created
        throughout the lifecycle of this subscription. **Note** that dynamic
        statement descriptors are not enabled by default and will be ignored if
        passed.
      properties:
        descriptor:
          type: string
          example: Ryft Ltd
          minLength: 5
          maxLength: 22
          description: >-
            The statement descriptor that will be shown on the customer's bank
            statement for this payment. If you don't specify this then the
            descriptor set on your account will be used instead.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            ]*[A-Za-z][A-Za-z0-9 ]*$
        city:
          type: string
          minLength: 1
          maxLength: 13
          example: London
          description: >-
            This is the city that will be shown on the statements of the
            account's customers. If you don't specify this then the descriptor
            set on your account will be used instead.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            ]*[A-Za-z][A-Za-z0-9 ]*$
    SubscriptionBalance:
      type: object
      example:
        amount: 5000
      description: >-
        The full outstanding amount owed by the customer for this subscription.
        Any outstanding amount will be included in future cycle payments (on top
        of the recurring price)
      properties:
        amount:
          type: integer
          format: int64
          example: 5000
          description: The amount owed (in minor units of the currency in price)
    RequiredAction:
      type: object
      nullable: true
      example:
        type: Redirect
        url: https://ryftpay.com/3ds-auth
      description: >-
        The action to take (if any) in order to authorise the payment. This will
        be non-null if the customer's bank challenge the payment (i.e. 3DS)
      properties:
        type:
          type: string
          enum:
            - Redirect
            - Identify
            - Challenge
          description: The type of action
          example: Redirect
        url:
          type: string
          nullable: true
          description: The url to redirect to (if the requiredAction has type `Redirect`)
          example: https://ryftpay.com/3ds-auth
        identify:
          type: object
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/RequiredActionIdentifyWeb'
            - $ref: '#/components/schemas/RequiredActionIdentifyApp'
        challenge:
          type: object
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/RequiredActionChallenge'
    RequiredActionIdentifyWeb:
      type: object
      nullable: true
      description: >-
        Contains the details required to perform device data collection during
        3DS (for browser/web authentication only) We recommend using our
        embedded SDK to handle this action for you.
      properties:
        uniqueId:
          type: string
          nullable: true
          description: A uniqueId used to identify the transaction within the 3ds-server
          example: 6d81b2d94b4635b8828da65b3c153e63
        threeDsMethodUrl:
          type: string
          example: https://ryftpay.com/threeds/threeds_method
        threeDsMethodSignature:
          type: string
          example: >-
            0d59e06f7649ade2f08f1e26c12522c3b42129149f834151593c20b55b64ac7ebdf02027cba262201235ac21d8c71626806824fa8f10bf9d7209c18ea5706587
        sessionId:
          type: string
          example: se_1234
        sessionSecret:
          type: string
          example: secret_1234
        threeDsMethodData:
          type: string
          example: >-
            eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjQzNjFjMmVhLWM4NmUtNGNjYi05YWRjLWU4Yjg3Zjc5YzI1ZCIsInRocmVlRFNDb21wSW5kIjoiTiJ9
        scheme:
          type: string
          example: Mastercard
        paymentMethodId:
          type: string
          pattern: ^pmt_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The Id of the tokenized payment method belonging to this 3DS session
    RequiredActionIdentifyApp:
      type: object
      nullable: true
      description: >-
        Contains the details required to perform device data collection during
        3DS (for native iOS & Android) **Note** that this is subject to change
        and should only be handled by our native SDKs.
      required:
        - scheme
        - paymentMethodId
      properties:
        sessionId:
          type: string
          example: se_1234
        sessionSecret:
          type: string
          example: secret_1234
        scheme:
          type: string
          example: mastercard
        paymentMethodId:
          type: string
          pattern: ^pmt_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The Id of the tokenized payment method belonging to this 3DS session
        protocolVersion:
          type: string
          example: 2.2.0
          description: >-
            The 3DS message protocol version the native SDK should target when
            creating the Ravelin transaction.
        ravelinPublicKey:
          type: string
          example: pk_test_abc123
          description: >-
            The Ravelin public API key. Used as a Bearer token when initialising
            the Ravelin 3DS service on iOS / Android.
    RequiredActionChallenge:
      type: object
      nullable: true
      description: >-
        Details required to perform the 3DS challenge step for browser/web or
        native iOS & Android flows.
      oneOf:
        - required:
            - acsUrl
            - cReq
        - required:
            - threeDSServerTransactionID
            - acsTransactionID
            - acsRefNumber
            - acsSignedContent
      properties:
        acsUrl:
          type: string
          description: Fully qualified URL of the ACS to be used for the 3DS challenge
          example: https://ryftpay.com/threeds/challenge
        cReq:
          type: string
          description: base64 encoded challenge request message
          example: >-
            eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjkwYzdhMGYzLTUzNzItNDAwYi1iOWIyLWQyNjZkZjczYWExMSIsImFjc1RyYW5zSUQiOiJkN2MxZWU5OS05NDc4LTQ0YTYtYjFmMi0zOTFlMjljNmIzNDAiLCJtZXNzYWdlVHlwZSI6IkNSZXEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMS4wIiwiY2hhbGxlbmdlV2luZG93U2l6ZSI6IjAxIn0=
        threeDSServerTransactionID:
          type: string
          example: d41f6200-0435-49ee-aa11-f366f0661c6f
          description: 3DS Server transaction ID issued for this authentication.
        acsTransactionID:
          type: string
          example: d7c1ee99-9478-44a6-b1f2-391e29c6b340
          description: ACS transaction ID returned by the issuer's ACS.
        acsRefNumber:
          type: string
          example: 3DS_LOA_ACS_2.2.0
          description: ACS reference number identifying the issuer's ACS implementation.
        acsSignedContent:
          type: string
          example: eyJhbGciOiJFUzI1NiJ9.eyJhY3NfdHJhbnNfaWQiOiJkN2MxZWU5OSJ9.signature
          description: Signed JWS from the ACS containing the challenge protocol data.
    CardDetails:
      type: object
      required:
        - number
        - expiryMonth
        - expiryYear
      properties:
        number:
          type: string
          description: The 16-digit card number
          example: '4444333322221111'
        expiryMonth:
          type: string
          description: The 2-digit expiry month of the card
          example: '10'
        expiryYear:
          type: string
          description: The 4-digit expiry year of the card
          example: '2024'
        cvc:
          type: string
          nullable: true
          description: >-
            The card verification code. 3/4 digits.


            Note that this parameter is **required** unless:
             - you are processing MOTO entered transactions; and you have approval to not supply this field.

            Failure to provide this will result in the payment being declined
            with `lastError: "cvc_required"`
          example: '100'
        name:
          type: string
          nullable: true
          description: >-
            (optional) The card holder's name as printed on the card. Must be at
            least 2 words and max length 120.
          example: MR ISAAC CLARKE
    WalletDetails:
      type: object
      properties:
        type:
          type: string
          enum:
            - GooglePay
            - ApplePay
          example: ApplePay
        googlePayToken:
          type: string
          description: The encrypted GooglePay token obtained on the client-side
          example: >-
            {"signature":"MEYCIQCOjFuUGDkyieeJCQkm23qMSsQtGRjjVcWuAEHjdcGtNH+fx9GD342jNa","intermediateSigningKey":{"signedKey":"{\"keyValue\":\"MFkwEjHIVnhmXEs2OjgvsLYCuiwXttkLpM5EFA3snvzPBUzT9hFeUuPCBTyP+83vbpNo5WFqjObGuVj3EFYRa0bGQ0+4ZYlk16tk4cGqVliuD2VS+ooPiDzztKahTj3tNicjyUjpD7AxiMPf/RHsHTlXs+m79EibjQxyE/CjlqrwfA3qpxJpdkt/ihS8JlVhQP8d/gnV/Get36o02gZc/F9s7kfG6Ur/rZ0Nf5F0yVCfZfgYCIeEPE415sjm0yJehlmVJ+iWrsdoUjrTlDfNqUj8m44vfxyrmTbk2HaAgy+LWyu0DtBFHtQsecZpGyYLGbiTRbL/F6wXEZEcM9W8lFy7pNtyx2FpvGFKPOnM8hAEhJ6OkDHMNmBSZWoqY9PLeVeXvbuW9KdKzHeGkFQmsypKBrkT5XDmP49AFAnaGyVfvtBunLdt4SrPqJgSpvLdBhvOwHNQRSAaaUx6xBQqEecVAZF/fdwpcMXc2Mc\",\"ephemeralPublicKey\":\"BEPsTEoiu6nyicBC9EhvTE45t8+IxjiKiifT/tmytIhn+O6d+cGSuiSmzeg1k1X0xZqr...",\"tag\":\"pDKKl7MBNL+CnyrY6XB8E/T6hbbnEo8q4\\u003d\"}"}
        applePayToken:
          type: string
          description: The base64 encoded paymentData returned by Apple on the client-side
          example: >-
            eyJ2ZXJzaW9uIjoiRUNfdjEiLCJkYXRhIjoiN21Fay9BSGh2OXJzSmM1K0NFbVhRaERHaHZCMjViaDFxb0hTZmVVWHpiNFA5Nk5ieWd6alV3ZnR3RXJUYmRhQ3FFMXFi......
    CustomerAddress:
      type: object
      nullable: true
      required:
        - country
        - postalCode
      properties:
        firstName:
          type: string
          description: The first name of the customer
          minLength: 1
          maxLength: 80
          example: Nathan
        lastName:
          type: string
          description: The last name of the customer
          minLength: 1
          maxLength: 80
          example: Jones
        lineOne:
          type: string
          description: First line of the address
          minLength: 1
          maxLength: 80
          example: 123 Test Street
        lineTwo:
          type: string
          description: Second line of the address
          minLength: 1
          maxLength: 80
          example: 456 Lane
        city:
          type: string
          description: The address city/town
          minLength: 2
          maxLength: 50
          example: Manchester
        country:
          type: string
          description: The two-character ISO country code
          example: GB
          minLength: 2
          maxLength: 2
        postalCode:
          type: string
          description: The postal code/zip of the address
          minLength: 2
          maxLength: 16
          example: SP4 7DE
        region:
          type: string
          nullable: true
          description: >-
            The state/county/province/region Required if the address is in the
            US/Canada and must be a 2-character ISO state/province code
          minLength: 1
          maxLength: 80
          example: NY
    PaymentMethodChecks:
      type: object
      nullable: true
      properties:
        avsResponseCode:
          type: string
          nullable: true
          minLength: 1
          maxLength: 1
          example: 'Y'
          description: >-
            The response from Address Verification Service (AVS) that determines
            the match or  partial match of the customer's billing address.

            Possible values:

            - A - Partial Match (street address matches, postal/zip code does
            not match)

            - B - Partial Match (street address matches, postal/zip code not
            verified)

            - C - No Match (street address and postal/zip code not verified)

            - D - Full Match (street address and postal/zip code match)

            - F - Full Match (street address and postal/zip code match)

            - G - Not Supported (address information not verified)

            - I - No Match (address information not verified)

            - M - Full Match (street address and postal/zip code match)

            - N - No Match (neither street address not postal/zip code match)

            - P - Partial Match (postal/zip code matches, street address not
            verified)

            - R - System Unavailable (unable to perform verification)

            - S - Not Supported (AVS currently not supported by issuer)

            - U - System Unavailable (address information not verified due to no
            data from issuer)

            - W - Partial Match (postal/zip code matches, street address does
            not match)

            - X - Full Match (street address and postal/zip code match)

            - Y - Full Match (street address and postal/zip code match)

            - Z - Partial Match (postal/zip code matches, street address does
            not match)
        cvvResponseCode:
          type: string
          nullable: true
          minLength: 1
          maxLength: 1
          example: M
          description: >-
            The response from the check on the Card Verification Value
            (CVV/CVV2/CVC)

            Possible values:

            - M - Match (Visa and MC)

            - Y - Match (Amex)

            - N - No Match

            - P - Not Processed

            - S - Should be on card

            - U - Issuer does not participate
    AccountAddress:
      type: object
      properties:
        lineOne:
          type: string
          nullable: true
          description: >-
            First line of the address.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            !&'()+,-./:;]*$
          minLength: 2
          maxLength: 80
          example: 123 Test Street
        lineTwo:
          type: string
          nullable: true
          description: >-
            Second line of the address.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            !&'()+,-./:;]*$
          minLength: 2
          maxLength: 80
          example: null
        city:
          type: string
          nullable: true
          description: >-
            The address city/town

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            !&'()+,-./:;]*$
          minLength: 2
          maxLength: 50
          example: Manchester
        country:
          type: string
          description: The two-character ISO country code
          example: GB
          minLength: 2
          maxLength: 2
        postalCode:
          type: string
          nullable: true
          description: |-
            The postal/zip code of the address.
            It must satisfy the following regex pattern: ^[A-Za-z0-9 -]*$
          minLength: 2
          maxLength: 16
          example: SP4 7DE
        region:
          type: string
          nullable: true
          description: >-
            The state/county/province/region Required if the address is in the
            US/Canada and must be a 2-character ISO state/province code

            Otherwise it must satisfy the following regex pattern: ^[A-Za-z0-9
            !&'()+,-./:;]*$
          minLength: 1
          maxLength: 80
          example: null
    AccountAddressRequest:
      type: object
      properties:
        lineOne:
          type: string
          description: >-
            First line of the address.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            !&'()+,-./:;]*$
          minLength: 2
          maxLength: 80
          example: 123 Test Street
        lineTwo:
          type: string
          nullable: true
          description: >-
            Second line of the address.

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            !&'()+,-./:;]*$
          minLength: 2
          maxLength: 80
          example: null
        city:
          type: string
          description: >-
            The address city/town

            It must satisfy the following regex pattern: ^[A-Za-z0-9
            !&'()+,-./:;]*$
          minLength: 2
          maxLength: 50
          example: Manchester
        country:
          type: string
          description: The two-character ISO country code
          example: GB
          minLength: 2
          maxLength: 2
        postalCode:
          type: string
          description: |-
            The postal/zip code of the address.
            It must satisfy the following regex pattern: ^[A-Za-z0-9 -]*$
          minLength: 2
          maxLength: 16
          example: SP4 7DE
        region:
          type: string
          nullable: true
          description: >-
            The state/county/province/region Required if the address is in the
            US/Canada and must be a 2-character ISO state/province code

            Otherwise it must satisfy the following regex pattern: ^[A-Za-z0-9
            !&'()+,-./:;]*$
          minLength: 1
          maxLength: 80
          example: null
    CreateBusinessRequest:
      type: object
      properties:
        name:
          type: string
          description: The legal name of the business (not the operating/trade name).
          minLength: 1
          maxLength: 100
          example: Ryft LTD
        type:
          anyOf:
            - $ref: '#/components/schemas/BusinessType'
          description: The type of business
        registrationNumber:
          type: string
          example: '12345678'
          description: >-
            The registration number of the business, assigned by a government
            body. If the business is not registered then they should be created
            with `entityType` set to `Individual`
          minLength: 1
          maxLength: 50
        registrationDate:
          type: string
          nullable: true
          example: '1990-01-20'
          description: The date when the business was registered
          minLength: 10
          maxLength: 10
        registeredAddress:
          type: object
          description: The address where the business is registered
          anyOf:
            - $ref: '#/components/schemas/AccountAddressRequest'
        contactEmail:
          type: string
          format: email
          example: contact@test.com
          description: >-
            An email address used in case we need to contact you. This takes
            precedence over the 'email' on the account itself.
        phoneNumber:
          type: string
          nullable: true
          description: The phone number of the business, in E.164 format
          example: '+447900000000'
          minLength: 1
          maxLength: 17
        tradingName:
          type: string
          nullable: true
          description: The trading/operating name of the business
          minLength: 1
          maxLength: 100
          example: Ryft Computer Parts Ltd
        tradingAddress:
          type: object
          nullable: true
          description: The address where the business trades/operates
          anyOf:
            - $ref: '#/components/schemas/AccountAddressRequest'
        tradingCountries:
          type: array
          nullable: true
          example:
            - GB
          description: The countries where the business trades/operates
          items:
            type: string
            example: GB
            description: The two-character ISO 3166 country code
            minLength: 2
            maxLength: 2
        websiteUrl:
          type: string
          nullable: true
          example: https://www.example.com
          description: The website url of the business
    UpdateBusinessRequest:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: >-
            The legal name of the business (not the operating/trade name).
            Required if this is being used to populate the `business` for the
            first time.
          minLength: 1
          maxLength: 100
          example: Ryft LTD
        type:
          anyOf:
            - $ref: '#/components/schemas/BusinessType'
          description: >-
            The type of business. Required if this is being used to populate the
            `business` for the first time.
        registrationNumber:
          type: string
          nullable: true
          example: '12345678'
          description: >-
            The registration number of the business, assigned by a government
            body. If the business is not registered then they should be created
            with `entityType` set to `Individual`. Required if this is being
            used to populate the `business` for the first time.
          minLength: 1
          maxLength: 50
        registrationDate:
          type: string
          nullable: true
          example: '1990-01-20'
          description: The date when the business was registered
          minLength: 10
          maxLength: 10
        registeredAddress:
          type: object
          nullable: true
          description: >-
            The address where the business is registered. Required if this is
            being used to populate the `business` for the first time.
          anyOf:
            - $ref: '#/components/schemas/AccountAddressRequest'
        contactEmail:
          type: string
          nullable: true
          format: email
          example: contact@test.com
          description: >-
            An email address used in case we need to contact you. Required if
            this is being used to populate the `business` for the first time.
        phoneNumber:
          type: string
          nullable: true
          description: The phone number of the business, in E.164 format
          example: '+447900000000'
          minLength: 1
          maxLength: 17
        tradingName:
          type: string
          nullable: true
          description: The trading/operating name of the business
          minLength: 1
          maxLength: 100
          example: Ryft Computer Parts Ltd
        tradingAddress:
          type: object
          nullable: true
          description: The address where the business trades/operates
          anyOf:
            - $ref: '#/components/schemas/AccountAddressRequest'
        tradingCountries:
          type: array
          nullable: true
          example:
            - GB
          description: The countries where the business trades/operates
          items:
            type: string
            example: GB
            description: The two-character ISO 3166 country code
            minLength: 2
            maxLength: 2
        websiteUrl:
          type: string
          nullable: true
          example: https://www.example.com
          description: The website url of the business
        documents:
          type: array
          nullable: true
          description: >-
            The KYB documents. Note that a maximum of 1 of each document type
            can exist at any time, if you add a new document of a type that
            already exists then it will be replaced, regardless of it's status.
          items:
            anyOf:
              - $ref: '#/components/schemas/AccountDocumentRequest'
    BusinessResponse:
      type: object
      properties:
        name:
          type: string
          description: The legal name of the business (not the operating/trade name).
          minLength: 1
          maxLength: 100
          example: Ryft LTD
        type:
          anyOf:
            - $ref: '#/components/schemas/BusinessType'
          description: The type of business
        registrationNumber:
          type: string
          example: '12345678'
          nullable: true
          description: >-
            The registration number of the business, assigned by a government
            body.
          minLength: 1
          maxLength: 50
        registrationDate:
          type: string
          nullable: true
          example: '1990-01-20'
          description: The date when the business was registered
          minLength: 10
          maxLength: 10
        registeredAddress:
          type: object
          description: The address where the business is registered
          anyOf:
            - $ref: '#/components/schemas/AccountAddress'
        contactEmail:
          type: string
          format: email
          example: contact@test.com
          description: >-
            The email address used in case we need to contact you. This takes
            precedence over the 'email' on the account itself.
        phoneNumber:
          type: string
          nullable: true
          description: The phone number of the business, in E.164 format
          example: '+447900000000'
          minLength: 1
          maxLength: 17
        tradingName:
          type: string
          nullable: true
          description: The trading/operating name of the business
          minLength: 1
          maxLength: 100
          example: Ryft Computer Parts Ltd
        tradingAddress:
          type: object
          nullable: true
          description: The address where the business trades/operates
          anyOf:
            - $ref: '#/components/schemas/AccountAddress'
        tradingCountries:
          type: array
          nullable: true
          example:
            - GB
          description: The countries where the business trades/operates
          items:
            type: string
            example: GB
            description: The two-character ISO 3166 country code
            minLength: 2
            maxLength: 2
        websiteUrl:
          type: string
          nullable: true
          example: https://www.example.com
          description: The website url of the business
        documents:
          type: array
          nullable: true
          description: The KYB documents
          items:
            anyOf:
              - $ref: '#/components/schemas/AccountDocumentResponse'
    CreatePersonRequestBody:
      type: object
      properties:
        firstName:
          type: string
          example: Fred
          description: The first name of the person
          minLength: 1
          maxLength: 50
        middleNames:
          type: string
          example: David
          nullable: true
          description: The middle names of the person
          minLength: 1
          maxLength: 50
        lastName:
          type: string
          example: Jones
          description: The last name / surname of the person
          minLength: 1
          maxLength: 50
        email:
          type: string
          format: email
          example: fred.jones@example.com
          description: The email address of the person
          minLength: 1
          maxLength: 100
        dateOfBirth:
          type: string
          example: '1990-01-20'
          description: The date of birth of the person, in format YYYY-MM-DD
          minLength: 10
          maxLength: 10
        countryOfBirth:
          type: string
          nullable: true
          example: GB
          description: The two-character ISO 3166 country code of birth of the person
          minLength: 2
          maxLength: 2
        gender:
          type: string
          enum:
            - Female
            - Male
          example: Male
          description: >-
            The gender of the person. International regulations require either
            `Female` or `Male`
        nationalities:
          type: array
          example:
            - GB
          description: The countries of citizenship or nationality of the person
          items:
            type: string
            example: GB
            description: The two-character ISO 3166 country code
            minLength: 2
            maxLength: 2
        address:
          type: object
          description: The address of the person
          anyOf:
            - $ref: '#/components/schemas/AccountAddressRequest'
        phoneNumber:
          type: string
          description: The phone number of the person, in E.164 format
          minLength: 1
          maxLength: 17
          example: '+447900000000'
        businessRoles:
          type: array
          example:
            - BusinessContact
            - Director
          description: >-
            The role(s) in the business that the person performs. This must
            contain at least one value.
          items:
            $ref: '#/components/schemas/BusinessRole'
        documents:
          type: array
          nullable: true
          description: >-
            The KYC documents. Note that a maximum of 1 of each document type
            can exist at any time, if you add a new document of a type that
            already exists then it will be replaced, regardless of it's status.
          items:
            anyOf:
              - $ref: '#/components/schemas/AccountDocumentRequest'
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the person. These
            will be sent with any associated account events on your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            accountId: '1'
    CreateIndividualRequest:
      type: object
      properties:
        firstName:
          type: string
          example: Fred
          description: The first name of the individual
          minLength: 1
          maxLength: 50
        middleNames:
          type: string
          example: David
          nullable: true
          description: The middle names of the individual
          minLength: 1
          maxLength: 50
        lastName:
          type: string
          example: Jones
          description: The last name / surname of the individual
          minLength: 1
          maxLength: 50
        email:
          type: string
          format: email
          example: fred.jones@example.com
          description: >-
            The email address of the individual. This takes precedence over the
            'email' on the account itself.
          minLength: 1
          maxLength: 100
        dateOfBirth:
          type: string
          example: '1990-01-20'
          description: The date of birth of the individual, in format YYYY-MM-DD
          minLength: 10
          maxLength: 10
        countryOfBirth:
          type: string
          nullable: true
          example: GB
          description: The two-character ISO 3166 country code of birth of the individual
          minLength: 2
          maxLength: 2
        gender:
          type: string
          enum:
            - Female
            - Male
          example: Male
          description: >-
            The gender of the individual. International regulations require
            either `Female` or `Male`
        nationalities:
          type: array
          example:
            - GB
          description: The countries of citizenship or nationality of the individual
          items:
            type: string
            example: GB
            description: The two-character ISO 3166 country code
            minLength: 2
            maxLength: 2
        address:
          type: object
          description: The address of the individual
          anyOf:
            - $ref: '#/components/schemas/AccountAddressRequest'
        phoneNumber:
          type: string
          nullable: true
          description: The phone number of the individual, in E.164 format
          example: '+447900000000'
          minLength: 1
          maxLength: 17
    UpdatePersonRequestBody:
      type: object
      properties:
        firstName:
          type: string
          nullable: true
          example: Fred
          description: The first name of the person
          minLength: 1
          maxLength: 50
        middleNames:
          type: string
          example: David
          nullable: true
          description: The middle names of the person
          minLength: 1
          maxLength: 50
        lastName:
          type: string
          nullable: true
          example: Jones
          description: The last name / surname of the person
          minLength: 1
          maxLength: 50
        email:
          type: string
          nullable: true
          format: email
          example: fred.jones@example.com
          description: The email address of the person
          minLength: 1
          maxLength: 100
        dateOfBirth:
          type: string
          nullable: true
          example: '1990-01-20'
          description: The date of birth of the person, in format YYYY-MM-DD
          minLength: 10
          maxLength: 10
        countryOfBirth:
          type: string
          nullable: true
          example: GB
          description: The two-character ISO 3166 country code of birth of the person
          minLength: 2
          maxLength: 2
        gender:
          type: string
          nullable: true
          enum:
            - Female
            - Male
          example: Male
          description: >-
            The gender of the person. International regulations require either
            `Female` or `Male`
        nationalities:
          type: array
          nullable: true
          example:
            - GB
          description: The countries of citizenship or nationality of the person
          items:
            type: string
            example: GB
            description: The two-character ISO 3166 country code
            minLength: 2
            maxLength: 2
        address:
          type: object
          nullable: true
          description: The address of the person
          anyOf:
            - $ref: '#/components/schemas/AccountAddressRequest'
        phoneNumber:
          type: string
          nullable: true
          description: The phone number of the person, in E.164 format
          example: '+447900000000'
          minLength: 1
          maxLength: 17
        businessRoles:
          type: array
          example:
            - BusinessContact
            - Director
          description: >-
            The role(s) in the business that the person performs. This must
            contain at least one value.
          items:
            $ref: '#/components/schemas/BusinessRole'
        documents:
          type: array
          nullable: true
          description: >-
            The KYC documents. Note that a maximum of 1 of each document type
            can exist at any time, if you add a new document of a type that
            already exists then it will be replaced, regardless of it's status.
          items:
            anyOf:
              - $ref: '#/components/schemas/AccountDocumentRequest'
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the person. These
            will be sent with any associated account events on your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            accountId: '1'
    UpdateIndividualRequest:
      type: object
      properties:
        firstName:
          type: string
          nullable: true
          example: Fred
          description: >-
            The first name of the individual. Required if this is being used to
            populate the `individual` for the first time.
          minLength: 1
          maxLength: 50
        middleNames:
          type: string
          example: David
          nullable: true
          description: The middle names of the individual
          minLength: 1
          maxLength: 50
        lastName:
          type: string
          nullable: true
          example: Jones
          description: >-
            The last name / surname of the individual. Required if this is being
            used to populate the `individual` for the first time.
          minLength: 1
          maxLength: 50
        email:
          type: string
          nullable: true
          format: email
          example: fred.jones@example.com
          description: >-
            The email address of the individual. Required if this is being used
            to populate the `individual` for the first time.
          minLength: 1
          maxLength: 100
        dateOfBirth:
          type: string
          nullable: true
          example: '1990-01-20'
          description: >-
            The date of birth of the individual, in format YYYY-MM-DD. Required
            if this is being used to populate the `individual` for the first
            time.
          minLength: 10
          maxLength: 10
        countryOfBirth:
          type: string
          nullable: true
          example: GB
          description: The two-character ISO 3166 country code of birth of the individual
          minLength: 2
          maxLength: 2
        gender:
          type: string
          nullable: true
          enum:
            - Female
            - Male
          example: Male
          description: >-
            The gender of the individual. International regulations require
            either `Female` or `Male`. Required if this is being used to
            populate the `individual` for the first time.
        nationalities:
          type: array
          nullable: true
          example:
            - GB
          description: >-
            The countries of citizenship or nationality of the individual.
            Required if this is being used to populate the `individual` for the
            first time.
          items:
            type: string
            example: GB
            description: The two-character ISO 3166 country code
            minLength: 2
            maxLength: 2
        address:
          type: object
          nullable: true
          description: >-
            The address of the individual. Required if this is being used to
            populate the `individual` for the first time.
          anyOf:
            - $ref: '#/components/schemas/AccountAddressRequest'
        phoneNumber:
          type: string
          nullable: true
          description: The phone number of the individual, in E.164 format
          example: '+447900000000'
          minLength: 1
          maxLength: 17
        documents:
          type: array
          nullable: true
          description: >-
            The KYC documents. Note that a maximum of 1 of each document type
            can exist at any time, if you add a new document of a type that
            already exists then it will be replaced, regardless of it's status.
          items:
            anyOf:
              - $ref: '#/components/schemas/AccountDocumentRequest'
    AccountSettingsRequest:
      type: object
      properties:
        payouts:
          type: object
          description: Customise how payouts function for the account
          properties:
            schedule:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - Automatic
                    - Manual
                  example: Automatic
                  description: >-
                    `Automatic` - funds will be paid out by Ryft on the agreed
                    basis (e.g. daily)


                    `Manual` - funds will be paid out via explicit requests to
                    our /payouts API


                    By default all accounts are configured to `Automatic`.
                    **Note:** that you can only update this setting for accounts
                    onboarded through the `NonHosted` flow.
    AccountTermsOfServiceRequest:
      type: object
      properties:
        acceptance:
          type: object
          properties:
            ipAddress:
              type: string
              description: >-
                The IP address of the user who has accepted the terms &
                conditions
              example: 127.0.0.1
            userAgent:
              type: string
              nullable: true
              description: >-
                The User Agent of the user's browser who has accepted the terms
                & conditions
              example: >-
                Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
                (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
              minLength: 1
              maxLength: 2048
            when:
              type: number
              nullable: true
              format: int64
              description: >-
                The time (in epoch seconds) when the terms & conditions were
                accepted. If omitted, we will set this to the time the request
                was received.
              example: 1697557453
    PersonResponse:
      type: object
      properties:
        id:
          type: string
          description: The ID of the person
          pattern: per_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: per_01G0EYVFR02KBBVE2YWQ8AKMGJ
        firstName:
          type: string
          example: Fred
          description: The first name of the person
        middleNames:
          type: string
          example: David
          nullable: true
          description: The middle names of the person
        lastName:
          type: string
          example: Jones
          description: The last name / surname of the person
        email:
          type: string
          format: email
          nullable: true
          example: fred.jones@example.com
          description: The email address of the person
        dateOfBirth:
          type: string
          example: '1990-01-20'
          description: The date of birth of the person, in format YYYY-MM-DD
        countryOfBirth:
          type: string
          nullable: true
          example: GB
          description: The two-character ISO 3166 country code of birth of the person
        gender:
          type: string
          nullable: true
          enum:
            - Female
            - Male
          example: Male
          description: >-
            The gender of the person. International regulations require either
            `Female` or `Male`
        nationalities:
          type: array
          example:
            - GB
          description: The countries of citizenship or nationality of the person
          items:
            type: string
            example: GB
            description: The two-character ISO 3166 country code
        address:
          type: object
          description: The address of the person
          anyOf:
            - $ref: '#/components/schemas/AccountAddress'
        phoneNumber:
          type: string
          nullable: true
          description: The phone number of the person, in E.164 format
          example: '+447900000000'
        businessRoles:
          type: array
          example:
            - BusinessContact
            - Director
          description: The role(s) in the business that the person performs
          items:
            $ref: '#/components/schemas/BusinessRole'
        verification:
          $ref: '#/components/schemas/PersonVerification'
        documents:
          type: array
          nullable: true
          description: The KYC documents
          items:
            anyOf:
              - $ref: '#/components/schemas/AccountDocumentResponse'
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the person. These
            will be sent with any associated account events on your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            accountId: '1'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the person was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the person was last updated
          example: 1470989538
    IndividualResponse:
      type: object
      properties:
        firstName:
          type: string
          example: Fred
          description: The first name of the individual
        middleNames:
          type: string
          example: David
          nullable: true
          description: The middle names of the individual
        lastName:
          type: string
          example: Jones
          description: The last name / surname of the individual
        email:
          type: string
          format: email
          example: fred.jones@example.com
          description: >-
            The email address of the individual. This takes precedence over the
            'email' on the account itself.
        dateOfBirth:
          type: string
          example: '1990-01-20'
          description: The date of birth of the individual, in format YYYY-MM-DD
        countryOfBirth:
          type: string
          nullable: true
          example: GB
          description: The two-character ISO 3166 country code of birth of the individual
        gender:
          type: string
          enum:
            - Female
            - Male
          nullable: true
          example: Male
          description: >-
            The gender of the individual. International regulations require
            either `Female` or `Male`
        nationalities:
          type: array
          example:
            - GB
          nullable: true
          description: The countries of citizenship or nationality of the individual
          items:
            type: string
            example: GB
            description: The two-character ISO 3166 country code
        address:
          type: object
          nullable: true
          description: The address of the individual
          anyOf:
            - $ref: '#/components/schemas/AccountAddress'
        phoneNumber:
          type: string
          nullable: true
          description: The phone number of the individual, in E.164 format
          example: '+447900000000'
        documents:
          type: array
          nullable: true
          description: The KYC documents
          items:
            anyOf:
              - $ref: '#/components/schemas/AccountDocumentResponse'
    PersonsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PersonResponse'
        paginationToken:
          type: string
          example: per_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'startsAfter' query parameter. This
            field is null when there are no further items to return
          nullable: true
    AccountDocumentRequest:
      type: object
      description: A KYB/KYC document for a Business/Person entity
      properties:
        type:
          anyOf:
            - $ref: '#/components/schemas/AccountDocumentType'
          description: The type of document
        front:
          type: string
          description: The ID of the uploaded file that shows the front of the document
          pattern: fl_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: fl_01G0EYVFR02KBBVE2YWQ8AKMGJ
        back:
          nullable: true
          type: string
          description: >-
            The ID of the uploaded file that shows the back of the document.
            Required for `DriversLicense` or `NationalId` before verification
            can be completed.
          pattern: fl_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: fl_01G0EYVFR02KBBVE2YWQ8AKMGJ
    AccountDocumentResponse:
      type: object
      description: A KYB/KYC document for a Business/Person entity
      properties:
        type:
          $ref: '#/components/schemas/AccountDocumentType'
        category:
          $ref: '#/components/schemas/AccountDocumentCategory'
        front:
          type: string
          description: The ID of the uploaded file that shows the front of the document.
          pattern: fl_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: fl_01G0EYVFR02KBBVE2YWQ8AKMGJ
        back:
          type: string
          nullable: true
          description: >-
            The ID of the uploaded file that shows the back of the document.
            Required if uploading a `DriversLicense` or `NationalId`.
          pattern: fl_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: fl_01G0EYVFR02KBBVE2YWQ8AKMGJ
        status:
          $ref: '#/components/schemas/AccountDocumentStatus'
        invalidReason:
          type: string
          nullable: true
          example: Document has expired
          description: The reason for the document being invalid
        country:
          type: string
          nullable: true
          deprecated: true
          example: GB
          description: >-
            The two-character ISO 3166 country code of the document. Only
            present historically on documents with `type`: `Passport`,
            `DriversLicense`, `NationalId`
        assignedTimestamp:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the document was first assigned
            to the account
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the document was last updated
          example: 1470989538
    PayoutMethods:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PayoutMethod'
    PayoutMethodType:
      type: string
      example: BankAccount
      enum:
        - BankAccount
    PayoutMethodStatus:
      type: string
      example: Valid
      enum:
        - Invalid
        - Valid
    BankIdTypeRequest:
      type: string
      nullable: true
      example: SortCode
      enum:
        - RoutingNumber
        - SortCode
        - BSBCode
        - BankCode
    BankIdTypeResponse:
      type: string
      nullable: true
      example: SortCode
      enum:
        - RoutingNumber
        - SwiftCode
        - SortCode
        - BSBCode
        - BankCode
    BranchIdType:
      type: string
      nullable: true
      example: TransitNumber
      description: The types of branch ID for bank accounts.
      enum:
        - TransitNumber
    BankAccountNumberType:
      type: string
      example: UnitedKingdom
      enum:
        - Iban
        - UnitedKingdom
        - Domestic
    CreatePayoutMethodRequestBody:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/PayoutMethodType'
        displayName:
          type: string
          nullable: true
          description: A friendly name for the payout method, for display only
          example: Primary GBP Account
        currency:
          type: string
          example: GBP
          description: >-
            The three-character ISO 4217 currency code of the payout method. The
            currencies available here are the same as are available for making
            payments.
          minLength: 3
          maxLength: 3
        country:
          type: string
          example: GB
          description: >-
            The two-character ISO 3166 country code of the payout method. Only
            certain countries are supported for a given currency
          minLength: 2
          maxLength: 2
        bankAccount:
          $ref: '#/components/schemas/BankAccountRequest'
    UpdatePayoutMethodRequestBody:
      type: object
      description: >-
        The body of the request for updating a payout method. At least one field
        in the request must be provided
      properties:
        displayName:
          type: string
          nullable: true
          description: A friendly name for the payout method, for display only
          example: Primary GBP Account
        bankAccount:
          type: object
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/BankAccountRequest'
    BankAccountRequest:
      type: object
      properties:
        bankIdType:
          $ref: '#/components/schemas/BankIdTypeRequest'
        bankId:
          type: string
          nullable: true
          description: >-
            The id of the bank that the bank account is with, e.g. sort code /
            routing number / bank code (see `bankIdType` for options)
          example: '0230'
        branchIdType:
          $ref: '#/components/schemas/BranchIdType'
        branchId:
          type: string
          nullable: true
          description: >-
            The id of the branch that the bank account is with, see BranchIdType
            for types. Validation requirements may vary by country and
            BranchIdType.
          example: '11122'
        swiftCode:
          type: string
          nullable: true
          description: >-
            The Swift code / BIC of the bank.


            This is required for bank accounts paying out via Swift to certain
            countries, 

            please check our examples below + our
            [docs](https://developer.ryftpay.com/documentation/overview/core_concepts/payouts)
            for more information. 
          example: NAIAGB21
        accountNumberType:
          $ref: '#/components/schemas/BankAccountNumberType'
        accountNumber:
          type: string
          description: >-
            The account number of the bank account This is the account number or
            IBAN of the bank account, depending on the currency + country of the
            payout method
          example: '082100'
        address:
          type: object
          nullable: true
          description: >-
            The address of the bank account holder If not provided for
            `Business` entities, the address of the `business` will be used If
            not provided for `Individual` entities, the address of the
            `individual` will be used
          anyOf:
            - $ref: '#/components/schemas/AccountAddressRequest'
    PayoutMethod:
      type: object
      properties:
        id:
          type: string
          pattern: ^pm_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: pm_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The id of the payout method
        type:
          $ref: '#/components/schemas/PayoutMethodType'
        displayName:
          type: string
          nullable: true
          description: A friendly name for the payout method, for display only
          example: Primary GBP Account
        status:
          $ref: '#/components/schemas/PayoutMethodStatus'
        invalidReason:
          type: string
          nullable: true
          description: The reason why the payout method has been marked as 'Invalid'
          example: null
        currency:
          type: string
          example: GBP
          description: The three-character ISO 4217 currency code of the payout method
        countryCode:
          type: string
          example: GB
          description: The two-character ISO 3166 country code of the payout method
        bankAccount:
          $ref: '#/components/schemas/BankAccount'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the payout method was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the payout method was last
            updated
          example: 1470989538
    BankAccount:
      type: object
      properties:
        bankIdType:
          $ref: '#/components/schemas/BankIdTypeResponse'
        bankId:
          type: string
          nullable: true
          description: >-
            The id of the bank that the bank account is with, e.g. sort code /
            routing number (see `bankIdType`)
          example: '0123'
        branchIdType:
          $ref: '#/components/schemas/BranchIdType'
        branchId:
          type: string
          nullable: true
          description: >-
            The id of the branch that the bank account is with, see BranchIdType
            for types.
          example: '11122'
        bankName:
          type: string
          nullable: true
          description: The name of the bank that the bank account is with
          example: Ryft Bank Ltd
        swiftCode:
          type: string
          nullable: true
          description: The Swift code / BIC of the bank
          example: NAIAGB21
        accountNumberType:
          $ref: '#/components/schemas/BankAccountNumberType'
        last4:
          type: string
          description: >-
            The last 4 digits of the account number for the bank account. This
            is the account number or IBAN of the bank account, depending on the
            currency + country of the payout method
          example: '0001'
        address:
          type: object
          nullable: true
          description: The address of the bank account holder
          anyOf:
            - $ref: '#/components/schemas/AccountAddress'
    ShippingDetails:
      type: object
      nullable: true
      properties:
        address:
          type: object
          anyOf:
            - $ref: '#/components/schemas/CustomerAddress'
        phoneNumber:
          type: string
          nullable: true
          description: >-
            The phone number of the recipient receiving the goods, in E.164
            format
          example: '+447900000000'
          minLength: 1
          maxLength: 17
      example:
        address:
          firstName: Fox
          lastName: Mulder
          lineOne: Stonehenge
          postalCode: SP4 7DE
          city: Salisbury
          country: GB
    OrderLineItem:
      type: object
      required:
        - reference
        - name
        - quantity
        - unitPrice
        - taxAmount
        - totalAmount
      properties:
        reference:
          type: string
          example: product123
          description: Your unique Identifier for the product on this line item
          minLength: 1
          maxLength: 250
        name:
          type: string
          example: The Big Gundown (Blu-ray)
          description: The title or name of the item
          minLength: 5
          maxLength: 250
        quantity:
          type: integer
          example: 2
          description: The number of this item in the order
          minimum: 1
        unitPrice:
          type: integer
          example: 250
          description: >-
            The unit price of the item in minor units. That is, the price of a
            single unit (excluding tax).
          minimum: 0
        taxAmount:
          type: integer
          example: 50
          description: The total tax amount on this line item.
          minimum: 0
        totalAmount:
          type: integer
          example: 540
          description: >-
            The total amount of this line item (including tax & any discount).
            i.e. the total amount the customer is actually being charged for
            this line on the order. `(unitPrice * quantity) + taxAmount -
            discountAmount = totalAmount`. **Note** that the `totalAmount`
            across all items must be less than or equal the `amount` on the
            PaymentSession.
          minimum: 0
        discountAmount:
          type: integer
          nullable: true
          example: 10
          description: The total amount discounted (if any) in minor units
          minimum: 0
        productUrl:
          type: string
          nullable: true
          example: null
          description: |-
            URL of the purchased item. We recommend you use a stable URL:
              - one that should not change
              - does not include parameters that change each time you update product data (timestamps, colours etc.)
        imageUrl:
          type: string
          nullable: true
          example: null
          description: >-
            URL of your primary image for the purchased item. We recommend you
            use a stable URL:
              - one that should not change
              - does not include parameters that change each time you update product data (timestamps, colours etc.)
    OrderDetails:
      type: object
      nullable: true
      description: The details of the order
      properties:
        reference:
          type: string
          example: fffd1682-f82b-43e3-a89b-48d9ad7d55d9
          description: Your unique identifier for the order
          minLength: 1
          maxLength: 250
          nullable: true
        items:
          type: array
          minItems: 1
          maxItems: 20
          items:
            $ref: '#/components/schemas/OrderLineItem'
    PaymentSessionPaymentMethodTokenizedDetails:
      type: object
      nullable: true
      description: The details of any tokenized payment method used
      properties:
        id:
          type: string
          pattern: ^pmt_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The Id of the tokenized payment method
        stored:
          type: boolean
          example: true
          description: >-
            Flag to indicate whether or not the tokenized payment method was
            stored (against the customer)
    CustomerDetails:
      type: object
      properties:
        email:
          type: string
          example: example@mail.com
          description: >-
            The email address of the customer This is required for a payment to
            be taken and must be provided here if not provided when creating the
            payment session. We recommend only providing the email here if
            payment is being taken for guest users who don't transact via your
            checkout page, e.g. when using Apple Pay or Google Pay on a product
            page
        homePhoneNumber:
          type: string
          description: >-
            The home phone number of the customer. Can be provided here if not
            available at the time of creating the payment session. Must be in
            E.164 format!
          nullable: true
          example: '+447900000000'
        mobilePhoneNumber:
          type: string
          description: >-
            The mobile phone number of the customer. Can be provided here if not
            available at the time of creating the payment session. Must be in
            E.164 format!
          nullable: true
          example: '+447900000000'
    SplitPaymentRequestItem:
      type: object
      required:
        - accountId
        - amount
      properties:
        accountId:
          type: string
          description: >-
            The ID of the sub account who will receive this split payment amount
            in the form of a `SplitPayment`.
          example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        amount:
          type: integer
          format: int32
          example: 50
          minimum: 1
          maximum: 1000000000
        description:
          type: string
          description: >-
            A short description of this split that will be displayed to the
            account.
          example: 2 x The Selfish Gene
          minLength: 1
          maxLength: 100
        fee:
          type: object
          properties:
            amount:
              type: integer
              format: int32
              example: 50
              minimum: 1
              maximum: 1000000000
        metadata:
          type: object
          example:
            productId: '123'
            productTitle: The Selfish Gene
          nullable: true
          description: >-
            The metadata to attach to this part of the split. This will be used
            to populate `metadata` on the `SplitPayment` once it is subsequently
            created. You can have a maximum of 3 pieces of metadata.
    RebillingDetailRequest:
      type: object
      nullable: true
      required:
        - numberOfDaysBetweenPayments
      properties:
        amountVariance:
          type: string
          enum:
            - Fixed
            - Variable
          nullable: true
          default: Variable
          description: >-
            Whether the customer is paying a fixed (non-variable) amount on each
            payment or an amount which can vary.
          example: Fixed
        numberOfDaysBetweenPayments:
          type: number
          format: int32
          description: The minimum number of days between each payment
          minimum: 1
          maximum: 9999
          example: 30
        totalNumberOfPayments:
          type: number
          format: int32
          nullable: true
          description: >-
            The total number of payments to be billed. Can be omitted if the
            recurring plan is set to run indefinitely
          minimum: 2
          maximum: 9999
          example: 12
        currentPaymentNumber:
          type: number
          format: int32
          nullable: true
          description: >-
            Indicates the position in the rebilling sequence for this payment.
            e.g. if the cardholder is being billed once monthly for 12 months
            and this payment is for month 7, set this field to 7.

            This field should not take into account failures. That is, if you
            need to perform several payments to eventually bill the customer for
            a particular billing period (for example if their card has
            insufficient funds on your initial attempt), do not increment this
            number for each attempt.
          minimum: 1
          maximum: 9999
          example: 4
        expiry:
          type: number
          format: int64
          nullable: true
          description: >-
            The date (in epoch seconds) after which no further subsequent
            transactions are expected. Note that it is strongly recommended to
            always have a defined end-date for all recurring transactions,
            though in cases such as subscriptions that have no established
            expiry, this field should be omitted (or set to a reasonably high
            value).
          example: 1776988800
    PaymentPlatformSettingsRequest:
      type: object
      nullable: true
      description: >-
        Only applicable to payments under the platform model. Use this field to
        control various settings relating to payments done under as a platform.
      properties:
        paymentFees:
          type: object
          anyOf:
            - $ref: '#/components/schemas/PaymentFeeAllocationSettingsRequest'
          nullable: true
    FeeAllocationRequestItem:
      type: object
      properties:
        bookTo:
          type: string
          description: The ID of the Ryft account to book the fee to.
          pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
    PaymentFeeAllocationSettingsRequest:
      type: object
      nullable: true
      description: >-
        Use this field to control the Ryft account subject to paying a
        particular fee. Note that this is only permitted for platform payments,
        i.e. those using the platform fee or split payment transaction models.
      properties:
        interchange:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationRequestItem'
          nullable: true
          description: >-
            The ID of the Ryft account to deduct any interchange fees from.

            **Only** applicable for accounts on the `ICC++` pricing model.
            Specifying this when on `Blended` pricing is not permitted.
        network:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationRequestItem'
          nullable: true
          description: >-
            The ID of the Ryft account to deduct any network (scheme) fees from.

            **Only** applicable for accounts on the `ICC++` pricing model.
            Specifying this when on `Blended` pricing is not permitted.
        miscPassThrough:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationRequestItem'
          nullable: true
          description: >-
            The ID of the Ryft account to deduct any miscellanous pass-through
            fees from.

            **Only** applicable for accounts on the `ICC++` pricing model.
            Specifying this when on `Blended` pricing is not permitted.
        processor:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationRequestItem'
          nullable: true
          description: |-
            The ID of the Ryft account to deduct the Ryft processing fee from.
            **Note** that:

              - when on `Blended` pricing, this refers to the full blended fee
              - when on `ICC++` pricing, this refers to the final `+`, i.e. Ryft's markup
        gateway:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationRequestItem'
          nullable: true
          description: The ID of the Ryft account to deduct any gateway fees from.
        combined:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationRequestItem'
          nullable: true
          description: >-
            The ID of the Ryft account to deduct all of the above fees from.
            Specifying this will take precedence over any of the more granular
            fields.

            **Note** that:

              - when on `Blended` pricing, this will book all of: `processor` & `gateway` fees
              - when on `ICC++` pricing, this will book all of: `interchange`, `network`, `processor` & `gateway` fees
      example:
        interchange:
          bookTo: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        network:
          bookTo: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        miscPassThrough:
          bookTo: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
    SplitPaymentRequestDetail:
      type: object
      nullable: true
      description: >-
        Use this field to facilitate split-payments. This will divide up the
        `amount` as specified in the forms of split-payments to each sub account
        once payment is successfully captured. The total of all items must be <=
        to the `amount` on the payment session. **Cannot** be used in
        conjunction with `platformFee` or `passThroughProcessingFee`. You must
        also **not** specify a sub account ID in the `Account` header.

        **Note** that any splits provided as part of a capture request will
        overwrite those that were given during authorization. Howver, if you are
        using multi-capture (i.e. `NotFinal`) then any subsequent splits will
        not be written to the PaymentSession. Instead you need to store the Id
        of the capture transaction and refer to that to track each capture.
      properties:
        items:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/SplitPaymentRequestItem'
    SplitPaymentRefundItem:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: The unique identifier for the split payment to refund.
          example: sp_01FCTS1XMKH9FF43CAFA4CXT3P
        amount:
          type: integer
          format: int32
          nullable: true
          example: 50
          minimum: 1
          maximum: 1000000000
          description: >-
            How much to refund from this split payment. If left `null`, we will
            issue a full refund for the original amount. If this is a partial
            amount, we will not refund the `fee` unless you specify an explicit
            amount inside the `fee.amount` field.
        fee:
          type: object
          nullable: true
          properties:
            amount:
              type: integer
              format: int32
              description: >-
                Specify how much should be refunded from the fee you collected
                from the split payment. The fee will be refunded too if the
                total amount in the split payment item is fully refunded and you
                don't specify this field.
              example: 5
    ThreeDsRequestDetails:
      type: object
      required:
        - deviceChannel
      properties:
        deviceChannel:
          type: string
          enum:
            - Browser
            - Application
          description: The channel of the device where payment is being attempted
          example: Browser
        browserDetails:
          $ref: '#/components/schemas/BrowserDetails'
    BrowserDetails:
      type: object
      description: >-
        The details of the customer's browser, required if the `deviceChannel`
        is `Browser`
      required:
        - acceptHeader
        - colorDepth
        - javaEnabled
        - language
        - screenHeight
        - screenWidth
        - timeZoneOffset
        - userAgent
      properties:
        acceptHeader:
          type: string
          example: application/json,text/plain,text/html,*/*
          minLength: 1
          maxLength: 2048
          description: >-
            The content of the 'Accept' header from the customer's browser. This
            can be retrieved by observing the value used on http requests prior
            to making this one from the browser (e.g. to your backend).
        colorDepth:
          type: integer
          format: int32
          example: 24
          minimum: 1
          maximum: 48
          description: >-
            The color depth of the customer's browser, in bits per pixel. This
            can be retrieved from the browser with JavaScript using the
            `window.screen.colorDepth` property.
        javaEnabled:
          type: boolean
          description: >-
            A flag to indicate whether the customer's browser can execute Java.
            This can be retrieved from the browser with JavaScript using the
            `window.navigator.javaEnabled` property.
          example: false
        language:
          type: string
          example: en-GB
          minLength: 1
          maxLength: 8
          description: >-
            The name of the customer's browser language. This can be retrieved
            from the browser with JavaScript using the
            `window.navigator.language` property.
        screenHeight:
          type: integer
          format: int32
          example: 900
          minimum: 1
          description: >-
            The height of the customer's screen in pixels. This can be retrieved
            from the browser with JavaScript using the `window.screen.height`
            property.
        screenWidth:
          type: integer
          format: int32
          example: 1440
          minimum: 1
          description: >-
            The width of the customer's screen in pixels. This can be retrieved
            from the browser with JavaScript using the `window.screen.width`
            property.
        timeZoneOffset:
          type: integer
          format: int32
          example: -120
          minimum: -720
          maximum: 840
          description: >-
            The time difference between UTC and the customer's browser local
            time, in minutes. This can be retrieved with JavaScript using the
            `getTimezoneOffset()` method on the `Date` object, e.g. `new
            Date().getTimezoneOffset()`.
        userAgent:
          type: string
          example: >-
            Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
            like Gecko) Chrome/103.0.0.0 Safari/537.36
          minLength: 1
          maxLength: 2048
          description: >-
            The content of the 'User-Agent' header from the customer's browser.
            This can be retrieved from the browser with JavaScript using the
            `window.navigator.userAgent` property.
    ContinueThreeDsRequest:
      type: object
      description: >-
        Supply the result of a 3ds fingerprint/challenge step. Provide
        `fingerprint` (web) or `appAuthentication` (native iOS/Android) after
        the Identify step, or `challengeResult` after the Challenge step.
      oneOf:
        - required:
            - fingerprint
        - required:
            - appAuthentication
        - required:
            - challengeResult
      properties:
        fingerprint:
          type: string
          description: Base64-encoded string returned after the 3DS fingerprinting step.
          example: >-
            ewogICJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ICI4ZjAxNzdhNC0yY2VkLTQ4NjUtODViNy1iYWQ5YmZhMzk4ZDIiLAogICJ0aHJlZURTQ29tcEluZCI6IlkiCn0=
        appAuthentication:
          $ref: '#/components/schemas/ContinueThreeDsAppAuthentication'
        challengeResult:
          type: string
          description: Base64-encoded string returned after the 3DS challenge step.
          example: >-
            ewogICJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ICJkNDFmNjIwMC0wNDM1LTQ5ZWUtYWExMS1mMzY2ZjA2NjFjNmYiLAogICJ0cmFuc1N0YXR1cyI6IlkiCn0=
    ContinueThreeDsAppAuthentication:
      type: object
      description: >-
        Result of the app-based 3DS Identify step, returned by the native 3DS
        SDK (Ravelin) running in the merchant's app. Used in place of
        `fingerprint` for native iOS / Android flows. The values here are
        produced after handling the
        [`RequiredActionIdentifyApp`](#tag/Payments-Service/operation/getPaymentSession)
        action returned on the payment session.
      required:
        - sdkAppId
        - sdkEncData
        - sdkEphemeralPublicKey
        - sdkMaxTimeoutInMinutes
        - sdkReferenceNumber
        - sdkTransId
        - deviceRenderOptions
      properties:
        sdkAppId:
          type: string
          example: 7f8a1b2c-3d4e-4f5a-9b6c-1d2e3f4a5b6c
          description: SDK Application ID generated by the 3DS SDK for this transaction.
        sdkEncData:
          type: string
          example: >-
            eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0.encrypted-device-data
          description: Encrypted device data (JWE) produced by the 3DS SDK.
        sdkEphemeralPublicKey:
          type: string
          example: '{"kty":"EC","crv":"P-256","x":"abc...","y":"def..."}'
          description: Ephemeral public key produced by the 3DS SDK.
        sdkMaxTimeoutInMinutes:
          type: integer
          example: 10
          minimum: 5
          maximum: 99
          description: >-
            Maximum time (minutes) the SDK will wait for the issuer to respond.
            EMVCo 3DS 2 mandates a minimum of 5 minutes.
        sdkReferenceNumber:
          type: string
          example: 3DS_LOA_SDK_RAVL_020100_00123
          description: SDK reference number identifying the 3DS SDK build.
        sdkTransId:
          type: string
          example: d41f6200-0435-49ee-aa11-f366f0661c6f
          description: SDK transaction ID generated for this 3DS authentication.
        deviceRenderOptions:
          $ref: '#/components/schemas/ThreeDsDeviceRenderOptions'
    ThreeDsDeviceRenderOptions:
      type: object
      description: Challenge UI rendering options supported by the device.
      required:
        - sdkInterface
        - sdkUiTypes
      properties:
        sdkInterface:
          type: string
          enum:
            - '01'
            - '02'
            - '03'
          example: '01'
          description: >-
            The interface type the SDK can render. `01` = Native, `02` = HTML,
            `03` = Both.
        sdkUiTypes:
          type: array
          minItems: 1
          items:
            type: string
            enum:
              - '01'
              - '02'
              - '03'
              - '04'
              - '05'
          example:
            - '01'
            - '02'
            - '03'
          description: >-
            The challenge UI types the SDK can render. `01` = Text, `02` =
            Single-select, `03` = Multi-select, `04` = Out-of-band, `05` = HTML
            (browser only).
    SplitPaymentItem:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier for this split payment item. Note that this
            will be the id of the `SplitPayment` created once payment is
            captured.
          example: sp_01FCTS1XMKH9FF43CAFA4CXT3P
        accountId:
          type: string
          description: >-
            The ID of the sub account who will receive this split payment amount
            in the form of a `SplitPayment`. **Must** be unique, i.e. you cannot
            have > 1 splits to the same account in your request.
          example: ac_b83f2653-06d7-44a9-a548-5825e8186004
        amount:
          type: integer
          format: int32
          example: 50
          minimum: 1
        fee:
          type: object
          properties:
            amount:
              type: integer
              format: int32
              example: 50
              minimum: 1
        description:
          type: string
          description: >-
            A short description of this split that will be displayed to the
            account.
          example: 2 x The Selfish Gene
          minLength: 1
          maxLength: 100
        metadata:
          type: object
          example:
            productId: '123'
            productDescription: The Selfish Gene
          nullable: true
          description: >-
            The metadata to attach to this part of the split. This will be used
            to populate `metadata` on the `SplitPayment` once it is subsequently
            created.
    SplitPaymentDetail:
      type: object
      nullable: true
      properties:
        items:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/SplitPaymentItem'
    InPersonPaymentDetail:
      type: object
      nullable: true
      properties:
        terminalDetail:
          $ref: '#/components/schemas/InPersonPaymentTerminalDetail'
    InPersonPaymentTerminalDetail:
      type: object
      properties:
        id:
          type: string
          description: The ID of the in-person terminal the payment was processed through
          pattern: ^tml_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
    FeeAllocationItem:
      type: object
      properties:
        bookTo:
          type: string
          description: The ID of the Ryft account the fee is booked to.
          pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
    PaymentFeeAllocationSettings:
      type: object
      nullable: true
      description: >-
        Denotes which Ryft account's are charged particular fees for the
        payment.
      properties:
        interchange:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationItem'
          nullable: true
          description: >-
            The ID of the Ryft account that any interchange fees are deducted
            from.

            **Only** applicable for accounts on the `ICC++` pricing model.
        network:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationItem'
          nullable: true
          description: >-
            The ID of the Ryft account that any network (scheme) fees are
            deducted from.

            **Only** applicable for accounts on the `ICC++` pricing model.
        miscPassThrough:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationItem'
          nullable: true
          description: >-
            The ID of the Ryft account that any miscellanous pass-through fees
            are deducted from.

            **Only** applicable for accounts on the `ICC++` pricing model.
        processor:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationItem'
          nullable: true
          description: >-
            The ID of the Ryft account that the Ryft processing fee is deducted
            from.

            **Note** that:

              - when on `Blended` pricing, this refers to the full blended fee
              - when on `ICC++` pricing, this refers to the final `+`, i.e. Ryft's markup
        gateway:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationItem'
          nullable: true
          description: The ID of the Ryft account that any gateway fees are deducted from.
        combined:
          type: object
          anyOf:
            - $ref: '#/components/schemas/FeeAllocationItem'
          nullable: true
          description: >-
            The ID of the Ryft account that all the above are deducted from.
            This field takes precedence over any of the more granular fields.

            **Note** that:

              - when on `Blended` pricing, this will book all of: `processor` & `gateway` fees
              - when on `ICC++` pricing, this will book all of: `interchange`, `network`, `miscPassThrough`, `processor` & `gateway` fees
      example:
        interchange:
          bookTo: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        network:
          bookTo: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
        miscPassThrough:
          bookTo: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
    PaymentPlatformSettings:
      type: object
      nullable: true
      description: Only applicable to payments under the platform model.
      properties:
        paymentFees:
          $ref: '#/components/schemas/PaymentFeeAllocationSettings'
    CardBinDetails:
      type: object
      nullable: true
      description: |-
        The specific details obtained from the BIN/IIN of the card.

        Note that this is not always available.
      properties:
        issuer:
          type: string
          description: Name of the card issuer
          example: Ryft Bank Ltd
          nullable: true
        issuerCountry:
          type: string
          description: The two-character ISO 3166 country code of the card issuer
          example: GB
          minLength: 2
          maxLength: 2
          nullable: true
        fundingType:
          type: string
          enum:
            - Debit
            - Credit
            - Prepaid
            - DeferredDebit
            - Charge
          description: Refers to how money for purchases comes to the card.
          example: Debit
          nullable: true
        productType:
          type: string
          description: The category the issuer assigns to the particular card
          enum:
            - Consumer
            - Corporate
          example: Consumer
          nullable: true
    PaymentSessionPaymentMethod:
      type: object
      nullable: true
      properties:
        type:
          type: string
          enum:
            - Card
          example: Card
        tokenizedDetails:
          $ref: '#/components/schemas/PaymentSessionPaymentMethodTokenizedDetails'
        card:
          type: object
          nullable: true
          description: Details of the card used
          properties:
            scheme:
              type: string
              example: Mastercard
              enum:
                - Visa
                - Mastercard
                - Amex
            last4:
              type: string
              example: '4242'
              description: The last 4 digits of the card used
            binDetails:
              $ref: '#/components/schemas/CardBinDetails'
        wallet:
          type: object
          nullable: true
          description: Details of the wallet used (Google Pay / Apple Pay)
          properties:
            type:
              type: string
              enum:
                - GooglePay
                - ApplePay
              example: ApplePay
        billingAddress:
          $ref: '#/components/schemas/CustomerAddress'
        checks:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodChecks'
    CredentialOnFileUsage:
      type: object
      nullable: true
      description: >-
        Details the intended usage when using or setting up a customer's card
        details for subsequent purchases. Ryft will set `credentialOnFileUsage`
        based on the arguments supplied.
      properties:
        initiator:
          type: string
          enum:
            - Customer
            - Merchant
          example: Customer
          description: >-
            Whether the transaction was initiated by the customer or merchant.


            A Customer-initiated transaction (CIT) is one in which the customer
            actively participates in completing the transaction with the
            merchant. This can include:
             - a first time online purchase where the customer agrees for their card details to be stored for future purchases
             - a subsequent online purchase with already stored card details (e.g. the customer selecting a saved card during checkout)

            A Merchant-initiated transaction (MIT) is one in which the customer
            is not present during the transaction. Instead, the merchant
            completes the transaction by charging previously stored card details
            based on the agreement (mandate) which the customer agreed to on the
            initial transaction. Examples of MIT are:
             - recurring payments (e.g. subscriptions)
             - unscheduled payments (e.g. account top up or additional charges)
        sequence:
          type: string
          enum:
            - Initial
            - Subsequent
          description: >-
            Indicates the order of this transaction in a series of agreed,
            repeating processing model
          example: Initial
    RebillingDetail:
      type: object
      nullable: true
      description: >-
        Details the parameters specific to recurring payments (e.g.
        Subscriptions)
      properties:
        amountVariance:
          type: string
          enum:
            - Fixed
            - Variable
          default: Variable
          description: >-
            Whether the customer is paying a fixed (non-variable) amount on each
            payment or an amount which can vary.
          example: Fixed
        numberOfDaysBetweenPayments:
          type: number
          format: int32
          description: The minimum number of days between each payment
          minimum: 1
          maximum: 9999
          example: 30
        totalNumberOfPayments:
          type: number
          format: int32
          nullable: true
          description: >-
            The total number of payments to be billed. Can be omitted if the
            recurring plan is set to run indefinitely
          minimum: 2
          maximum: 9999
          example: 12
        currentPaymentNumber:
          type: number
          format: int32
          nullable: true
          description: >-
            Indicates the position in the rebilling sequence for this payment.
            e.g. if the cardholder is being billed once monthly for 12 months
            and this payment is for month 7, the value will be 7.
          minimum: 1
          maximum: 9999
          example: 1
        expiry:
          type: number
          format: int64
          nullable: true
          description: >-
            The date (in epoch seconds) after which no further subsequent
            transactions are expected.
          example: 1776988800
    PaymentSession:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the payment
          pattern: ^ps_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
        amount:
          type: integer
          format: int32
          example: 500
          description: The amount of the sale/purchase in minor digits
        currency:
          type: string
          example: GBP
          description: The ISO currency code
        paymentType:
          type: string
          nullable: true
          enum:
            - Standard
            - Unscheduled
            - MOTO
            - Recurring
          default: Standard
          example: Standard
          description: >-
            The type of the payment. Use this to control whether the payment is
            classified as a Customer-Initiated Transaction (CIT) or
            Merchant-Initiated Transaction (MIT).

            (MIT) - customer is not actively participating in the transaction
            and has instead given consent for you to charge their stored card
            off session.

            (CIT) - customer is actively in your checkout flow and is on hand to
            react to and complete any supplementary steps to complete the
            payment (e.g. 3DS).

            CIT values:
              - `Standard` - A regular one-off e-commerce payment, made by a customer on your website/app

            MIT values:
             - `Unscheduled` - Uses an already stored card on file for a fixed or variable amount that does not occur on a scheduled or regular basis
             such as recurring payments/subcriptions.

            `Recurring` is classified as CIT if it is the initial payment in the
            series and MIT if it is a subsequent (follow up) payment in the
            series.

            `MOTO` has now been deprecated in favour of the `entryMode` (`MOTO`)
            field.
        entryMode:
          $ref: '#/components/schemas/EntryMode'
        customerEmail:
          type: string
          nullable: true
          example: example@mail.com
          description: The email address of the customer
        customerDetails:
          type: object
          nullable: true
          description: The details of the customer that this payment belongs to
          properties:
            id:
              type: string
              pattern: ^cus_[0-7][0-9A-HJKMNP-TV-Z]{25}
              example: cus_01G0EYVFR02KBBVE2YWQ8AKMGJ
              nullable: true
              description: >-
                The Id of the customer this payment belongs to. Set this upfront
                when creating the payment-session if you wish to make use of
                paying with a customer's saved payment methods
            firstName:
              type: string
              example: Fred
              nullable: true
              description: The first name of the customer this payment belongs to.
            lastName:
              type: string
              example: Jones
              nullable: true
              description: The last name of the customer this payment belongs to.
            homePhoneNumber:
              type: string
              description: The home phone number of the customer. In E.164 format
              nullable: true
              example: '+447900000000'
            mobilePhoneNumber:
              type: string
              description: The mobile phone number of the customer. In E.164 format
              nullable: true
              example: '+447900000000'
            metadata:
              type: object
              example:
                customerId: '123'
              nullable: true
              description: The metadata of the customer this payment belongs to.
        credentialOnFileUsage:
          anyOf:
            - $ref: '#/components/schemas/CredentialOnFileUsage'
        previousPayment:
          type: object
          nullable: true
          description: >-
            For recurring/unscheduled payments - details of the initial payment
            in the series. Required for:
              - partners who want to externally schedule recurring payments.
              - partners who process `Unscheduled` payments
          properties:
            id:
              type: string
              pattern: ^ps_[0-7][0-9A-HJKMNP-TV-Z]{25}
              description: The Id of the initial Payment Session in the series
              example: ps_01G0EYVFR02KBBVE2YWQ8AKMGJ
        rebillingDetail:
          anyOf:
            - $ref: '#/components/schemas/RebillingDetail'
        enabledPaymentMethods:
          type: array
          default:
            - Card
          description: >-
            List of payment method types that can be used to complete payment
            for this PaymentSession. `Card` is the default and will allow all
            card schemes configured on your account (Visa, Mastercard etc.).
            Apple Pay & Google Pay are classified as `Card` types and will be
            displayed provided you have confogured them properly.
          items:
            type: string
            enum:
              - Card
        paymentMethod:
          $ref: '#/components/schemas/PaymentSessionPaymentMethod'
        platformFee:
          type: integer
          nullable: true
          format: int32
          example: 50
          minimum: 0
          description: >-
            The amount (if any) that will be taken and applied to the platform
            account. This cannot be greater than the "amount" property
        splitPaymentDetail:
          $ref: '#/components/schemas/SplitPaymentDetail'
        status:
          type: string
          enum:
            - PendingPayment
            - PendingAction
            - Processing
            - Approved
            - Captured
            - Voided
          example: PendingPayment
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the payment. These
            will be sent with any associated payment events on your webhook.
          example:
            orderNumber: '123'
        clientSecret:
          type: string
          nullable: true
          description: >-
            The client secret is used to complete a payment from your frontend.
            Do NOT store/log/embed anywhere and ensure it is only surfaced on
            pages served over TSL
          example: >-
            ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
        lastError:
          $ref: '#/components/schemas/LastPaymentError'
        refundedAmount:
          type: integer
          format: int32
          example: 120
          minimum: 0
          description: >-
            The total amount refunded thus far against the payment-session.
            Refunds can only be actioned once the payment-session is `Captured`.
            You can only have one refund in-flight at a time.
        statementDescriptor:
          $ref: '#/components/schemas/StatementDescriptor'
        requiredAction:
          $ref: '#/components/schemas/RequiredAction'
        returnUrl:
          type: string
          example: >-
            https://ryftpay.com/checkout?orderId=123&ps=ps_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >
            URL to send the customer back to after a redirection (e.g. 3DS). We
            will always append the paymentSessionId under query param `ps`.
        authorizationType:
          type: string
          enum:
            - PreAuth
            - FinalAuth
          example: FinalAuth
          nullable: true
          description: >
            Specifies the type of authorization.

            PreAuth - Used to authorize a non-final amount, where you may want
            to later capture a different amount or adjust the initial authorized
            amount.

            FinalAuth - When the amount authorized is final and identical to the
            amount later captured.

            By default we will always use `FinalAuth`.

            Note that PreAuth is restricted to particular MCC values for Visa,
            contact us to verify and enable PreAuth if you believe your business
            is eligible.
        captureFlow:
          type: string
          enum:
            - Automatic
            - Manual
          nullable: true
          example: Automatic
          description: >-
            Whether the payment is automatically/manually captured. Defaults to
            `Automatic`.
        verifyAccount:
          type: boolean
          nullable: true
          description: >-
            Whether the PaymentSession was used to facilitate an account
            verification check.
          example: null
        shippingDetails:
          anyOf:
            - $ref: '#/components/schemas/ShippingDetails'
          description: >-
            The shipping details for the purchase/payment. This is optional but
            recommended to reduce fraudulent payments.
        orderDetails:
          $ref: '#/components/schemas/OrderDetails'
        paymentSettings:
          $ref: '#/components/schemas/PaymentSessionPaymentSettings'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the payment was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the payment was last updated
          example: 1470989538
    PaymentSessions:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PaymentSession'
        paginationToken:
          type: string
          example: ps_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'startsAfter' query parameter. This
            field is null when there are no further items to return
          nullable: true
    PublicPaymentSession:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the payment
          pattern: ^ps_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
        amount:
          type: integer
          format: int32
          example: 500
          description: The amount of the sale/purchase in minor digits
        currency:
          type: string
          example: GBP
          description: The ISO currency code
        customerEmail:
          type: string
          nullable: true
          example: example@mail.com
          description: The email address of the customer
        enabledPaymentMethods:
          type: array
          default:
            - Card
          description: >-
            List of payment method types that can be used to complete payment
            for this PaymentSession. `Card` is the default and will allow all
            card schemes configured on your account (Visa, Mastercard etc.).
            Apple Pay & Google Pay are classified as `Card` types and will be
            displayed provided you have confogured them properly.
          items:
            type: string
            enum:
              - Card
        paymentMethod:
          $ref: '#/components/schemas/PaymentSessionPaymentMethod'
        status:
          type: string
          enum:
            - PendingPayment
            - PendingAction
            - Processing
            - Approved
            - Captured
            - Voided
          example: PendingPayment
        lastError:
          $ref: '#/components/schemas/LastPaymentError'
        requiredAction:
          $ref: '#/components/schemas/RequiredAction'
        shippingDetails:
          anyOf:
            - $ref: '#/components/schemas/ShippingDetails'
          description: >-
            The shipping details for the purchase/payment. Returned when
            supplied in the payment session request.
        returnUrl:
          type: string
          example: >-
            https://ryftpay.com/checkout?orderId=123&ps=ps_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >
            URL to send the customer back to after a redirection (e.g. 3DS). We
            will always append the paymentSessionId under query param `ps`.
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the payment was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the payment was last updated
          example: 1470989538
    PaymentTransactions:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PaymentTransaction'
        paginationToken:
          type: string
          example: txn_01FCTS1XMKH9FF43CAFA4CXT3P_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'startsAfter' query parameter. This
            field is null when there are no further items to return
          nullable: true
    PaymentTransaction:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the transaction
          example: txn_01FCTS1XMKH9FF43CAFA4CXT3P_01FCTS1XMKH9FF43CAFA4CXT3P
        paymentSessionId:
          type: string
          description: The unique paymentSessionId that this transaction relates to
          example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
        amount:
          type: integer
          format: int32
          example: 250
          minimum: 0
          description: The amount of the transaction in minor digits
        currency:
          type: string
          example: GBP
          description: The ISO currency code
        type:
          type: string
          enum:
            - Authorization
            - Void
            - Capture
            - Refund
            - Chargeback
            - ChargebackReversal
          example: Capture
        status:
          type: string
          enum:
            - Pending
            - Failed
            - Succeeded
          example: Succeeded
        refundedAmount:
          type: integer
          format: int32
          nullable: true
          example: 50
          minimum: 0
          description: >-
            The amount of the transaction that has been refunded, in minor
            digits.
        platformFee:
          type: integer
          format: int32
          nullable: true
          example: 50
          minimum: 0
          description: >-
            Only supplied for 'capture' transactions. The amount of the capture
            that will be taken and applied to the platform account, in minor
            digits.
        platformFeeRefundedAmount:
          type: integer
          format: int32
          nullable: true
          example: 50
          minimum: 0
          description: >-
            Only supplied for 'capture' transactions. The amount of the capture
            that has been refunded to the platform account, in minor digits.
        processingFee:
          type: integer
          format: int32
          nullable: true
          example: 7
          minimum: 0
          deprecated: true
          description: >-
            This field is now deprecated. Please use the /balance-transactions
            endpoint to see the fees paid on these transactions.


            The processing fee that was taken for this transaction.
        reason:
          type: string
          nullable: true
          description: >-
            An optional reason to describe this transaction. Typically used for
            refunds whereby the reason for the refund is recorded.
          example: Requested by the customer
        captureType:
          type: string
          enum:
            - Final
            - NotFinal
          nullable: true
          example: Final
          description: >-
            Only supplied for 'capture' transactions. The type of capture.
            Typically only used for payments that support multi-capture. Once
            `Final`, any remaining uncaptured amount will be marked as void
            within 7 days.
        paymentMethod:
          $ref: '#/components/schemas/PaymentSessionPaymentMethod'
        splitPaymentDetail:
          $ref: '#/components/schemas/SplitPaymentDetail'
        processingDetail:
          $ref: '#/components/schemas/PaymentTransactionProcessingDetail'
        inPersonDetail:
          $ref: '#/components/schemas/InPersonPaymentDetail'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the transaction was initiated
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          example: 1470989538
          description: The epoch timestamp (seconds) when the transaction was last updated
    PaymentTransactionProcessingDetail:
      type: object
      nullable: true
      properties:
        issuerResponseCode:
          type: string
          nullable: true
          description: The response code returned by the issuer.
          example: '00'
        authorizationCode:
          type: string
          nullable: true
          description: The authorization code returned by the issuer.
          example: '123456'
        acquirerReferenceNumber:
          type: string
          nullable: true
          description: The Acquirer Reference Number (ARN) for the transaction.
          example: '12093810928309123'
    LastPaymentError:
      type: string
      nullable: true
      description: |-
        The most recent error when attempting to Pay.

        Note that we may add further values without notice.
      example: insufficient_funds
      enum:
        - insufficient_funds
        - declined_do_not_honour
        - invalid_card_number
        - cvv2_failure
        - restricted_card
        - blacklisted_card
        - blacklisted_bin
        - blacklisted_country
        - blacklisted_ip
        - risk_declined
        - security_violation
        - expired_card
        - gateway_reject
        - suspected_fraud
        - contact_issuer
        - not_permitted
        - invalid_account
        - pickup_card
        - stolen_card
        - issuer_decline
        - closed_account
        - account_not_activated
        - limit_exceeded
        - withdrawal_limit_exceeded
        - blocked_by_cardholder
        - 3ds_authentication_failure
        - 3ds_cardholder_not_participating
        - 3ds_authentication_required
        - payment_method_option_amex_disabled
        - cvc_required
        - payment_method_not_available
        - payment_method_option_amex_not_available
        - credit_card_not_permitted
        - issuer_error
        - system_error
        - unknown_error
    ErrorCode:
      type: string
      enum:
        - unexpected_error
        - invalid_field
        - bad_request
        - not_found
      example: bad_request
    EntryModeRequest:
      type: string
      nullable: true
      enum:
        - Online
        - MOTO
      example: Online
      description: >-
        Indicates how the payment method details were (or will be) obtained by
        the merchant for this payment.


          - `Online` - when the payment method is collected with the customer present (e.g. an e-commerce payment within a browser)
          - `MOTO` - when the payment method is collected via mail order (not e-email) or over the phone


        MOTO is subject to additional approval, contact us if you require this
        functionality.
    EntryMode:
      type: string
      nullable: true
      enum:
        - Online
        - MOTO
        - InPerson
      description: >-
        Indicates how the payment method details were (or will be) obtained by
        the merchant for this payment.


          - `Online` - when the payment method is collected with the customer present (e.g. an e-commerce payment within a browser)
          - `MOTO` - when the payment method is collected via mail order (not e-email) or over the phone
          - `InPerson` - when the payment is collected in-person over a physical medium (such as card terminal)


        MOTO is subject to additional approval, contact us if you require this
        functionality.
      example: Online
    EventType:
      type: string
      enum:
        - PaymentSession.approved
        - PaymentSession.captured
        - PaymentSession.declined
        - PaymentSession.voided
        - PaymentSession.void_failed
        - PaymentSession.refunded
        - PaymentSession.refund_failed
        - PaymentSession.requires_action
        - Account.created
        - Account.updated
        - Account.verification_status_updated
        - Person.created
        - Person.updated
        - Person.deleted
        - PayoutMethod.created
        - PayoutMethod.updated
        - PayoutMethod.deleted
        - Payout.created
        - Payout.status_updated
        - Customer.created
        - Customer.updated
        - Customer.deleted
        - Subscription.created
        - Subscription.updated
        - Subscription.cancelled
        - Subscription.past_due
        - Subscription.ended
        - Transfer.created
        - Transfer.updated
        - Dispute.created
        - Dispute.closed
        - Dispute.challenged
        - PlatformFee.created
        - PlatformFee.refunded
        - InPersonOrder.created
        - InPersonOrder.updated
        - InPersonLocation.created
        - InPersonLocation.updated
        - Terminal.created
        - Terminal.updated
        - Terminal.deleted
        - Conversion.created
        - Conversion.updated
      example: PaymentSession.captured
      description: >-
        The type of the event. Note that we consider adding new types
        non-breaking changes so recommend you do not hard-code all values listed
        here.
    EventEndpoint:
      type: object
      properties:
        webhookId:
          type: string
          description: The unique id of the webhook endpoint
          example: wh_31fba123-0fef-41d6-92ad-fd7089f49f8a
        acknowledged:
          type: boolean
          description: Whether the webhook endpoint has received and acknowledged the event
          example: true
        attempts:
          type: integer
          format: int32
          description: >-
            How many times we have attempted to deliver the event to the webhook
            endpoint
          example: 2
    Event:
      type: object
      properties:
        id:
          type: string
          description: The unique id of the event
          example: ev_01FGNPAY1DB5TKPB35M1MNT6PN
        eventType:
          $ref: '#/components/schemas/EventType'
        data:
          description: >-
            Contains the full underlying response object at the time the event
            was emitted.

            For example, a `PaymentSession.captured` event will contain the
            entire `PaymentSession` resource in this field.


            Note that some older events (prior to August 2025) consisted of a
            more specific model. We have dropped support for this model and
            typically recommend events older than 30 days be considered
            archived.
          oneOf:
            - $ref: '#/components/schemas/PaymentSession'
            - $ref: '#/components/schemas/AccountResponse'
            - $ref: '#/components/schemas/PersonResponse'
            - $ref: '#/components/schemas/Customer'
            - $ref: '#/components/schemas/PaymentMethod'
            - $ref: '#/components/schemas/PayoutMethod'
            - $ref: '#/components/schemas/PayoutResponse'
            - $ref: '#/components/schemas/PlatformFee'
            - $ref: '#/components/schemas/Subscription'
            - $ref: '#/components/schemas/Dispute'
            - $ref: '#/components/schemas/Transfer'
        endpoints:
          type: array
          description: >-
            The webhook endpoints that this event was sent to. Note that this is
            only present on the `/events` API.
          items:
            $ref: '#/components/schemas/EventEndpoint'
        accountId:
          type: string
          nullable: true
          example: ac_b83f2653-06d7-44a9-a548-5825e8186004
          description: The account id in which this event happened.
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the event was created
          example: 1570989538
    EventsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Event'
    PlatformFee:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the platform fee
          example: pf_01FCTS1XMKH9FF43CAFA4CXT3P
        paymentSessionId:
          type: string
          description: The unique payment session that this platform fee relates to
          example: ps_01JJPPAZTNN38EMDJ72FASHE7R
        amount:
          type: integer
          format: int32
          example: 40
          minimum: 1
          description: >-
            The amount of the fee you collected on top of a payment for a linked
            account
        paymentAmount:
          type: integer
          format: int32
          example: 450
          minimum: 1
          description: The amount of the associated payment
        processingFee:
          type: integer
          format: int32
          example: 7
          minimum: 0
          deprecated: true
          description: >-
            This field is now deprecated. Please use the /balance-transactions
            endpoint to see the fees paid on these transactions.


            The processing fee that is taken from the original payment. This
            amount is then deducted from the amount you collect as your fee from
            the transaction.
        refundedAmount:
          type: integer
          format: int32
          example: 45
          minimum: 0
          description: The amount of the platform fee that was refunded
        netAmount:
          type: integer
          format: int32
          example: 33
          deprecated: true
          description: >-
            This field is now deprecated. Please use the /balance-transactions
            endpoint to see the net amount for these transactions.


            The net amount you take once fees have been deducted.
        currency:
          type: string
          example: GBP
          description: The ISO currency code
        fromAccountId:
          type: string
          example: ac_b83f2653-06d7-44a9-a548-5825e8186004
          description: The account that you collected the fee from
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the payment was created
          example: 1470989538
    PlatformFeesResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PlatformFee'
    PlatformFeeRefund:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the platform fee refund
          example: fr_01FM9XMMV1MYDG6NGMHPDE065N_01FM9XNFXDYXAT0BJN5BBN794B
        platformFeeId:
          type: string
          description: The unique platformFeeId that this refund relates to
          example: pf_01FM9XMMV1MYDG6NGMHPDE065N
        amount:
          type: integer
          format: int32
          example: 5
          minimum: 0
          description: The amount of the platform fee refund in minor digits
        currency:
          type: string
          example: GBP
          description: The ISO currency code
        reason:
          type: string
          description: The reason for the platform fee refund
          example: Requested by the customer
        status:
          type: string
          enum:
            - Pending
            - Failed
            - Succeeded
          example: Succeeded
        createdTimestamp:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the platform fee refund was
            created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          example: 1470989538
          description: >-
            The epoch timestamp (seconds) when the platform fee refund was last
            updated
    PlatformFeeRefundsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PlatformFeeRefund'
    CreateWebhookEndpointRequestBody:
      type: object
      properties:
        url:
          type: string
          description: The URL of your webhook endpoint to register
          example: https://example-endpoint.com/webhook
        active:
          type: boolean
          example: true
          description: Whether the endpoint is active (receiving events) or not
        eventTypes:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
          example:
            - PaymentSession.captured
            - PaymentSession.refunded
          description: The event types you want the endpoint to receive
    UpdateWebhookEndpointRequestBody:
      type: object
      properties:
        url:
          type: string
          nullable: true
          description: The new URL of your webhook endpoint
          example: https://example-endpoint.com/webhook
        active:
          type: boolean
          nullable: true
          example: true
          description: Whether the endpoint is active (receiving events) or not
        eventTypes:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/EventType'
          example:
            - PaymentSession.captured
            - PaymentSession.refunded
          description: The event types you want the endpoint to receive
    WebhookEndpoint:
      type: object
      properties:
        id:
          type: string
          description: The unique Id for the webhook endpoint
          example: wh_31fba123-0fef-41d6-92ad-fd7089f49f8a
        active:
          type: boolean
          description: Whether the endpoint is actively receiving events or not
          example: true
        url:
          type: string
          description: The URL of the webhook endpoint
          example: https://example-endpoint.com/webhook
        eventTypes:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
          example:
            - PaymentSession.captured
            - PaymentSession.refunded
          description: The event types the endpoint is receiving
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the webhook endpoint was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the webhook endpoint was last
            updated
          example: 1470989538
    WebhookEndpointsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEndpoint'
    WebhookEndpointCreated:
      type: object
      properties:
        secret:
          type: string
          description: >-
            The Webhook's signature secret (only returned on initial creation).
            Ensure this is stored securely
          example: whs_0f6b1b5a-aef0-4011-978b-19fd4a4d46ea
        id:
          type: string
          description: The unique Id for the webhook endpoint
          example: wh_31fba123-0fef-41d6-92ad-fd7089f49f8a
        active:
          type: boolean
          description: Whether the endpoint is actively receiving events or not
          example: true
        url:
          type: string
          description: The URL of the webhook endpoint
          example: https://example-endpoint.com/webhook
        eventTypes:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
          example:
            - PaymentSession.captured
            - PaymentSession.refunded
          description: The event types the endpoint is receiving
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the webhook endpoint was created
          example: 1470989538
    WebhookEndpointDeleted:
      type: object
      properties:
        id:
          type: string
          description: The Id of the deleted webhook endpoint
          example: wh_31fba123-0fef-41d6-92ad-fd7089f49f8a
    CreatePayoutRequestBody:
      type: object
      required:
        - amount
        - currency
        - payoutMethodId
      properties:
        amount:
          type: integer
          format: int32
          example: 5000
          description: The amount (in minor units) to payout
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The three-letter ISO currency code
        payoutMethodId:
          type: string
          pattern: ^pm_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: pm_01FCTS1XMKH9FF43CAFA4CXT3P
          description: The payout method to send the payout amount to
        metadata:
          type: object
          nullable: true
          description: >-
            Used to attach any custom key-value data to the payout. You can have
            a maximum of 5 pieces of metadata.
          example:
            orderId: '1'
            customerId: '123'
    CreateTransferRequestBody:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          format: int32
          example: 5000
          description: The amount (in minor units) to transfer. Minimum 1 minor unit.
          minimum: 1
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The three-letter ISO currency code
        source:
          type: object
          nullable: true
          description: >-
            Where the `amount` should be taken from.


            **Note** that you cannot specify both `source` & `destination`. A
            request in which `source` is specified will initiate a transfer
            **from** the supplied sub account to your own platform account.
             - the sub account's balance will be decremented
             - your platform account balance will be incremented
          properties:
            accountId:
              type: string
              pattern: >-
                ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
              example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
              description: ID of the Ryft account to take the funds from
        destination:
          type: object
          nullable: true
          description: >-
            Where the `amount` should be credited to.


            **Note** that you cannot specify both `source` & `destination`. A
            request in which `destination` is specified will initiate a transfer
            **to** the supplied sub account from your own platform account.
              - the sub account's balance will be incremented
              - your platform account balance will be decremented
          properties:
            accountId:
              type: string
              pattern: >-
                ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
              example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
              description: ID of the Ryft account to send the funds to
        reason:
          type: string
          nullable: true
          minLength: 1
          maxLength: 250
          description: >-
            An optional reason describing why the transfer was initiated. Not
            required but recommended.
          example: Covering dispute fees of £25 from October 10th
        metadata:
          type: object
          nullable: true
          description: >-
            Used to attach any custom key-value data to the transfer. You can
            have a maximum of 5 pieces of metadata.
          example:
            orderId: '1'
            customerId: '123'
    CreateSubAccountRequestBody:
      type: object
      properties:
        onboardingFlow:
          type: string
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/AccountOnboardingFlow'
          description: >-
            The flow that this account will use to be onboarded. `Hosted`
            accounts will be onboarded via the Ryft portal and cannot be updated
            via the API. `NonHosted` accounts will be onboarded via the API and
            will not have access to the Ryft portal. Once defined this value
            cannot be changed. Defaults to `Hosted` if not provided.
        email:
          type: string
          format: email
          maxLength: 200
          nullable: true
          description: >-
            The main email address for the sub account.


            Required if `onboardingFlow` is `Hosted` and you are not supplying
            the 'entityType', otherwise you can supply this in the
            'business'/'individual' block. Not required if `onboardingFlow` is
            `NonHosted` - any value supplied will be ignored.
          example: test@ryftpay.com
        entityType:
          type: string
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/AccountEntityType'
          description: >-
            The type of entity that this account is - either a registered
            business or an individual person (sole trader). Optional if
            `onboardingFlow` is `Hosted`, though certain actions will be
            restricted until this is provided (creating persons, payout methods
            and therefore payouts). Optional if `onboardingFlow` is `NonHosted`,
            any values supplied can be updated by the account via the Ryft
            portal.
        business:
          type: object
          nullable: true
          description: The details of the business. Required if `entityType` is `Business`
          anyOf:
            - $ref: '#/components/schemas/CreateBusinessRequest'
        individual:
          type: object
          nullable: true
          description: The details of the person. Required if `entityType` is `Individual`
          anyOf:
            - $ref: '#/components/schemas/CreateIndividualRequest'
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the account. These
            will be sent with any associated account events on your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            accountId: '1'
        settings:
          type: object
          nullable: true
          description: Settings for the account.
          anyOf:
            - $ref: '#/components/schemas/AccountSettingsRequest'
        termsOfService:
          type: object
          nullable: true
          description: >-
            Use this parameter to indicate acceptance of our terms & conditions
            by the sub account.
          anyOf:
            - $ref: '#/components/schemas/AccountTermsOfServiceRequest'
    AccountCapabilitiesRequest:
      type: object
      description: |-
        Specify the capability to request for this sub account.
        Note that only one capability can be requested within a single request
      properties:
        amexPayments:
          type: object
          nullable: true
          properties:
            requested:
              type: boolean
              description: Set this to `true` to request the `amexPayments` capability
              example: true
        inPersonPayments:
          type: object
          nullable: true
          properties:
            requested:
              type: boolean
              description: Set this to `true` to request the `inPersonPayments` capability
              example: true
    UpdateSubAccountRequestBody:
      type: object
      properties:
        entityType:
          type: string
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/AccountEntityType'
          description: >-
            The type of entity that this account is - either a registered
            business or an individual person (sole trader). Can only be supplied
            on update for 'NonHosted' accounts that were not created with one.
            This cannot be changed once set.
        business:
          type: object
          nullable: true
          description: The details to update if the `entityType` is `Business`
          anyOf:
            - $ref: '#/components/schemas/UpdateBusinessRequest'
        individual:
          type: object
          nullable: true
          description: The details to update if the `entityType` is `Individual`
          anyOf:
            - $ref: '#/components/schemas/UpdateIndividualRequest'
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the account. These
            will be sent with any associated account events on your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            accountId: '1'
        settings:
          type: object
          nullable: true
          description: Settings to update on the account.
          anyOf:
            - $ref: '#/components/schemas/AccountSettingsRequest'
        termsOfService:
          type: object
          nullable: true
          description: Information relating to terms of service.
          anyOf:
            - $ref: '#/components/schemas/AccountTermsOfServiceRequest'
        capabilities:
          type: object
          nullable: true
          description: >-
            Specific capabilities you want to request for the account. **Note**
            that this field can only be used standalone in your request.
            Specifying other fields (e.g. `settings`) will cause the request to
            be rejected.
          anyOf:
            - $ref: '#/components/schemas/AccountCapabilitiesRequest'
    PaymentMethodCard:
      type: object
      properties:
        scheme:
          type: string
          example: Mastercard
          enum:
            - Visa
            - Mastercard
            - Amex
        last4:
          type: string
          description: The last 4 digits of the card
          example: '4242'
        expiryMonth:
          type: string
          description: The 2-digit expiry month of the card
          example: '10'
        expiryYear:
          type: string
          description: The 4-digit expiry year of the card
          example: '2024'
    PaymentMethod:
      type: object
      properties:
        id:
          type: string
          pattern: ^pmt_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The ID of the payment method
        type:
          type: string
          description: The type of the payment method
          example: Card
          enum:
            - Card
        card:
          $ref: '#/components/schemas/PaymentMethodCard'
        billingAddress:
          $ref: '#/components/schemas/CustomerAddress'
        checks:
          $ref: '#/components/schemas/PaymentMethodChecks'
        customerId:
          type: string
          description: >-
            The Id of the customer this card belongs to (null if the
            payment-method is single-use)
          example: cus_01G0EYVFR02KBBVE2YWQ8AKMGJ
          nullable: true
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the payment method was created
          example: 1470989538
    PaymentMethodDeleted:
      type: object
      properties:
        id:
          type: string
          description: The Id of the deleted payment method
          example: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
    DisputeCustomer:
      type: object
      nullable: true
      description: Details of the customer who is making the dispute
      properties:
        email:
          type: string
          nullable: true
          description: The email that was used for the disputed payment
          example: john.doe@ryftpay.com
        id:
          type: string
          nullable: true
          pattern: ^cus_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: cus_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The Ryft ID of the customer
        createdTimestamp:
          type: integer
          nullable: true
          format: int64
          description: >-
            The epoch timestamp (seconds) when the customer was first
            recorded/created
          example: 1470989538
    DisputeSubAccount:
      type: object
      nullable: true
      description: >-
        If this dispute is for a payment under a sub account, then this contains
        details of that account
      properties:
        id:
          type: string
          pattern: ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
          description: The Ryft ID of the sub account
    DisputePaymentSession:
      type: object
      description: Details of the payment session linked to the dispute.
      properties:
        id:
          type: string
          pattern: ^ps_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: ps_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The ID of the payment session the dispute relates to.
        paymentType:
          type: string
          enum:
            - Standard
            - Unscheduled
            - MOTO
            - Recurring
          example: Standard
        paymentMethod:
          type: object
          properties:
            card:
              type: object
              description: Details of the card used
              properties:
                scheme:
                  type: string
                  example: Mastercard
                  enum:
                    - Visa
                    - Mastercard
                    - Amex
                last4:
                  type: string
                  example: '4444'
                  description: The last 4 digits of the card used
    DisputeEvidenceFile:
      type: object
      nullable: true
      description: Details pointing to an uploaded file containing the relevant evidence
      properties:
        id:
          type: string
          description: The ID of the uploaded file
          pattern: fl_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: fl_01G0EYVFR02KBBVE2YWQ8AKMGJ
    DisputeEvidenceTextEntries:
      type: object
      nullable: true
      description: Contains any evidence in text format
      properties:
        billingAddress:
          type: string
          nullable: true
          description: >-
            Billing address provided by the customer on the original
            transaction. We will automatically append this if it was provided.
          example: null
        shippingAddress:
          type: string
          nullable: true
          description: >-
            Shipping address the product or service were shipped to. Note we
            recommend also attaching any supporting files you have that confirm
            shipment to the same address. We will automatically append this if
            it was provided, however you can amend it if the address after
            taking payment with Ryft.
          example: null
        duplicateTransaction:
          type: string
          nullable: true
          description: >-
            Relevant when category is `Duplicate`. Use this to attach an
            explanation detailing why the transaction in dispute is unique and
            not in fact a duplicate of a previous transaction.
          example: null
        uncategorised:
          type: string
          nullable: true
          description: Any miscellanous text evidence you have attached.
          example: null
    DisputeEvidenceFiles:
      type: object
      nullable: true
      description: Contains any evidence in file format
      properties:
        proofOfDelivery:
          anyOf:
            - $ref: '#/components/schemas/DisputeEvidenceFile'
          description: Proof of delivery to the customer's shipping address.
        customerSignature:
          anyOf:
            - $ref: '#/components/schemas/DisputeEvidenceFile'
          description: >-
            Document/contract containing the customer's signature for the
            service or product.
        receipt:
          anyOf:
            - $ref: '#/components/schemas/DisputeEvidenceFile'
          description: Receipt or invoice confirming purchase of the product.
        shippingConfirmation:
          anyOf:
            - $ref: '#/components/schemas/DisputeEvidenceFile'
          description: >-
            Document proving the product was shipped to the same shipping
            address the customer provided. This could be a shipping
            label/confirmation from the shipping courier. Make sure the shipping
            address is also clearly visible within the file.
        customerCommunication:
          anyOf:
            - $ref: '#/components/schemas/DisputeEvidenceFile'
          description: >-
            Any communication with the customer that proves they received and or
            are happy with the product.
        refundPolicy:
          anyOf:
            - $ref: '#/components/schemas/DisputeEvidenceFile'
          description: Document containing your refund policy.
        recurringPaymentAgreement:
          anyOf:
            - $ref: '#/components/schemas/DisputeEvidenceFile'
          description: Document containing your recurring/subscription agreement.
        uncategorised:
          anyOf:
            - $ref: '#/components/schemas/DisputeEvidenceFile'
          description: >-
            Used to attach any miscellanous or additional evidence you feel is
            relevant to the dispute.
    DisputeEvidence:
      type: object
      nullable: true
      description: The text/file evidence you have attached to the dispute.
      properties:
        text:
          $ref: '#/components/schemas/DisputeEvidenceTextEntries'
        files:
          $ref: '#/components/schemas/DisputeEvidenceFiles'
    DisputeReason:
      type: object
      properties:
        code:
          type: string
          description: The reason code provided by the card scheme
          example: '13.6'
        description:
          type: string
          description: Description of the `code`
          example: Merchandise/Services Not Received
    Dispute:
      type: object
      properties:
        id:
          type: string
          pattern: ^dsp_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: dsp_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The ID of the dispute
        amount:
          type: integer
          format: int32
          example: 500
          description: The amount that is being disputed and the merchant is liable for
        currency:
          type: string
          example: GBP
          description: The ISO currency code
        status:
          type: string
          enum:
            - Open
            - Cancelled
            - Accepted
            - Challenged
            - Lost
            - Won
            - Expired
          example: Open
        category:
          type: string
          description: >-
            Disputes are grouped into a specific category based on their
            `reason.code`. These define the overlapping reason across various
            card schemes (who each have their own codes)
          enum:
            - Fraudulent
            - Authorization
            - ProcessingError
            - CardholderDispute
            - General
          example: Fraudulent
        reason:
          $ref: '#/components/schemas/DisputeReason'
        respondBy:
          type: integer
          format: int64
          description: >-
            The deadline by which the evidence needs responding by. Note that
            you cannot attach evidence or challenge the dispute once this date
            has passed. The dispute will move to `Expired`.
          example: 1685059200
        recommendedEvidence:
          type: array
          description: >-
            The evidence **strongly** recommended for the best chance to
            challenge and win the dispute. Note that this is based on the
            underlying `reason.code` of the Dispute and is subject to change
            should further types of evidence be added or no longer supported.
            Leverage this field to select the best forms of evidence should you
            choose to challenge the dispute.
          items:
            type: string
            enum:
              - ProofOfDelivery
              - BillingAddress
              - ShippingAddress
              - DuplicateTransaction
              - CustomerSignature
              - Receipt
              - ShippingConfirmation
              - CustomerCommunication
              - RefundPolicy
              - CancellationPolicy
              - RecurringPaymentAgreement
              - Uncategorised
        paymentSession:
          $ref: '#/components/schemas/DisputePaymentSession'
        evidence:
          $ref: '#/components/schemas/DisputeEvidence'
        customer:
          $ref: '#/components/schemas/DisputeCustomer'
        subAccount:
          $ref: '#/components/schemas/DisputeSubAccount'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the dispute was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the dispute was last updated
          example: 1470989538
    Disputes:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Dispute'
        paginationToken:
          type: string
          example: dsp_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    Customer:
      type: object
      properties:
        id:
          type: string
          pattern: ^cus_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: cus_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The ID of the customer
        email:
          type: string
          format: email
          maxLength: 200
          description: The customer's email address
          example: test@ryftpay.com
        firstName:
          type: string
          description: The first name of the customer
          example: Jeff
          nullable: true
          minLength: 1
          maxLength: 80
        lastName:
          type: string
          description: The last name of the customer
          example: Bridges
          nullable: true
          minLength: 1
          maxLength: 80
        homePhoneNumber:
          type: string
          description: The home phone number of the customer. In E.164 format
          nullable: true
          example: '+447900000000'
        mobilePhoneNumber:
          type: string
          description: The mobile phone number of the customer. In E.164 format
          nullable: true
          example: '+447900000000'
        defaultPaymentMethod:
          type: string
          description: The Id of the customer's preferred/default payment method
          nullable: true
          example: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the customer. These
            will be sent with any associated customer events on your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            customerId: '1'
            registered: '123'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the customer was created
          example: 1470989538
    Customers:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Customer'
        paginationToken:
          type: string
          example: cus_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    CustomerDeleted:
      type: object
      properties:
        id:
          type: string
          description: The Id of the deleted customer
          example: cus_01G0EYVFR02KBBVE2YWQ8AKMGJ
    CustomerPaymentMethods:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMethod'
    NullableRecurringIntervalRequest:
      type: object
      nullable: true
      required:
        - unit
        - count
      properties:
        unit:
          type: string
          enum:
            - Days
            - Months
          description: The type of interval to wait for between charges
          example: Months
        count:
          type: number
          example: 1
          minimum: 1
          description: >-
            The number of intervals between charges. e.g. `type = Days` & `count
            = 60` would charge the customer every 60 days.
        times:
          type: number
          example: 12
          nullable: true
          minimum: 2
          description: >-
            (optional) The total number of charges throughout the lifecycle of
            the recurring series. Leave `null` for products that continue
            indefinitely.
    RecurringIntervalRequest:
      type: object
      required:
        - unit
        - count
      properties:
        unit:
          type: string
          enum:
            - Days
            - Months
          description: The type of interval to wait for between charges
          example: Months
        count:
          type: number
          example: 1
          minimum: 1
          description: >-
            The number of intervals between charges. e.g. `type = Days` & `count
            = 60` would charge the customer every 60 days.
        times:
          type: number
          example: 12
          nullable: true
          minimum: 2
          description: >-
            (optional) The total number of charges throughout the lifecycle of
            the recurring series. Leave `null` for products that continue
            indefinitely.
    RecurringInterval:
      type: object
      properties:
        unit:
          type: string
          enum:
            - Days
            - Months
          description: The type of interval to wait for between charges
          example: Months
        count:
          type: number
          example: 1
          minimum: 1
          description: >-
            The number of intervals between charges. e.g. `type = Days` & `count
            = 60` would charge the customer every 60 days.
        times:
          type: number
          example: 12
          nullable: true
          minimum: 2
          description: >-
            (optional) The total number of charges throughout the lifecycle of
            the recurring series. Leave `null` for products that continue
            indefinitely.
    RecurringPrice:
      type: object
      properties:
        amount:
          type: integer
          format: int32
          example: 5000
          description: >-
            The amount (in minor units) that is charged on each recurring
            payment
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The ISO currency code
        interval:
          $ref: '#/components/schemas/RecurringInterval'
    SubscriptionPaymentSession:
      type: object
      properties:
        id:
          type: string
          description: The Id of the PaymentSession
          example: ps_01G0EYVFR02KBBVE2YWQ8AKMGJ
        clientSecret:
          type: string
          nullable: true
          description: >-
            The client secret of the payment session, only supplied when action
            is required by the customer Supply this to the frontend
            (web/iOS/Android) to collect the payment details / handle any
            required actions (3ds)
          example: >-
            ps_01FCTS1XMKH9FF43CAFA4CXT3P_secret_b83f2653-06d7-44a9-a548-5825e8186004
        requiredAction:
          $ref: '#/components/schemas/RequiredAction'
    Subscription:
      type: object
      properties:
        id:
          type: string
          pattern: ^sub_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: sub_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The ID of the subscription
        status:
          type: string
          enum:
            - Pending
            - Active
            - Cancelled
            - PastDue
            - Ended
            - Paused
          example: Active
        description:
          type: string
          nullable: true
          example: Bob's monthly gym membership
          description: >-
            (optional) description helps you personalise/identify the specific
            subscription
        customer:
          type: object
          properties:
            id:
              type: string
              description: The Id of the customer this subscription belongs to
              example: cus_01G0EYVFR02KBBVE2YWQ8AKMGJ
        paymentMethod:
          type: object
          nullable: true
          properties:
            id:
              type: string
              description: >-
                The Id of the PaymentMethod belonging to the customer that will
                be used to pay for the subscription
              example: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
        paymentSessions:
          type: object
          properties:
            initial:
              $ref: '#/components/schemas/SubscriptionPaymentSession'
            latest:
              $ref: '#/components/schemas/SubscriptionPaymentSession'
        price:
          $ref: '#/components/schemas/RecurringPrice'
        balance:
          $ref: '#/components/schemas/SubscriptionBalance'
        pausePaymentDetail:
          type: object
          nullable: true
          description: Non-null if you have paused payments for the subscription.
          properties:
            reason:
              type: string
              nullable: true
              description: Field describing why the subscription is paused.
              example: Offering service for free to customer
            resumeAtTimestamp:
              type: number
              nullable: true
              format: int64
              description: >-
                The epoch timestamp (seconds) when the subscription should
                resume collecting payments
              example: 1470989538
            pausedAtTimestamp:
              type: number
              format: int64
              description: The epoch timestamp (seconds) when the subscription was paused
              example: 1470989538
        cancelDetail:
          type: object
          nullable: true
          description: Non-null if the subscription is cancelled
          properties:
            reason:
              type: string
              nullable: true
              description: Field describing why the subscription is cancelled.
              example: Customer no longer wants to use the service
            cancelledAtTimestamp:
              type: integer
              format: int64
              description: >-
                The epoch timestamp (seconds) when the subscription was
                cancelled
              example: 1480989538
        billingDetail:
          type: object
          properties:
            totalCycles:
              type: number
              description: >-
                The total number of billing cycles throughout the lifespan of
                the subscription.
              example: 12
            currentCycle:
              type: number
              description: >-
                The subscription's current billing cycle. e.g. given a monthly
                subscription for a 12 month recurring product, where the current
                date is 4 months removed from the initial charge will have
                `currentCycle = 4`
              example: 4
            currentCycleStartTimestamp:
              type: number
              description: >-
                The (epoch) timestamp representing the start date for the
                current billing period.
              example: 1480989538
            currentCycleEndTimestamp:
              type: number
              description: >-
                The (epoch) timestamp representing the end date for the current
                billing period.
              example: 1480989538
            billingCycleTimestamp:
              type: number
              description: >-
                The (epoch) timestamp representing the date on which the
                customer will regularly be billed. e.g. 15th of each month.
              example: 1480989538
            nextBillingTimestamp:
              type: number
              nullable: true
              description: >-
                The (epoch) timestamp representing the date on which we will
                next try to bill your customer. This will be equal to the
                `billingCycleTimestamp` at the start of each new billing cycle,
                but is updated should we fail to successfully charge the
                customer. The updated timestamp reflects when our recurring
                engine will retry payment. When 'null' it means that we are not
                currently planning to bill the customer again (it is Cancelled,
                Ended or Paused indefinitely)
              example: 1480989538
            failureDetail:
              type: object
              description: >-
                Non-null if the Subscription has become `PastDue` and one or
                more payment attempts have been unsuccessful.
              nullable: true
              properties:
                paymentAttempts:
                  type: number
                  format: int32
                  description: The number of consecutive payment attempts that have failed.
                  example: 2
                lastPaymentError:
                  $ref: '#/components/schemas/LastPaymentError'
        shippingDetails:
          $ref: '#/components/schemas/ShippingDetails'
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the subscription.
            These will be sent with any subscription events to your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            myCustomerId: '1'
        paymentSettings:
          type: object
          description: >-
            Settings for controlling fields/options on the underlying Payment
            Session's created by this subscription.
          properties:
            statementDescriptor:
              anyOf:
                - $ref: '#/components/schemas/NullableStatementDescriptor'
              description: >-
                Used to supply a dynamic statement descriptor for the payments
                created throughout the lifecycle of this subscription. **Note**
                that dynamic statement descriptors are not enabled by default
                and will be ignored if passed.
              example:
                descriptor: Ryft Ltd
                city: London
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the subscription was created
          example: 1470989538
    Subscriptions:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Subscription'
        paginationToken:
          type: string
          example: sub_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    SubscriptionPayments:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PaymentSession'
        paginationToken:
          type: string
          example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to use for getting the next page of results. This will be
            null when there are no further pages to fetch
          nullable: true
    File:
      type: object
      properties:
        id:
          type: string
          pattern: ^fl_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: fl_01G0EYVFR02KBBVE2YWQ8AKMGJ
          description: The ID of the file
        name:
          type: string
          maxLength: 200
          description: Name of the file
          example: receipt_2024.png
        type:
          type: string
          description: The type of the file
          example: Pdf
          enum:
            - Csv
            - Jpg
            - Png
            - Pdf
        category:
          type: string
          description: The category of the file
          example: Evidence
          enum:
            - Report
            - Evidence
            - VerificationDocument
        metadata:
          type: object
          nullable: true
          description: >-
            Any additional key-value data you have attached to the file. These
            will be sent with any associated file events on your webhooks. You
            can have a maximum of 5 pieces of metadata.
          example:
            customerId: '1'
            registered: '123'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the file was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the file was last updated
          example: 1470989538
        sizeInBytes:
          type: integer
          format: int64
          nullable: true
          description: The size in bytes of the associated file
          example: 2048
    Files:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/File'
        paginationToken:
          type: string
          example: fl_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    AccountSettingsResponse:
      type: object
      properties:
        payouts:
          type: object
          properties:
            schedule:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - Automatic
                    - Manual
                  default: Automatic
                  description: The basis on which funds are paid out to the account
                  example: Automatic
    TermsOfServiceAcceptance:
      type: object
      properties:
        ipAddress:
          type: string
          description: The IP address of the user who accepted the terms & conditions
          example: 127.0.0.1
        userAgent:
          type: string
          nullable: true
          description: >-
            The User Agent of the user's browser who has accepted the terms &
            conditions
          example: >-
            Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
            like Gecko) Chrome/103.0.0.0 Safari/537.36
        when:
          type: number
          format: int64
          description: >-
            The time (in epoch seconds) when the terms & conditions were
            accepted.
          example: 1697557453
    AccountResponse:
      type: object
      properties:
        id:
          type: string
          example: ac_b83f2653-06d7-44a9-a548-5825e8186004
          description: The ID of the account
        type:
          $ref: '#/components/schemas/AccountTypes'
        status:
          deprecated: true
          anyOf:
            - $ref: '#/components/schemas/AccountStatuses'
          description: DEPRECATED - check the `verification.status` on this response
        actionsRequired:
          type: array
          deprecated: true
          nullable: true
          description: >-
            A list of actions required by the user when the status is
            'ActionRequired', each accompanied by a description.

            DEPRECATED - if you wish to determine if actions are required before
            payouts can be sent out, check: - if `verification.status` is
            `Required` on this response - if `status` is `Invalid` on any payout
            methods under /v1/accounts/{id}/payout-methods
          items:
            type: object
            properties:
              action:
                $ref: '#/components/schemas/AccountActions'
              description:
                type: string
                description: The description of the action that is required by the user
                example: Complete sign up at the dashboard
        frozen:
          type: boolean
          deprecated: true
          example: false
          description: >-
            A flag to determine whether or not the account is frozen. We may
            temporarily mark an account as frozen if we detect any potential
            fraudulent activity. Payments can still be taken however payouts
            will be disabled, contact us to resolve the issue. DEPRECATED - this
            flag is no longer in use and will always return false, though
            payouts may still be disabled if we detect fraudulent activity.
        email:
          type: string
          nullable: true
          format: email
          maxLength: 200
          description: The account's email address
          example: test@ryftpay.com
        onboardingFlow:
          anyOf:
            - $ref: '#/components/schemas/AccountOnboardingFlow'
          description: The flow used to onboard the account.
        entityType:
          anyOf:
            - $ref: '#/components/schemas/AccountEntityType'
          description: >-
            The type of entity that this account is - either a registered
            business or an individual person (sole trader).
        business:
          type: object
          nullable: true
          description: The details of the business
          anyOf:
            - $ref: '#/components/schemas/BusinessResponse'
        individual:
          type: object
          nullable: true
          description: The details of the individual
          anyOf:
            - $ref: '#/components/schemas/IndividualResponse'
        verification:
          $ref: '#/components/schemas/AccountVerification'
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the account. These
            will be sent with any associated account events on your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            accountId: '1'
        settings:
          type: object
          description: Settings for the account
          anyOf:
            - $ref: '#/components/schemas/AccountSettingsResponse'
        capabilities:
          $ref: '#/components/schemas/AccountCapabilities'
        termsOfService:
          type: object
          nullable: true
          properties:
            acceptance:
              $ref: '#/components/schemas/TermsOfServiceAcceptance'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the account was created
          example: 1470989538
    AccountOnboardingFlow:
      type: string
      example: Hosted
      enum:
        - Hosted
        - NonHosted
    AccountEntityType:
      type: string
      nullable: true
      example: Business
      enum:
        - Business
        - Individual
    BusinessType:
      type: string
      example: Corporation
      enum:
        - Corporation
        - GovernmentEntity
        - Charity
        - LimitedPartnership
        - PrivateCompany
        - PublicCompany
    BusinessRole:
      type: string
      example: Director
      enum:
        - BusinessContact
        - Director
        - UltimateBeneficialOwner
      description: >-
        The role that a person has in the business: `BusinessContact`: An
        individual designated as the main contact for the business. When
        verifying, a letter of authorization may be required if this person is
        not also a director. `Director`: An individual who is listed as one of
        the company's directors. `UltimateBeneficialOwner`: An individual who
        owns at least 25% of the shares, voting rights or other interests.
    AccountCapability:
      type: object
      properties:
        status:
          anyOf:
            - $ref: '#/components/schemas/CapabilityStatus'
        requested:
          type: boolean
          example: true
        requiredFields:
          type: array
          nullable: true
          description: >-
            A list of fields that must be provided prior to requesting the
            capability.
          items:
            type: object
            description: Details of the field that is required for the capability
            properties:
              name:
                type: string
                description: The name of the field
                example: entityType
        disabledReason:
          type: string
          nullable: true
          description: >-
            If the capability is `Disabled`, this may contain an optional
            description explaining why.
          example: Non compliant with scheme mandates
        requestedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the capability was requested
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the capability was last updated
          example: 1470989538
    AccountCapabilities:
      type: object
      properties:
        visaPayments:
          anyOf:
            - $ref: '#/components/schemas/AccountCapability'
        mastercardPayments:
          anyOf:
            - $ref: '#/components/schemas/AccountCapability'
        amexPayments:
          anyOf:
            - $ref: '#/components/schemas/AccountCapability'
        inPersonPayments:
          anyOf:
            - $ref: '#/components/schemas/AccountCapability'
    AccountVerification:
      type: object
      properties:
        status:
          anyOf:
            - $ref: '#/components/schemas/VerificationStatus'
          description: >-
            For `Individual` entities, this is the verification status of the
            individual For `Business` entities, this is only the verification
            status of the business, it will not take persons into
            consideration.          
        requiredFields:
          type: array
          nullable: true
          description: >-
            A list of fields that must be provided for verification. For
            `Business` entities this will detail the fields required for the
            business only, it will not list requirements for persons.
          items:
            type: object
            description: Details of the field that is required for verification
            properties:
              name:
                type: string
                description: The name of the field
                example: business.registrationDate
        requiredDocuments:
          type: array
          nullable: true
          description: >-
            A list of documents that must be provided for verification. For
            `Business` entities this will detail the documents required for the
            business only, it will not list requirements for persons.
          items:
            type: object
            description: Details of the document that is required for verification
            properties:
              category:
                $ref: '#/components/schemas/AccountDocumentCategory'
              types:
                type: array
                description: >-
                  The types of document available to upload in this category.
                  The types will be as follows for each category:

                  - `Authorization`:
                    - `LetterOfAuthorization`
                  - `ProofOfAddress`:
                    - `BankStatement`
                    - `CreditCardStatement`
                    - `OfficialGovernmentLetter`
                    - `PropertyTaxAssessment`
                    - `TaxReturn`
                    - `UtilityBill`
                  - `ProofOfBusiness`:
                    - `BusinessRegistration`
                  - `ProofOfIdentity`:
                    - `DriversLicense`
                    - `NationalId`
                    - `Passport`
                items:
                  $ref: '#/components/schemas/AccountDocumentType'
              quantity:
                type: integer
                format: int32
                example: 1
                description: The minimum number of documents required of this category
        errors:
          type: array
          nullable: true
          description: >-
            Details the errors returned if verification was unsuccessful. This
            could contain documents and/or fields.
          items:
            type: object
            description: Details of the error returned
            properties:
              code:
                $ref: '#/components/schemas/VerificationErrorCode'
              id:
                type: string
                description: >-
                  For `InvalidDocument` this will be the file id of the document
                  that is invalid For `InvalidField` this will be the name of
                  the field that is invalid
                example: fl_01FCTS1XMKH9FF43CAFA4CXT3P
              description:
                type: string
                description: A description of why this document/field was invalid
                example: File corrupted or unclear
        persons:
          type: object
          nullable: true
          description: >-
            Details of the overall requirements for persons in the business.
            Only present if `entityType` is `Business`
          properties:
            status:
              anyOf:
                - $ref: '#/components/schemas/VerificationStatus'
              description: >-
                This is the overall verification status of all persons in the
                business.
            required:
              type: array
              description: >-
                The minimum required persons that must be created for
                verification. Use the Persons API to create the person and
                provide the relevant details so we can verify them.
              items:
                type: object
                description: >-
                  Details the minimum number of a specific type of person that
                  is required for verification
                properties:
                  role:
                    $ref: '#/components/schemas/BusinessRole'
                  quantity:
                    type: integer
                    format: int32
                    example: 1
                    description: >-
                      The minimum number of persons of this role that are
                      required to be created
    CapabilityStatus:
      type: string
      example: Enabled
      enum:
        - NotRequested
        - Pending
        - Disabled
        - Enabled
    VerificationStatus:
      type: string
      example: Required
      enum:
        - NotRequired
        - Required
        - PendingVerification
        - Verified
    VerificationErrorCode:
      type: string
      example: InvalidDocument
      enum:
        - InvalidDocument
        - InvalidField
    PersonVerification:
      type: object
      description: the result of submitting a person for verification
      properties:
        status:
          anyOf:
            - $ref: '#/components/schemas/VerificationStatus'
          description: The verification status of the person
        requiredFields:
          type: array
          nullable: true
          description: A list of fields that must be provided for verification.
          items:
            type: object
            description: Details of the field that is required for verification
            properties:
              name:
                type: string
                description: The name of the field
                example: phoneNumber
        requiredDocuments:
          type: array
          nullable: true
          description: A list of documents that must be provided for verification.
          items:
            type: object
            description: Details of the document that is required for verification
            properties:
              category:
                $ref: '#/components/schemas/AccountDocumentCategory'
              types:
                type: array
                description: The types of document available to upload in this category
                items:
                  $ref: '#/components/schemas/AccountDocumentType'
              quantity:
                type: integer
                format: int32
                example: 1
                description: The minimum number of documents required of this category
        errors:
          type: array
          nullable: true
          description: >-
            Details the errors returned if verification was unsuccessful. This
            could contain documents and/or fields.
          items:
            type: object
            description: Details of the error returned
            properties:
              code:
                $ref: '#/components/schemas/VerificationErrorCode'
              id:
                type: string
                description: >-
                  For `InvalidDocument` this will be the file id of the document
                  that is invalid For `InvalidField` this will be the name of
                  the field that is invalid
                example: fl_01HAAHFQKEF4V7S6H3BTA3H85G
              description:
                type: string
                description: A description of why this document/field was invalid
                example: File corrupted or image not clear
    AccountDocumentCategory:
      type: string
      example: ProofOfIdentity
      description: >-
        The category of document, these are only applicable for certain
        entities:

        - `Authorization` is only applicable for Persons

        - `ProofOfAddress` is only applicable for Individuals or Persons

        - `ProofOfBusiness` is only applicable for Businesses

        - `ProofOfIdentity` is only applicable for Individuals or Persons
      enum:
        - Authorization
        - ProofOfAddress
        - ProofOfBusiness
        - ProofOfIdentity
    AccountDocumentType:
      type: string
      example: BankStatement
      description: >-
        The type of document, these are only applicable for certain entities:

        - 'LetterOfAuthorization' is only applicable for Persons, when the
        'Authorization' category is required

        - 'BankStatement', 'CreditCardStatement', 'OfficialGovernmentLetter',
        'PropertyTaxAssessment', 'TaxReturn', 'UtilityBill' are only applicable
        for Individuals or Persons, when the 'ProofOfAddress' category is
        required

        - 'BusinessRegistration' is only applicable for Businesses, when the
        'ProofOfBusiness' category is required

        - 'DriversLicense', 'NationalId', 'Passport' are only applicable for
        Individuals or Persons, when the 'ProofOfIdentity' category is required
      enum:
        - BankStatement
        - BusinessRegistration
        - CreditCardStatement
        - DriversLicense
        - LetterOfAuthorization
        - NationalId
        - OfficialGovernmentLetter
        - Passport
        - PropertyTaxAssessment
        - TaxReturn
        - UtilityBill
    AccountDocumentStatus:
      type: string
      example: Pending
      enum:
        - Invalid
        - Pending
        - Valid
    PayoutPayoutMethodResponse:
      type: object
      nullable: true
      properties:
        id:
          type: string
          pattern: ^pm_[0-7][0-9A-HJKMNP-TV-Z]{25}
          example: pm_01FCTS1XMKH9FF43CAFA4CXT3P
          description: The payout method the payout will be or was sent to
        bankAccount:
          type: object
          description: >-
            The bank details that the payout will be or was sent to. Note that
            these may be different to those currently assigned to the payout
            method id, if the payout method has since been updated.
          properties:
            bankIdType:
              $ref: '#/components/schemas/BankIdTypeResponse'
            bankId:
              type: string
              nullable: true
              description: >-
                The id of the bank that the bank account is with. This is the
                sort code, swift code or routing number of the bank, depending
                on the currency + country of the payout method
              example: '123456'
            bankName:
              type: string
              nullable: true
              description: The name of the bank that the bank account is with
              example: Ryft Bank Ltd
            branchIdType:
              $ref: '#/components/schemas/BranchIdType'
            branchId:
              type: string
              nullable: true
              description: The id of the branch that the bank account is with
              example: '11122'
            swiftCode:
              type: string
              nullable: true
              description: The Swift code / BIC of the bank
              example: NAIAGB21
            accountNumberType:
              $ref: '#/components/schemas/BankAccountNumberType'
            last4:
              type: string
              description: >-
                The last 4 digits of the account number for the bank account.
                This is the account number or IBAN of the bank account,
                depending on the currency + country of the payout method
              example: '0001'
    PayoutCalculationResponse:
      type: object
      deprecated: true
      description: >-
        Deprecated - please use the 'payoutId' param on the
        /balance-transactions endpoint to see transactions in a payout.

        An object containing a breakdown of how the payout was calculated
      properties:
        paymentsCapturedAmount:
          type: integer
          format: int64
          example: 10000
          description: >-
            The total amount of money credited via captured payments by you or
            by your sub account, in the minor units of the payout currency
        paymentsRefundedAmount:
          type: integer
          format: int64
          example: 50
          description: >-
            The total amount of money debited via refunds of payments by you or
            by your sub account, in the minor units of the payout currency
        paymentsSplitAmount:
          type: integer
          format: int64
          example: 10000
          description: >-
            The total amount of money debited from you via payments split with
            your sub accounts, in the minor units of the payout currency Note
            that this field is only applicable to your own payouts as the
            standard account, as sub accounts cannot split payments with others
        paymentsSplitRefundedAmount:
          type: integer
          format: int64
          example: 50
          description: >-
            The total amount of money credited to you via refunds of payments
            split with your sub accounts, in the minor units of the payout
            currency  Note that this field is only applicable to your own
            payouts as the standard account, as sub accounts cannot split
            payments with others
        splitPaymentsAmount:
          type: integer
          format: int64
          example: 10000
          description: >-
            The total amount of money credited via split payments that your sub
            account has received, in the minor units of the payout currency Note
            that this field is only applicable to your sub accounts payouts, as
            they have payments split with them
        splitPaymentsRefundedAmount:
          type: integer
          format: int64
          example: 50
          description: >-
            The total amount of money debited via refunds of split payments that
            your sub account has received, in the minor units of the payout
            currency Note that this field is only applicable to your sub
            accounts payouts, as they have payments split with them
        platformFeesCollectedAmount:
          type: integer
          format: int64
          example: 0
          description: >-
            The total amount of money credited to you via platform fees taken
            from sub accounts, in the minor units of the payout currency. Note
            that this field is only applicable to your own payouts as the
            standard account, as sub accounts cannot earn platform fees
        platformFeesRefundedAmount:
          type: integer
          format: int64
          example: 0
          description: >-
            The total amount of money debited from you via platform fees
            refunded to sub accounts, in the minor units of the payout currency.
            Note that this field is only applicable to your own payouts as the
            standard account, as sub accounts cannot earn platform fees
        platformFeesPaidAmount:
          type: integer
          format: int64
          example: 100
          description: >-
            The total amount of money debited via platform fees paid to you by
            your sub accounts, in the minor units of the payout currency. Note
            that this field is only applicable to your sub accounts payouts, as
            they pay platform fees
        processingFeesPaidAmount:
          type: integer
          format: int64
          example: 100
          description: >-
            The total amount of money debited via processing fees paid by either
            you or your sub accounts, in the minor units of the payout currency.
            Note that this is applicable to whoever pays the processing fee on
            payments, and includes fees from chargebacks
        chargebacksAmount:
          type: integer
          format: int64
          example: 100
          description: >-
            The total amount of money debited via chargebacks raised for your
            payments, in the minor units of the payout currency. Note that this
            value excludes chargebacks raised for your sub account payments -
            see 'platformChargebacksAmount'
        chargebackReversalsAmount:
          type: integer
          format: int64
          example: 100
          description: >-
            The total amount of money credited via reversals of chargebacks
            raised for your payments, in the minor units of the payout currency.
            Note that this value excludes chargebacks raised for your sub
            account payments - see 'platformChargebackReversalsAmount'
        platformChargebacksAmount:
          type: integer
          format: int64
          example: 100
          description: >-
            The total amount of money debited via chargebacks raised for your
            sub accounts payments, in the minor units of the payout currency.
        platformChargebackReversalsAmount:
          type: integer
          format: int64
          example: 100
          description: >-
            The total amount of money credited via reversals of chargebacks
            raised for your sub accounts payments, in the minor units of the
            payout currency.
        transferredInAmount:
          type: integer
          format: int64
          example: 100
          description: >-
            The total amount of money credited via money transferred into your
            account, in the minor units of the payout currency.
        transferredOutAmount:
          type: integer
          format: int64
          example: 100
          description: >-
            The total amount of money debited via money transferred out of your
            account, in the minor units of the payout currency.
        payoutAmount:
          type: integer
          format: int64
          example: 9750
          description: >-
            The total amount of money paid to you or your sub account, in the
            minor units of the payout currency
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The ISO code of the payout currency
        numberOfPaymentsCaptured:
          type: integer
          format: int64
          example: 100
          description: The total number of payments captured by you or your sub account
        numberOfPaymentsRefunded:
          type: integer
          format: int64
          example: 1
          description: The total number of payments refunded by you or your sub account
        numberOfPaymentsSplit:
          type: integer
          format: int64
          example: 100
          description: >-
            The total number of payments split with your sub accounts Note that
            this field is only applicable to your own payouts as the standard
            account, as sub accounts cannot split payments with others
        numberOfPaymentsSplitRefunded:
          type: integer
          format: int64
          example: 1
          description: >-
            The total number of refunds for payments split with your sub
            accounts Note that this field is only applicable to your own payouts
            as the standard account, as sub accounts cannot split payments with
            others
        numberOfSplitPayments:
          type: integer
          format: int64
          example: 100
          description: >-
            The total number of split payments that your sub account has
            received Note that this field is only applicable to your sub
            accounts payouts, as they have payments split with them
        numberOfSplitPaymentsRefunded:
          type: integer
          format: int64
          example: 1
          description: >-
            The total number of split payments that your sub account has
            received Note that this field is only applicable to your sub
            accounts payouts, as they have payments split with them
        numberOfPlatformFeesCollected:
          type: integer
          format: int64
          example: 0
          description: >-
            The total number of platform fees collected. Note that this field is
            only applicable to your own payouts as the standard account, as sub
            accounts cannot earn platform fees
        numberOfPlatformFeesRefunded:
          type: integer
          format: int64
          example: 0
          description: >-
            The total number of platform fees refunded. Note that this field is
            only applicable to your own payouts as the standard account, as sub
            accounts cannot earn platform fees
        numberOfChargebacks:
          type: integer
          format: int64
          example: 0
          description: >-
            The total number of chargebacks that were raised for your accounts
            payments.
        numberOfChargebackReversals:
          type: integer
          format: int64
          example: 0
          description: >-
            The total number of chargebacks that were reversed for your accounts
            payments.
        numberOfPlatformChargebacks:
          type: integer
          format: int64
          example: 0
          description: >-
            The total number of chargebacks that were raised for your sub
            accounts payments.
        numberOfPlatformChargebackReversals:
          type: integer
          format: int64
          example: 0
          description: >-
            The total number of chargebacks that were reversed for your sub
            accounts payments.
        numberOfTransfersIn:
          type: integer
          format: int64
          example: 0
          description: >-
            The total number of transfers made that transferred funds into your
            account.
        numberOfTransfersOut:
          type: integer
          format: int64
          example: 0
          description: >-
            The total number of transfers made that transferred funds out of
            your account.
        numberOfCustomers:
          type: integer
          format: int64
          example: 74
          description: >-
            The total number of unique customers that made payments to you or
            your sub accounts
        numberOfNewCustomers:
          type: integer
          format: int64
          example: 50
          nullable: true
          description: >-
            The total number of unique customers that made their first payments
            to you or your sub accounts on the date these payments were made
    PayoutResponse:
      type: object
      properties:
        id:
          type: string
          example: po_01FJ1H0023R1AHM77YQ75RMKE7
          description: The id of the payout
        paymentsTakenDate:
          type: string
          format: date
          example: '2021-10-14'
          deprecated: true
          description: >-
            Deprecated - please use the 'payoutId' param on the
            /balance-transactions endpoint to see transactions in a payout.
        paymentsTakenDateFrom:
          type: string
          format: date
          example: '2021-10-14'
          deprecated: true
          description: >-
            Deprecated - please use the 'payoutId' param on the
            /balance-transactions endpoint to see transactions in a payout. The
            date on which payments within this payout began, in the format
            yyyy-MM-dd
        paymentsTakenDateTo:
          type: string
          format: date
          example: '2021-10-14'
          deprecated: true
          description: >-
            Deprecated - please use the 'payoutId' param on the
            /balance-transactions endpoint to see transactions in a payout. The
            date on which payments within this payout end, in the format
            yyyy-MM-dd
        amount:
          type: integer
          format: int64
          example: 9750
          description: The total amount that was paid out, minus any fees
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The ISO code of the payout currency
        status:
          $ref: '#/components/schemas/AccountPayoutStatuses'
        scheduleType:
          type: string
          enum:
            - Automatic
            - Manual
          description: >-
            Whether the payout was issued automatically by Ryft or manually
            requested.
          example: Automatic
        payoutMethod:
          $ref: '#/components/schemas/PayoutPayoutMethodResponse'
        failureReason:
          type: string
          example: InvalidPayoutMethod
          description: >-
            If the payout is in the 'Failed' status, this is an additional
            reason to explain why
          nullable: true
        payoutCalculation:
          $ref: '#/components/schemas/PayoutCalculationResponse'
        scheme:
          $ref: '#/components/schemas/PayoutScheme'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the payout was created
          example: 1631696701
        scheduledTimestamp:
          type: integer
          format: int64
          example: 1631696701
          description: epoch timestamp of when the payout is scheduled to be paid
        completedTimestamp:
          type: integer
          format: int64
          example: 1631696701
          nullable: true
          description: >-
            epoch timestamp of when the payout moved to the 'Completed' status,
            i.e. when it was paid out
        metadata:
          type: object
          nullable: true
          description: >-
            Your custom key-value data for the payout. You can have a maximum of
            5 pieces of metadata.
          example:
            orderId: '1'
            customerId: '123'
    PayoutsResponse:
      type: object
      properties:
        payouts:
          type: array
          items:
            $ref: '#/components/schemas/PayoutResponse'
        paginationToken:
          type: string
          example: po_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'startsAfter' query parameter. This
            field is null when there are no further items to return.
          nullable: true
    Transfer:
      type: object
      properties:
        id:
          type: string
          example: tfr_01FCTS1XMKH9FF43CAFA4CXT3P
          description: The unique id of the transfer
        status:
          type: string
          enum:
            - Pending
            - Declined
            - Completed
          description: The status the transfer is currently in
          example: Completed
        amount:
          type: integer
          format: int32
          description: The transfer amount (in minor units)
          example: 75000
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The ISO currency code
        reason:
          type: string
          nullable: true
          description: An optional reason describing why the transfer was initiated.
          example: Covering dispute fees of £25 from 25th October
        source:
          type: object
          nullable: true
          description: Where the `amount` was taken from
          properties:
            accountId:
              type: string
              pattern: >-
                ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
              example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
              description: ID of the Ryft account that funds were taken from
        destination:
          type: object
          nullable: true
          description: Where the `amount` will be credited to
          properties:
            accountId:
              type: string
              pattern: >-
                ^ac_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
              example: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
              description: ID of the Ryft account that will receive the funds
        errors:
          type: array
          nullable: true
          description: Details any errors explaining why the transfer was `Declined`.
          items:
            type: object
            properties:
              code:
                type: string
                description: code for the error
                example: InsufficientSourceBalance
              description:
                type: string
                description: Text describing the error
                example: >-
                  The account did not have sufficient funds available to cover
                  this transfer
        metadata:
          type: object
          nullable: true
          description: >-
            Your custom key-value data for the transfer. You can have a maximum
            of 5 pieces of metadata.
          example:
            orderId: '1'
            customerId: '123'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the transfer was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the transfer was last updated
          example: 1470989538
    Transfers:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Transfer'
        paginationToken:
          type: string
          example: tfr_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'startsAfter' query parameter. This
            field is null when there are no further items to return.
          nullable: true
    Balance:
      type: object
      properties:
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The ISO currency code of the balance
        pending:
          type: object
          description: >-
            The pending amount in the given balance. Pending amounts refer to
            transactions which have not yet been cleared and made available. At
            this stage, the total net amount is unknown and you can expect fees
            to be deducted prior to these amounts becoming available.
          properties:
            amount:
              type: integer
              format: int64
              example: 500
              description: The amount in minor units
        cleared:
          type: object
          description: >-
            The cleared amount in the given balance. Cleared amounts refer to
            transactions which first must go through clearing prior to becoming
            available. A typical example would be a capture or refund
            transaction. These are cleared with the card schemes (usually the
            following day). This value will take into account any deductions
            during clearing such as fees charged by Ryft or pass through fees
            such as interchange.
          properties:
            amount:
              type: integer
              format: int64
              example: 500
              description: The amount in minor units.
        available:
          type: object
          description: >-
            The available amount in the given balance. Available amounts refer
            to the funds that can be paid out or transferred. This value will
            reflect the final net amount and take into account any deduction
            from fees (such as those charged during processing).
          properties:
            amount:
              type: integer
              format: int64
              example: 500
              description: The amount in minor units
        lastUpdatedTimestamp:
          nullable: true
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the balance was last updated
          example: 1470989538
    Balances:
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Balance'
    BalanceTransactionOrigin:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique ID of the related resource that subsequently created this
            balance transaction. For example, when capturing a payment, you can
            expect the associated transaction ID of the capture to be populated
            here.
          example: txn_01FCTS1XMKH9FF43CAFA4CXT3P_01FCTS1XMKH9FF43CAFA4CXT3P
        amount:
          type: integer
          format: int64
          description: >-
            The total amount on the related resource.

            Note that this can differ to the `amount` on the balance transaction
            itself if the transaction represents a fee-only. For example,
            `TransactionApproval`'s whereby there is no `amount` to net on the
            transaction but a fee is deducted.
          example: 575
        accountId:
          type: string
          nullable: true
          description: >-
            Populated if the related resource resides under a particular sub
            account, otherwise omitted.
          example: null
    BalanceTransaction:
      type: object
      properties:
        id:
          type: string
          description: The unique ID for the balance transaction
          example: bltxn_01FCTS1XMKH9FF43CAFA4CXT3P
        type:
          type: string
          enum:
            - TransactionApproval
            - TransactionCapture
            - TransactionRefund
            - TransactionChargeback
            - TransactionChargebackReversal
            - PlatformFee
            - PlatformFeeRefund
            - SplitPayment
            - SplitPaymentRefund
            - TransferIn
            - TransferOut
            - Payout
            - PayoutReversal
            - PlatformChargeback
            - PlatformChargebackReversal
            - Adjustment
            - ConversionBuy
            - ConversionSell
            - ConversionPlatformFee
          example: TransactionCapture
        amount:
          type: integer
          format: int64
          description: The total amount on the transaction
          example: 575
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: >-
            The ISO currency code of the transaction. The transaction will
            impact the balance matching this currency.
        description:
          type: string
          nullable: true
          description: >-
            An optional field which we may populate on particular transactions
            to provide additional information.
          example: null
        feeTotal:
          type: integer
          format: int32
          nullable: true
          description: >-
            The total amount of fees allocated to this transaction. Note that
            fees may be added incrementally up until the transaction reaches the
            `Available` status. After this point you can consider the value in
            this field final.
          example: 5
        net:
          type: integer
          format: int64
          nullable: true
          description: >-
            The total net from this transaction. This amount will be the value
            allocated to the `available` amount in the balance of this
            transaction currency.
          example: 572
        status:
          type: string
          enum:
            - Pending
            - Cleared
            - Available
          description: >-
            A status representing the current stage this transaction is in.
            These can be categorised as follows:
             - `Pending` - transactions which must go through clearing before being made available (e.g. `TransactionCapture`)
             - `Cleared` - pending transactions which have successfully been cleared such as those requiring settlement with the card schemes
             - `Available` - transactions which have cleared and have now been made available or those which immediately impact your available balance such as payouts and transfers
          example: Available
        origin:
          $ref: '#/components/schemas/BalanceTransactionOrigin'
        availableAt:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the transaction is expected to be
            made available. At this point the `net` amount will be allocated to
            your `available` balances


            Note that this timestamp is an approximation and the actual
            allocation may complete on or after this time.
          example: 1631696701
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the transaction was created
          example: 1631696701
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the transaction was last updated
          example: 1631696701
    BalanceTransactions:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/BalanceTransaction'
        paginationToken:
          type: string
          example: bltxn_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'startsAfter' query parameter. This
            field is null when there are no further items to return.
          nullable: true
    Conversion:
      type: object
      properties:
        id:
          type: string
          description: The unique ID of the conversion
          example: cv_01FCTS1XMKH9FF43CAFA4CXT3P
        sell:
          $ref: '#/components/schemas/ConversionSell'
        buy:
          $ref: '#/components/schemas/ConversionBuy'
        rate:
          type: number
          nullable: true
          description: >-
            The gross exchange rate applied, before fees. `buy.amount` is the
            converted sell amount at this rate, net of any sell-side fee. Null
            until the conversion has been priced.
          example: 0.86
        status:
          type: string
          enum:
            - InProgress
            - Settled
          description: |-
            The status of the conversion:
             - `InProgress` - the conversion has been created and is being processed
             - `Settled` - the conversion has settled and the bought funds are available
          example: Settled
        reason:
          type: string
          nullable: true
          description: An optional reason supplied when the conversion was created
          example: Invoice payment
        estimatedSettlementDate:
          type: string
          nullable: true
          description: >-
            The estimated date the conversion will settle (ISO date format).
            This is an estimate and may not exactly match the final settlement
            date. Null until the conversion has been priced — populated from the
            first `Conversion.updated` event onward.
          example: '2024-03-15'
        settledTimestamp:
          type: integer
          format: int64
          nullable: true
          description: >-
            The epoch timestamp (seconds) when the conversion settled. Null
            until the conversion reaches the `Settled` status.
          example: 1710460800
        createdBy:
          type: object
          nullable: true
          description: >-
            The user who created the conversion. Null when the conversion was
            created via the API directly rather than the portal.
          properties:
            id:
              type: string
              description: The ID of the user who created the conversion
              example: usr_01FCTS1XMKH9FF43CAFA4CXT3P
            name:
              type: string
              nullable: true
              description: The name of the user who created the conversion.
              example: John Smith
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the conversion was created
          example: 1710288000
    ConversionSell:
      type: object
      description: The sell side of the conversion
      properties:
        amount:
          type: integer
          format: int64
          description: >-
            The gross amount being sold in minor units, before fees. When `fees`
            is present the fee is charged on this amount and only the remainder
            is converted.
          example: 100000
        currency:
          type: string
          maxLength: 3
          description: The three-letter ISO-4217 currency code being sold
          example: GBP
        fees:
          type: object
          anyOf:
            - $ref: '#/components/schemas/ConversionFees'
          nullable: true
          description: >-
            The FX fees charged on the sell side. Present only when the fee was
            charged on this side rather than the buy side.
    ConversionBuy:
      type: object
      description: The buy side of the conversion
      properties:
        amount:
          type: integer
          format: int64
          nullable: true
          description: >-
            The gross amount being bought in minor units, before fees. This is
            the sell amount converted at `rate`, after any sell-side fee has
            been deducted from it. When `fees` is present, the net amount
            credited to the balance is this amount minus that fee. This is not
            returned until the conversion has been priced.
          example: 86000
        currency:
          type: string
          maxLength: 3
          description: The three-letter ISO-4217 currency code being bought
          example: EUR
        fees:
          type: object
          anyOf:
            - $ref: '#/components/schemas/ConversionFees'
          nullable: true
          description: >-
            The FX fees charged on the buy side. Present only when the fee was
            charged on this side rather than the sell side.
    ConversionFee:
      type: object
      properties:
        amount:
          type: integer
          format: int64
          description: The fee amount in minor units of the currency
          example: 500
    ConversionPlatformFeeDetail:
      type: object
      properties:
        amount:
          type: integer
          format: int64
          description: >-
            The platform's gross FX fee in minor units, charged on the gross
            amount of whichever side carries the fee. This is the full fee
            before Ryft's fee is taken out of it; the platform retains `amount`
            minus `ryftFee.amount`.
          example: 1000
        ryftFee:
          allOf:
            - $ref: '#/components/schemas/ConversionFee'
          description: Ryft's FX fee, to be charged against the platform fee.
    ConversionFees:
      type: object
      description: >-
        The FX fees charged on the conversion, in minor units of the currency.
        Returned once the conversion has been priced.

        The fee is charged on exactly one side of the conversion, so `sell.fees`
        and `buy.fees` are mutually exclusive. Exactly one is ever present,
        depending on which side the fee was charged.
      properties:
        ryft:
          type: object
          anyOf:
            - $ref: '#/components/schemas/ConversionFee'
          nullable: true
          description: >-
            Ryft's FX fee, charged on the gross amount of whichever side carries
            the fee.

            Only present when the conversion is performed under your account.
        platform:
          type: object
          anyOf:
            - $ref: '#/components/schemas/ConversionPlatformFeeDetail'
          nullable: true
          description: >-
            The platform's FX fee, including Ryft's FX fee.

            Only present when the conversion is performed on behalf of a
            Sub-Account.
    ConversionRate:
      type: object
      description: An estimated conversion rate
      required:
        - sell
        - buy
        - rate
      properties:
        sell:
          $ref: '#/components/schemas/ConversionRateSell'
        buy:
          $ref: '#/components/schemas/ConversionRateBuy'
        rate:
          type: number
          description: >-
            The gross exchange rate that would be applied, before fees.
            `buy.amount` is the converted sell amount at this rate, net of any
            sell-side fee.
          example: 0.86
        estimatedSettlementDate:
          type: string
          nullable: true
          description: >-
            The estimated date the conversion will settle (ISO date format).
            This is an estimate and may not exactly match the final settlement
            date.
          example: '2024-03-15'
    ConversionRateSell:
      type: object
      description: The sell side of the conversion rate
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          format: int64
          description: >-
            The gross amount that would be sold in minor units, before fees.
            When `fees` is present the fee would be charged on this amount and
            only the remainder converted.
          example: 100000
        currency:
          type: string
          maxLength: 3
          description: The three-letter ISO-4217 currency code being sold
          example: GBP
        fees:
          type: object
          anyOf:
            - $ref: '#/components/schemas/ConversionFees'
          nullable: true
          description: >-
            The FX fees that would be charged on the sell side. Present only
            when the fee would be charged on this side rather than the buy side.
    ConversionRateBuy:
      type: object
      description: The buy side of the conversion rate
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          format: int64
          description: >-
            The gross amount that would be bought in minor units, before fees.
            This is the sell amount converted at `rate`, after any sell-side fee
            has been deducted from it. When `fees` is present, the net amount
            credited to the balance would be this amount minus that fee.
          example: 86000
        currency:
          type: string
          maxLength: 3
          description: The three-letter ISO-4217 currency code being bought
          example: EUR
        fees:
          type: object
          anyOf:
            - $ref: '#/components/schemas/ConversionFees'
          nullable: true
          description: >-
            The FX fees that would be charged on the buy side. Present only when
            the fee would be charged on this side rather than the sell side.
    Conversions:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Conversion'
        paginationToken:
          type: string
          example: cv_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'startsAfter' query parameter. This
            field is null when there are no further items to return.
          nullable: true
    CreateConversionRequestBody:
      type: object
      required:
        - sell
        - buy
        - termAgreement
      properties:
        sell:
          type: object
          description: The funds being sold
          required:
            - currency
            - amount
          properties:
            currency:
              type: string
              maxLength: 3
              description: The three-letter ISO-4217 currency code to sell
              example: GBP
            amount:
              type: integer
              format: int64
              description: >-
                The amount to convert in minor units. Minimum and maximum
                amounts [vary by
                currency](https://developer.ryftpay.com/documentation/overview/core_concepts/currencies).
              example: 100000
        buy:
          type: object
          description: The funds being bought
          required:
            - currency
          properties:
            currency:
              type: string
              maxLength: 3
              description: The three-letter ISO-4217 currency code to buy
              example: EUR
        reason:
          type: string
          nullable: true
          description: An optional reason for the conversion
          example: Invoice payment
        termAgreement:
          type: boolean
          description: >-
            Confirms the account the conversion is created for (your own or a
            sub account) has agreed to our [conversion
            terms](https://dash.ryftpay.com/about/conversion-terms). The request
            is rejected if this is `false`, so capture the user's agreement
            before creating a conversion (e.g. via a tickbox).
          example: true
    ApplePayWebSessionResponse:
      type: object
      properties:
        sessionObject:
          type: string
          description: >-
            The opaque Apple Pay session object. This will be a JSON escaped
            string.


            Supply this value to
            [completeMerchantValidation](https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778015-completemerchantvalidation)
          example: ...
    ApplePayWebDomain:
      type: object
      properties:
        id:
          type: string
          description: The unique ID for the web domain
          example: apwd_01FCTS1XMKH9FF43CAFA4CXT3P
        domainName:
          type: string
          description: The domain name registered for Apple Pay
          example: ryftpay.com
        createdTimestamp:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the apple pay web domain was
            created
          example: 1631696701
    ApplePayWebDomains:
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ApplePayWebDomain'
        paginationToken:
          type: string
          example: apwd_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    ApplePayWebDomainDeleted:
      type: object
      properties:
        id:
          type: string
          description: The Id of the deleted Apple Pay web domain
          example: apwd_01FCTS1XMKH9FF43CAFA4CXT3P
    InPersonProduct:
      type: object
      properties:
        id:
          type: string
          description: The Id of the product
          example: ippd_01FCTS1XMKH9FF43CAFA4CXT3P
        name:
          type: string
          description: The name of the product/model
          example: PAX A920 Pro
        status:
          type: string
          enum:
            - Available
            - Unavailable
          description: Whether the product is available for order placement.
          example: Available
        description:
          type: string
          description: The description of the product/model
          example: >-
            Powered by the fastest processor to simultaneously run the most
            complex applications under the highest levels of inbuilt payment
            security. The ultimate viewing experience is delivered on the A920
            PRO 5.5-inch touchscreen, enabling you to better showcase logos,
            adverts, and video clips, creating multiple customer engagement
            opportunities.
        details:
          type: object
          description: A key-value dictionary of details of this product.
          additionalProperties:
            type: string
          example:
            battery: 5150mAh | 3.7V
            cardReaders: Chip & PIN | Contactless | Magnetic Stripe
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was last updated
          example: 1470989538
    InPersonProducts:
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/InPersonProduct'
        paginationToken:
          type: string
          example: ippd_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    InPersonProductSku:
      type: object
      properties:
        id:
          type: string
          description: The Id of the SKU
          example: ipsku_01FCTS1XMKH9FF43CAFA4CXT3P
        name:
          type: string
          description: The name of this particular SKU
          example: PAX A920 Pro
        country:
          type: string
          description: The country this SKU is available in. 2-letter ISO standard
          example: GB
        totalAmount:
          type: integer
          format: int32
          example: 5000
          description: The total cost (in minor units) of this SKU, inclusive of tax
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The ISO currency code
        status:
          type: string
          enum:
            - Available
            - Unavailable
          description: Whether the sku is available for order placement.
          example: Available
        productId:
          type: string
          description: The Id of the product this SKU belongs to
          example: ippd_01FCTS1XMKH9FF43CAFA4CXT3P
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was last updated
          example: 1470989538
    InPersonProductSkus:
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/InPersonProductSku'
        paginationToken:
          type: string
          example: ipsku_01FCTS1XMKH9FF43CAFA4CXT3P
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    InPersonOrderItem:
      type: object
      properties:
        id:
          type: string
          description: The ID of the corresponding `InPersonProductSku`
          nullable: false
          example: ipsku_01FCTS1XMKH9FF43CAFA4CXT3P
        name:
          type: string
          description: The name of the corresponding SKU
          nullable: false
          example: Pax A920 Pro
        totalAmountPerUnit:
          type: integer
          format: int64
          description: >-
            The total amount (in minor units) per unit of this SKU, inclusive of
            tax
          nullable: false
          example: 100
        taxAmountPerUnit:
          type: integer
          format: int64
          description: The amount of tax (in minor units) per unit of this SKU.
          nullable: false
          example: 20
        quantity:
          type: integer
          format: int32
          description: The number of the given SKU to purchase on the order
          minimum: 10
          nullable: false
          example: 10
    InPersonOrderShippingAddress:
      type: object
      properties:
        businessName:
          type: string
          description: The name of the business at this address
          nullable: true
          example: Ryft Computer Parts
        firstName:
          type: string
          description: The first name of the customer
          minLength: 1
          maxLength: 80
          nullable: false
          example: Jeff
        lastName:
          type: string
          description: The last name of the customer
          minLength: 1
          maxLength: 80
          nullable: false
          example: Bridges
        lineOne:
          type: string
          description: First line of the address
          minLength: 1
          maxLength: 80
          nullable: false
          example: 123 Test Street
        lineTwo:
          type: string
          description: Second line of the address
          minLength: 1
          maxLength: 80
          nullable: true
          example: 456 Test Lane
        city:
          type: string
          description: The address city/town
          minLength: 2
          maxLength: 50
          nullable: false
          example: Manchester
        country:
          type: string
          description: The two-character ISO country code
          example: GB
          minLength: 2
          maxLength: 2
          nullable: false
        postalCode:
          type: string
          description: The postal code/zip of the address
          minLength: 2
          maxLength: 16
          nullable: false
          example: M3 3AG
        region:
          type: string
          description: >-
            The state/county/province/region Required if the address is in the
            US/Canada and must be a 2-character ISO state/province code
          minLength: 1
          maxLength: 80
          nullable: true
          example: Greater Manchester
        deliveryInstructions:
          type: string
          description: Any delivery instructions
          example: Deliver to the Goods In entrance at the back of the building
          nullable: true
    InPersonOrderShippingContact:
      type: object
      properties:
        email:
          type: string
          example: example@mail.com
          description: The email address to contact regarding shipping updates.
          nullable: false
        mobilePhoneNumber:
          type: string
          description: >-
            The mobile phone number to contact regarding shipping updates. Must
            be in E.164 format!
          example: '+447900000000'
          nullable: false
    InPersonOrderShipping:
      type: object
      description: The shipping address, contact info & method used
      properties:
        address:
          type: object
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/InPersonOrderShippingAddress'
        contact:
          type: object
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/InPersonOrderShippingContact'
        method:
          type: object
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/InPersonOrderShippingMethod'
    InPersonOrderShippingMethod:
      type: object
      properties:
        id:
          type: string
          description: The Id of the shipping method
          example: ipsm_01FCTS1XMKH9FF43CAFA4CXT3P
        name:
          type: string
          description: The name of the shipping method that was used
          example: Next Business Day
        description:
          type: string
          description: A description of this shipping method
          example: >-
            If placed before 9pm, this order will be shipped on the next
            business day.
        totalAmount:
          type: integer
          format: int64
          example: 1500
          description: >-
            The total amount (in minor units) that was charged for this shipping
            method, inclusive of tax
        taxAmount:
          type: integer
          format: int64
          description: The amount of tax (in minor units) included in the 'totalAmount'
          example: 100
    InPersonOrderTrackingItem:
      type: object
      properties:
        carrier:
          type: string
          nullable: false
          description: The name of the carrier who will deliver this shipment
          example: DHL
        reference:
          type: string
          nullable: false
          description: The tracking reference for this shipment
          example: '2505080829'
        shippedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when this shipment was shipped
          example: 1470989538
    InPersonOrderTracking:
      type: object
      description: Tracking details for the order. Available once it has been shipped.
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/InPersonOrderTrackingItem'
    InPersonOrder:
      type: object
      properties:
        id:
          type: string
          description: The Id of the order
          example: ipord_01FCTS1XMKH9FF43CAFA4CXT3P
        status:
          type: string
          enum:
            - AwaitingPayment
            - ReadyToShip
            - Shipped
            - Cancelled
          example: AwaitingPayment
        totalAmount:
          type: integer
          format: int64
          example: 6000
          description: The total amount (in minor units) of the order, inclusive of tax
        taxAmount:
          type: integer
          format: int64
          example: 1000
          description: The total amount of tax (in minor units) paid on the order
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The ISO currency code
        items:
          type: array
          items:
            $ref: '#/components/schemas/InPersonOrderItem'
        shipping:
          type: object
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/InPersonOrderShipping'
        tracking:
          $ref: '#/components/schemas/InPersonOrderTracking'
        metadata:
          type: object
          description: >-
            Your own custom key-value data for this object. These will be sent
            with any associated events on your webhooks. You can have a maximum
            of 5 pieces of metadata.


            Keys must be between 1 and 30 characters in length.


            Values must be between 1 and 250 characters in length.
          example:
            orderId: '1'
            customerId: '123'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was last updated
          example: 1470989538
    InPersonOrders:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/InPersonOrder'
        paginationToken:
          type: string
          example: ipord_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    InPersonLocationAddress:
      type: object
      properties:
        lineOne:
          type: string
          description: First line of the address
          minLength: 1
          maxLength: 80
          nullable: false
          example: 123 Test Street
        lineTwo:
          type: string
          description: Second line of the address
          minLength: 1
          maxLength: 80
          nullable: true
          example: 456 Test Lane
        city:
          type: string
          description: The address city/town
          minLength: 2
          maxLength: 50
          nullable: false
          example: Manchester
        country:
          type: string
          description: The two-character ISO country code
          example: GB
          minLength: 2
          maxLength: 2
          nullable: false
        postalCode:
          type: string
          description: The postal code/zip of the address
          minLength: 2
          maxLength: 16
          nullable: false
          example: M3 3AG
        region:
          type: string
          description: >-
            The state/county/province/region Required if the address is in the
            US/Canada and must be a 2-character ISO state/province code
          minLength: 1
          maxLength: 80
          example: Greater Manchester
    GeoCoordinates:
      type: object
      nullable: true
      properties:
        latitude:
          type: number
          format: double
          example: 51.1789
        longitude:
          type: number
          format: double
          example: 1.8262
    InPersonLocation:
      type: object
      properties:
        id:
          type: string
          description: The unique Id of the location
          example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
        name:
          type: string
          description: Your name for the location. This can be used for display purposes.
          example: Head Office front desk
        address:
          $ref: '#/components/schemas/InPersonLocationAddress'
        geoCoordinates:
          anyOf:
            - $ref: '#/components/schemas/GeoCoordinates'
        metadata:
          type: object
          description: >-
            Your own custom key-value data for this object. These will be sent
            with any associated events on your webhooks. You can have a maximum
            of 10 pieces of metadata.


            Keys must be between 1 and 30 characters in length.


            Values must be between 1 and 250 characters in length.
          example:
            internalID: '1'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was last updated
          example: 1470989538
    InPersonLocationDeleted:
      type: object
      properties:
        id:
          type: string
          description: The Id of the deleted location
          example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
    InPersonLocations:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/InPersonLocation'
        paginationToken:
          type: string
          example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    TerminalDeviceDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of the device
          example: PAX A920 Pro
        serialNumber:
          type: string
          description: The serial number of the device
          example: '25050808291100'
    TerminalActionType:
      type: string
      enum:
        - Transaction
      description: The type of action in progress on the terminal.
      example: Transaction
    TerminalActionStatus:
      type: string
      enum:
        - InProgress
        - Cancelled
        - Failed
        - Succeeded
      description: The status of the action on the terminal
      example: InProgress
    TerminalReceiptPrintingSource:
      type: string
      enum:
        - Terminal
        - PointOfSale
      description: Identifies the source responsible for receipt printing
      example: Terminal
    TerminalActionAmounts:
      type: object
      properties:
        requested:
          type: integer
          format: int32
          example: 500
          nullable: false
          description: The total amount requested for this transaction
    TerminalActionTransaction:
      type: object
      properties:
        type:
          type: string
          enum:
            - Payment
            - Refund
          example: Payment
        paymentSessionId:
          type: string
          description: >-
            The unique paymentSessionId corresponding to the payment action on
            the terminal
          example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
        amounts:
          $ref: '#/components/schemas/TerminalActionAmounts'
        currency:
          type: string
          maxLength: 3
          example: GBP
          description: The ISO currency code
        settings:
          $ref: '#/components/schemas/TerminalActionTransactionSettings'
    TerminalActionError:
      type: object
      properties:
        code:
          type: string
          description: Identifies the specific reason for the action failing on the device
          example: TransactionDeclined
        settings:
          $ref: '#/components/schemas/TerminalActionTransactionSettings'
    TerminalActionTransactionSettings:
      type: object
      description: The settings that were used for this transaction on the terminal
      properties:
        receiptPrintingSource:
          $ref: '#/components/schemas/TerminalReceiptPrintingSource'
    TerminalAction:
      type: object
      nullable: true
      description: The most recent action initiated on the terminal.
      properties:
        type:
          $ref: '#/components/schemas/TerminalActionType'
        status:
          $ref: '#/components/schemas/TerminalActionStatus'
        id:
          type: string
          description: The unique ID of the action
          example: tmlact_01K7HNYENCZF6A784V5T625108_01K7KHC9ESPB1VZ9APGF3R5X7W
        error:
          type: object
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/TerminalActionError'
        transaction:
          type: object
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/TerminalActionTransaction'
        createdTimestamp:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the action was initiated on the
            terminal
          example: 1470989538
        completedTimestamp:
          type: integer
          format: int64
          nullable: true
          description: >-
            The epoch timestamp (seconds) when the action was completed on the
            terminal. This field will be populated once the action reaches a
            status of `Cancelled`, `Failed` or `Succeeded`.
          example: 1470989538
    Terminal:
      type: object
      properties:
        id:
          type: string
          description: The unique Id of the terminal
          example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
        name:
          type: string
          description: Your name for the terminal. This can be used for display purposes.
          example: Front of house
        location:
          type: object
          description: The location where the terminal resides
          properties:
            id:
              type: string
              description: The unique location ID
              example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
        device:
          $ref: '#/components/schemas/TerminalDeviceDetail'
        action:
          $ref: '#/components/schemas/TerminalAction'
        metadata:
          type: object
          description: >-
            Your own custom key-value data for this object. These will be sent
            with any associated events on your webhooks. You can have a maximum
            of 10 pieces of metadata.


            Keys must be between 1 and 30 characters in length.


            Values must be between 1 and 250 characters in length.
          example:
            internalID: '1'
        createdTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was created
          example: 1470989538
        lastUpdatedTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the object was last updated
          example: 1470989538
    Terminals:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Terminal'
        paginationToken:
          type: string
          example: tml_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473
          description: >-
            A token to use for getting the next page of results - send the same
            request with this value in the 'paginationToken' query parameter.
            This field is null when there are no further items to return
          nullable: true
    TerminalDeleted:
      type: object
      properties:
        id:
          type: string
          description: The Id of the deleted terminal
          example: tml_01FCTS1XMKH9FF43CAFA4CXT3P
    CreateAuthLinkRequestBody:
      type: object
      properties:
        email:
          type: string
          format: email
          maxLength: 200
          description: The main email address for the account
          example: test@ryftpay.com
        redirectUrl:
          type: string
          description: >-
            The URL to redirect back to once the customer has authenticated
            (success/fail).

            We will append the `accountId` under query parameter `account` for
            the customer onto your redirectUrl once they successfully
            authenticate.

            You should check for this parameter once the customer returns and
            store it for future use.
          example: https://mywebsite.com/account/verification?p1=kjr4jbnm4bm4b5mnb
    CreateAuthLinkResponse:
      type: object
      properties:
        createdTimestamp:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the temporary auth link was
            created
          example: 1631696701
        expiresTimestamp:
          type: integer
          format: int64
          description: The epoch timestamp (seconds) when the temporary auth link expires
          example: 1631703901
        url:
          type: string
          description: The URL to redirect to.
          example: https://sandbox-dash.ryftpay.com/signin?atl=123
    CreateAccountLinkRequestBody:
      type: object
      properties:
        accountId:
          type: string
          example: ac_b83f2653-06d7-44a9-a548-5825e8186004
          description: The account id for which the payout verification is required
        redirectUrl:
          type: string
          description: >-
            The URL to redirect back to on completion or cancelation of the
            verification detail
          example: https://mywebsite.com/account/verification?p1=kjr4jbnm4bm4b5mnb
    CreateAccountLinkResponse:
      type: object
      properties:
        createdTimestamp:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the temporary account link was
            created
          example: 1631696701
        expiresTimestamp:
          type: integer
          format: int64
          description: >-
            The epoch timestamp (seconds) when the temporary account link
            expires
          example: 1631703901
        url:
          type: string
          description: The URL to redirect to.
          example: >-
            https://sandbox-dash.ryftpay.com/join?l=al_NzEwYzUxOTA1NWQ0YmIwMGMwYzAxMzQyMGM3YzNkNmRkY2VhYzM3MQ
    CreateCustomerRequestBody:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          format: email
          maxLength: 200
          description: >-
            The customer's email address. Note that these must be unique and are
            case insensitive
          example: example@example.com
        firstName:
          type: string
          description: The first name of the customer
          nullable: true
          example: Jeff
          minLength: 1
          maxLength: 80
        lastName:
          type: string
          description: The last name of the customer
          nullable: true
          example: Bridges
          minLength: 1
          maxLength: 80
        homePhoneNumber:
          type: string
          description: The home phone number of the customer. Must be in E.164 format
          nullable: true
          example: '+447900000000'
        mobilePhoneNumber:
          type: string
          description: The mobile phone number of the customer. Must be in E.164 format
          nullable: true
          example: '+447900000000'
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the customer. These
            will be sent with any associated customer events on your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            customerId: '1'
            registeredTimestamp: '123'
    UpdateCustomerRequestBody:
      type: object
      properties:
        firstName:
          type: string
          description: The first name of the customer
          example: Jeff
          nullable: true
          minLength: 1
          maxLength: 80
        lastName:
          type: string
          description: The last name of the customer
          example: Bridges
          nullable: true
          minLength: 1
          maxLength: 80
        homePhoneNumber:
          type: string
          description: The home phone number of the customer. Must be in E.164 format
          nullable: true
          example: '+447900000000'
        mobilePhoneNumber:
          type: string
          description: The mobile phone number of the customer. Must be in E.164 format
          nullable: true
          example: '+447900000000'
        metadata:
          type: object
          nullable: true
          description: >-
            use this parameter to attach key-value data to the customer. These
            will be sent with any associated customer events on your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            customerId: '1'
            registered: '123'
        defaultPaymentMethod:
          type: string
          description: The Id of the customer's preferred/default payment method
          nullable: true
          example: pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ
    CreateSubscriptionRequestBody:
      type: object
      required:
        - customer
        - price
      properties:
        customer:
          type: object
          description: The customer the subscription is for
          properties:
            id:
              type: string
              description: The id of the customer
              example: cus_01G0EYVFR02KBBVE2YWQ8AKMGJ
        price:
          type: object
          description: >-
            Defines how much and how often to charge the customer for the
            subscription
          properties:
            amount:
              type: integer
              format: int32
              example: 5000
              minimum: 30
              maximum: 1000000000
              description: >-
                The amount (in minor units) that is charged on each recurring
                payment throughout the subscription. Minimum and maximum amounts
                [vary by
                currency](https://developer.ryftpay.com/documentation/overview/core_concepts/currencies).
            currency:
              type: string
              maxLength: 3
              example: GBP
              description: The ISO currency code
            interval:
              $ref: '#/components/schemas/RecurringIntervalRequest'
        paymentMethod:
          type: object
          description: >-
            Use if you want to select an already stored card on file for the
            subscription and skip collecting new payment details from your
            customer. Must belong to the `customerId` provided in this request.
            Note that 3DS will be required on the initial payment.
          properties:
            id:
              type: string
              description: >-
                The Id of an already stored PaymentMethod belonging to the
                customer that you want to use to pay for the subscription. Note
                that this is optional. If not supplied the subscription will
                require you to collect card details from your customer.
              example: pmt_01FCTS1XMKH9FF43CAFA4CXT3P
        description:
          type: string
          nullable: true
          example: Bob's monthly gym membership
          description: >-
            (optional) description that helps you personalise/identify the
            specific subscription
        billingCycleTimestamp:
          type: number
          nullable: true
          description: >-
            The (epoch) timestamp representing the date on which the customer
            will regularly be billed. e.g. 15th of each month. Defaults to today
            if not provided.
          example: 1631703901
        metadata:
          type: object
          description: >-
            use this parameter to attach key-value data to the subscription.
            These will be sent with any subscription events to your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            orderId: '1'
            customerId: '123'
        shippingDetails:
          $ref: '#/components/schemas/ShippingDetails'
        paymentSettings:
          type: object
          nullable: true
          description: >-
            Settings for controlling fields/options on the underlying Payment
            Session's created by this subscription.
          properties:
            statementDescriptor:
              description: >-
                Used to supply a dynamic statement descriptor for the payments
                created throughout the lifecycle of this subscription. **Note**
                that dynamic statement descriptors are not enabled by default
                and will be ignored if passed.
              allOf:
                - $ref: '#/components/schemas/StatementDescriptor'
              example:
                descriptor: Ryft Ltd
                city: London
    UpdateSubscriptionRequestBody:
      type: object
      description: >-
        **You cannot** update subscriptions that are `Paused`, `Cancelled` or
        `Ended`.
      properties:
        price:
          type: object
          nullable: true
          description: >-
            Defines how much and how often to charge the customer for the
            Subscription. At least one field should be specified. You can change
            just the amount OR the interval OR both. Note that merchants
            operating in the European Union must notify the customer 4 weeks in
            advance of any changes in pricing. **You cannot** update this field
            if the Subscription is `Paused`, `PastDue`, `Cancelled` or `Ended`.
            Any updates to the price will be reflected instantly but will only
            take effect in the next billing cycle
          properties:
            amount:
              type: integer
              nullable: true
              format: int32
              example: 5000
              description: >-
                The amount (in minor units) that is charged on each recurring
                payment throughout the subscription. Omit this from the request
                if you are only changing the `interval` and want to keep
                charging the customer the same amount.
            interval:
              $ref: '#/components/schemas/NullableRecurringIntervalRequest'
        paymentMethod:
          type: object
          nullable: true
          description: >-
            Update the payment method that will be charged throughout the
            subscription. This is useful if your customer wishes to change their
            card or if a previous card has expired. Note that changing this
            field will trigger the next payment to apply 3DS - check the
            requiredAction on the latest payment session. Changing this field
            whilst in PastDue will trigger a automatic retry at the next
            available opportunity - check the NextBillingTimestamp
          properties:
            id:
              type: string
              description: >-
                The Id of an already stored PaymentMethod belonging to the
                customer that you want to use to pay for the subscription
                instead.
              example: pmt_01FCTS1XMKH9FF43CAFA4CXT3P
        description:
          type: string
          nullable: true
          example: Bob's monthly gym membership
          description: >-
            (optional) description that helps you personalise/identify the
            specific subscription
        billingCycleTimestamp:
          type: number
          nullable: true
          description: >-
            The (epoch) timestamp representing the date on which the customer
            will regularly be billed. e.g. 15th of each month. **You can only**
            update this field if the Subscription is `Pending`. If you update
            this field to today then a payment will be triggered immediately.
            Note: If you want to update this for an Active subscription then we
            recommend cancelling and re-creating the subscription.
          example: 1631703901
        metadata:
          type: object
          description: >-
            use this parameter to attach key-value data to the subscription.
            These will be sent with any subscription events to your webhooks.
            You can have a maximum of 5 pieces of metadata.
          example:
            orderId: '1'
            customerId: '123'
        shippingDetails:
          $ref: '#/components/schemas/ShippingDetails'
        paymentSettings:
          type: object
          description: >-
            Settings for controlling fields/options on the underlying Payment
            Session's created by this subscription.
          properties:
            statementDescriptor:
              $ref: '#/components/schemas/SubscriptionStatementDescriptorRequest'
    PauseSubscriptionRequestBody:
      type: object
      properties:
        reason:
          type: string
          nullable: true
          description: Optional field describing why the subscription is being paused.
          example: Offering service for free to customer
        resumeAtTimestamp:
          type: number
          nullable: true
          format: int64
          description: >-
            The epoch timestamp (seconds) when the subscription should resume
            collecting payments. If not specified, the subscription will remain
            paused indefinitely until a /resume API call is made.
          example: 1470989538
        unschedule:
          type: boolean
          nullable: true
          description: >-
            A flag used to unschedule an already scheduled pause, resulting in
            the customer being billed as normal (as they were before). This can
            only be 'true' if the subscription is still 'Active', a pause has
            been scheduled and no other fields are provided. To resume an
            already 'Paused' subscription then either update the
            'resumeAtTimestamp' or call /resume.
          example: false
    CancelSubscriptionRequestBody:
      type: object
      properties:
        reason:
          type: string
          nullable: true
          description: Optional field describing why the subscription is being cancelled.
          example: Customer no longer wants service
    UpdatePaymentMethodRequestBody:
      type: object
      properties:
        billingAddress:
          $ref: '#/components/schemas/CustomerAddress'
    ApplePayWebSessionRequestBody:
      type: object
      required:
        - displayName
        - domainName
      properties:
        displayName:
          type: string
          description: >-
            This is the name displayed within the Apple Pay payment sheet. Must
            contain UTF-8 characters.
          minLength: 3
          maxLength: 64
          example: Ryft Merchandise
        domainName:
          type: string
          description: >-
            The domain name you have verified for Apple Pay (omit the protocol).
            This should match `window.location.hostname`.
          example: ryftpay.com
    ApplePayRegisterWebDomainRequestBody:
      type: object
      required:
        - domainName
      properties:
        domainName:
          type: string
          description: The domain name you want to register for Apple Pay.
          example: ryftpay.com
    AddEvidenceToDisputeRequestBody:
      type: object
      properties:
        text:
          $ref: '#/components/schemas/DisputeEvidenceTextEntries'
        files:
          $ref: '#/components/schemas/DisputeEvidenceFiles'
    RemoveEvidenceFromDisputeRequestBody:
      type: object
      properties:
        text:
          type: array
          items:
            type: string
            enum:
              - billingAddress
              - shippingAddress
              - duplicateTransaction
              - uncategorised
        files:
          type: array
          items:
            type: string
            enum:
              - proofOfDelivery
              - customerSignature
              - receipt
              - shippingConfirmation
              - customerCommunication
              - refundPolicy
              - recurringPaymentAgreement
              - uncategorised
    GeoCoordinatesRequest:
      type: object
      nullable: true
      description: The geographic coordinates of the location.
      required:
        - latitude
        - longitude
      properties:
        latitude:
          type: number
          format: double
          example: 51.1789
          description: The latitude of the location (-90 to 90)
          minimum: -90
          maximum: 90
        longitude:
          type: number
          format: double
          example: 1.8262
          description: The longitude of the location (-180 to 180)
          minimum: -180
          maximum: 180
    InPersonLocationAddressRequest:
      type: object
      required:
        - lineOne
        - city
        - country
        - postalCode
      properties:
        lineOne:
          type: string
          description: First line of the address
          minLength: 1
          maxLength: 80
          nullable: false
          example: 123 Test Street
        lineTwo:
          type: string
          description: Second line of the address
          minLength: 1
          maxLength: 80
          nullable: true
          example: 456 Test Lane
        city:
          type: string
          description: The address city/town
          minLength: 2
          maxLength: 50
          nullable: false
          example: Manchester
        country:
          type: string
          description: The two-character ISO country code
          example: GB
          minLength: 2
          maxLength: 2
          nullable: false
        postalCode:
          type: string
          description: The postal code/zip of the address
          minLength: 2
          maxLength: 16
          nullable: false
          example: M3 3AG
        region:
          type: string
          description: >-
            The state/county/province/region Required if the address is in the
            US/Canada and must be a 2-character ISO state/province code
          minLength: 1
          maxLength: 80
          example: Greater Manchester
    InPersonLocationRequestBody:
      type: object
      required:
        - name
        - address
      properties:
        name:
          type: string
          description: Your name for the location. This can be used for display purposes.
          minLength: 5
          maxLength: 50
          example: Main Office Front Desk
        address:
          $ref: '#/components/schemas/InPersonLocationAddressRequest'
        geoCoordinates:
          $ref: '#/components/schemas/GeoCoordinatesRequest'
        metadata:
          type: object
          nullable: true
          description: >-
            Your own custom key-value data for this object. These will be sent
            with any associated events on your webhooks. You can have a maximum
            of 10 pieces of metadata.


            Keys must be between 1 and 30 characters in length.


            Values must be between 1 and 250 characters in length.
          example:
            internalID: '1'
    UpdateInPersonLocationRequestBody:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: Your name for the location. This can be used for display purposes.
          example: Front of main office
        metadata:
          type: object
          nullable: true
          description: >-
            Your own custom key-value data for this object. These will be sent
            with any associated events on your webhooks. You can have a maximum
            of 10 pieces of metadata.


            Keys must be between 1 and 30 characters in length.


            Values must be between 1 and 250 characters in length.
          example:
            internalID: '1'
    CreateTerminalRequestBody:
      type: object
      required:
        - serialNumber
        - locationId
      properties:
        serialNumber:
          type: string
          description: >-
            The serial number of the device. This will be sent out to you once
            the InPersonOrder has been shipped. Required to register the device.
          example: '25050808291100'
        locationId:
          type: string
          description: The unique Id of the location in which the terminal will reside
          example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
        name:
          type: string
          nullable: true
          description: Your name for the terminal. This can be used for display purposes.
          minLength: 5
          maxLength: 40
          example: Front Desk
        metadata:
          type: object
          nullable: true
          description: >-
            Your own custom key-value data for this object. These will be sent
            with any associated events on your webhooks. You can have a maximum
            of 10 pieces of metadata.


            Keys must be between 1 and 30 characters in length.


            Values must be between 1 and 250 characters in length.
          example:
            internalID: '1'
    UpdateTerminalRequestBody:
      type: object
      properties:
        locationId:
          type: string
          description: The unique Id of the location in which the terminal will reside
          example: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
        name:
          type: string
          nullable: true
          description: Your name for the terminal. This can be used for display purposes.
          example: Front Desk
        metadata:
          type: object
          nullable: true
          description: >-
            Your own custom key-value data for this object. These will be sent
            with any associated events on your webhooks. You can have a maximum
            of 10 pieces of metadata.


            Keys must be between 1 and 30 characters in length.


            Values must be between 1 and 250 characters in length.
          example:
            internalID: '1'
    TerminalPaymentSessionRequest:
      type: object
      description: >-
        Use this field to set any relevant properties on the underlying
        PaymentSession that will be created as part of this request.
      properties:
        platformFee:
          type: integer
          nullable: true
          format: int32
          example: 50
          minimum: 0
          maximum: 1000000000
          description: >-
            The amount (if any) that will be taken and applied to the platform
            account. This cannot be greater than the "amount" property
        metadata:
          type: object
          nullable: true
        paymentSettings:
          $ref: '#/components/schemas/PaymentSettingsRequest'
    TerminalTransactionSettingsRequest:
      type: object
      description: >-
        Allows for various customisation of terminal transactions. If not
        provided, 'receiptPrintingSource' will default to 'Terminal'
      nullable: true
      properties:
        receiptPrintingSource:
          $ref: '#/components/schemas/TerminalReceiptPrintingSource'
    TerminalPaymentRequestBody:
      type: object
      required:
        - amounts
        - currency
      properties:
        amounts:
          type: object
          properties:
            requested:
              type: integer
              format: int32
              example: 500
              nullable: false
              minimum: 30
              maximum: 1000000000
              description: >-
                The total amount requested for the purchase. Minimum and maximum
                amounts [vary by
                currency](https://developer.ryftpay.com/documentation/overview/core_concepts/currencies).
        currency:
          type: string
          example: GBP
          description: The ISO currency code
        paymentSession:
          $ref: '#/components/schemas/TerminalPaymentSessionRequest'
        settings:
          $ref: '#/components/schemas/TerminalTransactionSettingsRequest'
    TerminalRefundRequestBody:
      type: object
      required:
        - paymentSession
      properties:
        paymentSession:
          type: object
          properties:
            id:
              type: string
              description: The ID of the corresponding payment session to be refunded
              example: ps_01FCTS1XMKH9FF43CAFA4CXT3P
        amount:
          type: integer
          format: int32
          example: 500
          nullable: true
          description: >-
            The amount to refund in minor digits. Can be omitted, in which case
            a full refund will be issued.
        refundPlatformFee:
          type: boolean
          nullable: true
          description: >-
            A flag to indicate whether the platform fee should be refunded. If
            the payment amount is fully refunded, the platform fee will be too.
            If this is a partial refund then the platform fee will be refunded
            proportionally to the amount being refunded. By default this flag is
            false.
          example: false
        settings:
          $ref: '#/components/schemas/TerminalTransactionSettingsRequest'
    TerminalConfirmReceiptRequestBody:
      type: object
      description: >-
        Confirm the results of printing the customer or merchant receipts. Note
        that only one of 'customerCopy' or 'merchantCopy' can be provided per
        request
      properties:
        customerCopy:
          $ref: '#/components/schemas/TerminalConfirmReceiptResultRequest'
        merchantCopy:
          $ref: '#/components/schemas/TerminalConfirmReceiptResultRequest'
    TerminalConfirmReceiptResultRequest:
      type: object
      nullable: true
      required:
        - status
      properties:
        status:
          type: string
          description: Whether the printing of the receipt succeeded or failed
          enum:
            - Succeeded
            - Failed
          example: Succeeded
  examples:
    CreatePaymentSessionMinimalRequest:
      value:
        amount: 150
        currency: GBP
        customerEmail: test@ryftpay.com
    CreatePaymentSessionPlatformFeeRequest:
      value:
        amount: 150
        currency: GBP
        customerEmail: test@ryftpay.com
        platformFee: 25
    CreatePaymentSessionSplitPaymentRequest:
      value:
        amount: 500
        currency: GBP
        customerEmail: test@ryftpay.com
        splits:
          items:
            - accountId: ac_fcbf9321-0c28-467e-842d-0d9f6de441d1
              amount: 200
              fee:
                amount: 50
            - accountId: ac_488b6277-6f3c-4a47-8aad-fd2b2679c035
              amount: 300
              fee:
                amount: 60
    CreatePaymentSessionSplitPaymentBookAllFeesRequest:
      value:
        amount: 500
        currency: GBP
        customerEmail: test@ryftpay.com
        splits:
          items:
            - accountId: ac_fcbf9321-0c28-467e-842d-0d9f6de441d1
              amount: 200
              fee:
                amount: 50
            - accountId: ac_488b6277-6f3c-4a47-8aad-fd2b2679c035
              amount: 300
              fee:
                amount: 60
        paymentSettings:
          platform:
            paymentFees:
              combined:
                bookTo: ac_488b6277-6f3c-4a47-8aad-fd2b2679c035
    CreatePaymentSessionSplitPaymentBookPartialFeesRequest:
      value:
        amount: 500
        currency: GBP
        customerEmail: test@ryftpay.com
        splits:
          items:
            - accountId: ac_fcbf9321-0c28-467e-842d-0d9f6de441d1
              amount: 200
              fee:
                amount: 50
            - accountId: ac_488b6277-6f3c-4a47-8aad-fd2b2679c035
              amount: 300
              fee:
                amount: 60
        paymentSettings:
          platform:
            paymentFees:
              processor:
                bookTo: ac_488b6277-6f3c-4a47-8aad-fd2b2679c035
              interchange:
                bookTo: ac_488b6277-6f3c-4a47-8aad-fd2b2679c035
    CreatePaymentSessionSplitPaymentMixedBookingFeesRequest:
      value:
        amount: 500
        currency: GBP
        customerEmail: test@ryftpay.com
        splits:
          items:
            - accountId: ac_fcbf9321-0c28-467e-842d-0d9f6de441d1
              amount: 200
              fee:
                amount: 50
            - accountId: ac_488b6277-6f3c-4a47-8aad-fd2b2679c035
              amount: 300
              fee:
                amount: 60
        paymentSettings:
          platform:
            paymentFees:
              processor:
                bookTo: ac_488b6277-6f3c-4a47-8aad-fd2b2679c035
              interchange:
                bookTo: ac_fcbf9321-0c28-467e-842d-0d9f6de441d1
              network:
                bookTo: ac_fcbf9321-0c28-467e-842d-0d9f6de441d1
              miscPassThrough:
                bookTo: ac_fcbf9321-0c28-467e-842d-0d9f6de441d1
    BadRequestErrorResponse:
      value:
        requestId: b83f2653-06d7-44a9-a548-5825e8186004
        code: '400'
        errors:
          - code: invalid_field
            message: The supplied field did not have the expected structure
    ForbiddenErrorResponse:
      value:
        requestId: b83f2653-06d7-44a9-a548-5825e8186004
        code: '403'
        errors:
          - code: bad_request
            message: You do not have access to this resource
    NotFoundErrorResponse:
      value:
        requestId: b83f2653-06d7-44a9-a548-5825e8186004
        code: '404'
        errors:
          - code: not_found
            message: The given resource could not be found
    ConflictErrorResponse:
      value:
        requestId: b83f2653-06d7-44a9-a548-5825e8186004
        code: '409'
        errors:
          - code: bad_request
            message: A resource with the provided information already exists
    InternalErrorResponse:
      value:
        requestId: b83f2653-06d7-44a9-a548-5825e8186004
        code: '500'
        errors:
          - code: unexpected_error
            message: There was an unexpected error during the request
    BadGatewayErrorResponse:
      value:
        requestId: b83f2653-06d7-44a9-a548-5825e8186004
        code: '502'
        errors:
          - code: unexpected_error
            message: There was an unexpected error with a downstream service
    PaymentSessionCreatedMinResponse:
      value:
        id: ps_01JW95YEAEFGVVGHXT04D0C8B8
        amount: 150
        currency: GBP
        paymentType: Standard
        entryMode: Online
        customerEmail: test@ryftpay.com
        enabledPaymentMethods:
          - Card
        returnUrl: https://ryftpay.com
        status: PendingPayment
        refundedAmount: 0
        clientSecret: >-
          ps_01JW95YEAEFGVVGHXT04D0C8B8_secret_0e24c997-7076-4b01-bb22-729864329c2c
        statementDescriptor:
          descriptor: Ryft Ltd
          city: Manchester
        authorizationType: FinalAuth
        captureFlow: Automatic
        createdTimestamp: 1748359919
        lastUpdatedTimestamp: 1748359919
    PendingCaptureResponse:
      value:
        id: txn_01J8HRF1FBEGYFFXNJMRZ704R6_01J8HRF73YD8VTP247ZRMT6E0B
        paymentSessionId: ps_01J8HRF1FBEGYFFXNJMRZ704R6
        amount: 30
        currency: GBP
        type: Capture
        status: Pending
        refundedAmount: 0
        captureType: Final
        createdTimestamp: 1727172977
        lastUpdatedTimestamp: 1727172977
    SuccessCaptureResponse:
      value:
        id: txn_01J8HRF1FBEGYFFXNJMRZ704R6_01J8HRF73YD8VTP247ZRMT6E0B
        paymentSessionId: ps_01J8HRF1FBEGYFFXNJMRZ704R6
        amount: 30
        currency: GBP
        type: Capture
        status: Succeeded
        refundedAmount: 0
        captureType: Final
        createdTimestamp: 1727172977
        lastUpdatedTimestamp: 1727172977
    FailedCaptureResponse:
      value:
        id: txn_01J8HRF1FBEGYFFXNJMRZ704R6_01J8HRF73YD8VTP247ZRMT6E0B
        paymentSessionId: ps_01J8HRF1FBEGYFFXNJMRZ704R6
        amount: 30
        currency: GBP
        type: Capture
        status: Failed
        refundedAmount: 0
        captureType: Final
        createdTimestamp: 1727172977
        lastUpdatedTimestamp: 1727172977
    PendingVoidResponse:
      value:
        id: txn_01J8HRF1FBEGYFFXNJMRZ704R6_01J8HRF73YD8VTP247ZRMT6E0B
        paymentSessionId: ps_01J8HRF1FBEGYFFXNJMRZ704R6
        amount: 30
        currency: GBP
        type: Void
        status: Pending
        refundedAmount: 0
        createdTimestamp: 1727172977
        lastUpdatedTimestamp: 1727172977
    SuccessVoidResponse:
      value:
        id: txn_01J8HRF1FBEGYFFXNJMRZ704R6_01J8HRF73YD8VTP247ZRMT6E0B
        paymentSessionId: ps_01J8HRF1FBEGYFFXNJMRZ704R6
        amount: 30
        currency: GBP
        type: Void
        status: Succeeded
        refundedAmount: 0
        captureType: Final
        createdTimestamp: 1727172977
        lastUpdatedTimestamp: 1727172977
    FailedVoidResponse:
      value:
        id: txn_01J8HRF1FBEGYFFXNJMRZ704R6_01J8HRF73YD8VTP247ZRMT6E0B
        paymentSessionId: ps_01J8HRF1FBEGYFFXNJMRZ704R6
        amount: 30
        currency: GBP
        type: Void
        status: Failed
        refundedAmount: 0
        createdTimestamp: 1727172977
        lastUpdatedTimestamp: 1727172977
    PendingRefundResponse:
      value:
        id: txn_01J8HRF1FBEGYFFXNJMRZ704R6_01J8HRF73YD8VTP247ZRMT6E0B
        paymentSessionId: ps_01J8HRF1FBEGYFFXNJMRZ704R6
        amount: 30
        currency: GBP
        type: Refund
        status: Pending
        reason: Reduction due to missing / damaged item in transit
        createdTimestamp: 1727172977
        lastUpdatedTimestamp: 1727172977
    SuccessRefundResponse:
      value:
        id: txn_01J8HRF1FBEGYFFXNJMRZ704R6_01J8HRF73YD8VTP247ZRMT6E0B
        paymentSessionId: ps_01J8HRF1FBEGYFFXNJMRZ704R6
        amount: 30
        currency: GBP
        type: Refund
        status: Succeeded
        reason: Reduction due to missing / damaged item in transit
        createdTimestamp: 1727172977
        lastUpdatedTimestamp: 1727172977
    FailedRefundResponse:
      value:
        id: txn_01J8HRF1FBEGYFFXNJMRZ704R6_01J8HRF73YD8VTP247ZRMT6E0B
        paymentSessionId: ps_01J8HRF1FBEGYFFXNJMRZ704R6
        amount: 30
        currency: GBP
        type: Refund
        status: Failed
        reason: Reduction due to missing / damaged item in transit
        createdTimestamp: 1727172977
        lastUpdatedTimestamp: 1727172977
  responses:
    BadRequestResponse:
      description: One or more inputs are invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            default:
              $ref: '#/components/examples/BadRequestErrorResponse'
    ForbiddenResponse:
      description: You do not have access to this resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            default:
              $ref: '#/components/examples/ForbiddenErrorResponse'
    NotFoundResponse:
      description: The given resource could not be found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            default:
              $ref: '#/components/examples/NotFoundErrorResponse'
    ConflictResponse:
      description: This operation has already been performed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            default:
              $ref: '#/components/examples/ConflictErrorResponse'
    InternalErrorResponse:
      description: An unexpected error occurred when executing this request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            default:
              $ref: '#/components/examples/InternalErrorResponse'
    BadGatewayErrorResponse:
      description: >-
        An unexpected error occurred when communicating with a downstream
        service external to Ryft
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            default:
              $ref: '#/components/examples/BadGatewayErrorResponse'
    CreatePaymentSessionResponse:
      description: payment session successfully created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentSession'
          examples:
            minimum:
              $ref: '#/components/examples/PaymentSessionCreatedMinResponse'
    VoidResponse:
      description: >-
        Void request successfully accepted (Pending / Succeeded / Failed). If
        the status is `Pending` then the transaction will be completed
        asynchronously. Listen to the `PaymentSession.voided` event on your
        webhook to be notified of the outcome.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentTransaction'
          examples:
            pending:
              $ref: '#/components/examples/PendingVoidResponse'
            success:
              $ref: '#/components/examples/SuccessVoidResponse'
            failed:
              $ref: '#/components/examples/FailedVoidResponse'
    CaptureResponse:
      description: >-
        Capture request successfully accepted (Pending / Succeeded / Failed). If
        the status is `Pending` then the transaction will be completed
        asynchronously. Listen to the `PaymentSession.captured` event on your
        webhook to be notified of the outcome.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentTransaction'
          examples:
            pending:
              $ref: '#/components/examples/PendingCaptureResponse'
            success:
              $ref: '#/components/examples/SuccessCaptureResponse'
            failed:
              $ref: '#/components/examples/FailedCaptureResponse'
    RefundResponse:
      description: >-
        Refund request successfully accepted (Pending / Succeeded / Failed). If
        the status is `Pending` then the transaction will be completed
        asynchronously. Listen to the `PaymentSession.refunded` event on your
        webhook to be notified of the outcome.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentTransaction'
          examples:
            pending:
              $ref: '#/components/examples/PendingRefundResponse'
            success:
              $ref: '#/components/examples/SuccessRefundResponse'
            failed:
              $ref: '#/components/examples/FailedRefundResponse'
  requestBodies:
    CreateConversionRequest:
      required: true
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for creating an FX conversion
              - $ref: '#/components/schemas/CreateConversionRequestBody'
    PaymentSessionRequest:
      required: true
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for creating a payment session
              - $ref: '#/components/schemas/CreatePaymentSessionRequestBody'
          examples:
            minimal:
              $ref: '#/components/examples/CreatePaymentSessionMinimalRequest'
            with-platform-fee:
              $ref: '#/components/examples/CreatePaymentSessionPlatformFeeRequest'
            with-split-payments:
              $ref: '#/components/examples/CreatePaymentSessionSplitPaymentRequest'
            with-split-payments-book-all-fees-to-sub-account:
              $ref: >-
                #/components/examples/CreatePaymentSessionSplitPaymentBookAllFeesRequest
            with-split-payments-book-partial-fees-to-sub-account:
              $ref: >-
                #/components/examples/CreatePaymentSessionSplitPaymentBookPartialFeesRequest
            with-split-payments-book-mixed-fees-to-sub-accounts:
              $ref: >-
                #/components/examples/CreatePaymentSessionSplitPaymentMixedBookingFeesRequest
    UpdatePaymentSessionRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for updating a payment session
              - $ref: '#/components/schemas/UpdatePaymentSessionRequestBody'
      description: A request to update a payment session
      required: true
    CreateWebhookEndpointRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for registering a webhook endpoint
              - $ref: '#/components/schemas/CreateWebhookEndpointRequestBody'
      required: true
    UpdateWebhookEndpointRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for updating a webhook endpoint
              - $ref: '#/components/schemas/UpdateWebhookEndpointRequestBody'
      required: true
    CreateCustomerRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for creating a customer
              - $ref: '#/components/schemas/CreateCustomerRequestBody'
    UpdateCustomerRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for updating a customer
              - $ref: '#/components/schemas/UpdateCustomerRequestBody'
    CreateSubscriptionRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for creating a subscription
              - $ref: '#/components/schemas/CreateSubscriptionRequestBody'
    UpdateSubscriptionRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for updating a subscription
              - $ref: '#/components/schemas/UpdateSubscriptionRequestBody'
    PauseSubscriptionRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for pausing a subscription
              - $ref: '#/components/schemas/PauseSubscriptionRequestBody'
    CancelSubscriptionRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for cancelling a subscription
              - $ref: '#/components/schemas/CancelSubscriptionRequestBody'
    UpdatePaymentMethodRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for updating a payment method
              - $ref: '#/components/schemas/UpdatePaymentMethodRequestBody'
    UpdateSubAccountRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for updating a sub account
              - $ref: '#/components/schemas/UpdateSubAccountRequestBody'
      description: The request for updating an account
      required: true
    CreateAuthLinkRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for creating an auth link
              - $ref: '#/components/schemas/CreateAuthLinkRequestBody'
    CreateAccountLinkRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for creating an account link
              - $ref: '#/components/schemas/CreateAccountLinkRequestBody'
    CreatePersonRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for creating a person
              - $ref: '#/components/schemas/CreatePersonRequestBody'
    UpdatePersonRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for updating a person
              - $ref: '#/components/schemas/UpdatePersonRequestBody'
    CreatePayoutMethodRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for creating a payout method
              - $ref: '#/components/schemas/CreatePayoutMethodRequestBody'
          examples:
            gbp-payouts-bank-account:
              value:
                type: BankAccount
                currency: GBP
                country: GB
                bankAccount:
                  bankIdType: SortCode
                  bankId: '123456'
                  accountNumberType: Domestic
                  accountNumber: '12345678'
                  address:
                    lineOne: 123 Street
                    city: Manchester
                    country: GB
                    postalCode: M1 1AA
            eur-payouts-bank-account:
              value:
                type: BankAccount
                currency: EUR
                country: IE
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: IE64IRCE92050112345678
                  address:
                    lineOne: 123 Street
                    city: Dublin
                    country: IE
                    postalCode: DO1 1AA
            usd-payouts-bank-account:
              value:
                type: BankAccount
                currency: USD
                country: US
                bankAccount:
                  bankIdType: RoutingNumber
                  bankId: '026014928'
                  accountNumberType: Domestic
                  accountNumber: '253368194864'
                  address:
                    lineOne: 123 Street
                    city: Beverly Hills
                    country: US
                    postalCode: '90210'
                    region: CA
            chf-payouts-bank-account:
              value:
                type: BankAccount
                currency: CHF
                country: CH
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: CH9300762011623852957
            zar-payouts-za-bank-account:
              value:
                type: BankAccount
                currency: ZAR
                country: ZA
                bankAccount:
                  swiftCode: SARBZAJH
                  accountNumberType: Domestic
                  accountNumber: '012345678'
            zar-payouts-gb-bank-account:
              value:
                type: BankAccount
                currency: ZAR
                country: GB
                bankAccount:
                  bankIdType: SortCode
                  bankId: '123456'
                  accountNumberType: Domestic
                  accountNumber: '12345678'
            aud-payouts-bank-account:
              value:
                type: BankAccount
                currency: AUD
                country: AU
                bankAccount:
                  bankIdType: BSBCode
                  bankId: '123456'
                  accountNumberType: Domestic
                  accountNumber: '123456789'
            try-payouts-bank-account:
              value:
                type: BankAccount
                currency: TRY
                country: TR
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: TR700000000000000000000000
            huf-payouts-bank-account:
              value:
                type: BankAccount
                currency: HUF
                country: HU
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: HU42117730161111101800000000
            ron-payouts-bank-account:
              value:
                type: BankAccount
                currency: RON
                country: RO
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: RO49AAAA1B31007593840000
            nok-payouts-bank-account:
              value:
                type: BankAccount
                currency: NOK
                country: 'NO'
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: NO9386011117947
            czk-payouts-bank-account:
              value:
                type: BankAccount
                currency: CZK
                country: CZ
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: CZ6508000000192000145399
            pln-payouts-bank-account:
              value:
                type: BankAccount
                currency: PLN
                country: PL
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: PL61109010140000071219812874
            cad-payouts-bank-account:
              value:
                type: BankAccount
                currency: CAD
                country: CA
                bankAccount:
                  bankIdType: BankCode
                  bankId: '123'
                  branchIdType: TransitNumber
                  branchId: '12345'
                  accountNumberType: Domestic
                  accountNumber: '1234567890'
            dkk-payouts-domestic-bank-account:
              value:
                type: BankAccount
                currency: DKK
                country: DK
                bankAccount:
                  bankIdType: BankCode
                  bankId: '0040'
                  accountNumberType: Domestic
                  accountNumber: '0440116243'
            dkk-payouts-iban-bank-account:
              value:
                type: BankAccount
                currency: DKK
                country: DK
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: DK5000400440116243
            sek-payouts-domestic-bank-account:
              value:
                type: BankAccount
                currency: SEK
                country: SE
                bankAccount:
                  bankIdType: BankCode
                  bankId: '1234'
                  accountNumberType: Domestic
                  accountNumber: '1234567901'
            sek-payouts-iban-bank-account:
              value:
                type: BankAccount
                currency: SEK
                country: SE
                bankAccount:
                  accountNumberType: Iban
                  accountNumber: SE4550000000058398257466
    UpdatePayoutMethodRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for updating a payout method
              - $ref: '#/components/schemas/UpdatePayoutMethodRequestBody'
    CreateFileRequest:
      content:
        multipart/form-data:
          schema:
            type: object
            properties:
              file:
                type: string
                description: Local path to the file being uploaded
                example: ./local/files/evidence.pdg
              category:
                type: string
                enum:
                  - Evidence
                  - VerificationDocument
                description: The category for the file
                example: Evidence
              metadata:
                type: array
                nullable: true
                items:
                  type: string
                description: >-
                  Any supplementary/custom metadata you want to attach to the
                  file. You can have a maximum of 5 pieces of metadata.
    ApplePayWebSessionRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for creating an Apple Pay web session
              - $ref: '#/components/schemas/ApplePayWebSessionRequestBody'
    ApplePayRegisterWebDomainRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for registering a web domain for Apple Pay
              - $ref: '#/components/schemas/ApplePayRegisterWebDomainRequestBody'
    AddEvidenceToDisputeRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for adding evidence to a dispute
              - $ref: '#/components/schemas/AddEvidenceToDisputeRequestBody'
    RemoveEvidenceFromDisputeRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request body for removing evidence from a dispute
              - $ref: '#/components/schemas/RemoveEvidenceFromDisputeRequestBody'
    CreateInPersonLocationRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request for for creating an in-person location
              - $ref: '#/components/schemas/InPersonLocationRequestBody'
          examples:
            full-request:
              value:
                name: Ryft Computer Parts
                address:
                  lineOne: 123 Street
                  city: Manchester
                  country: GB
                  postalCode: M1 1AA
                geoCoordinates:
                  latitude: 51.1789
                  longitude: 1.8262
                metadata:
                  custom: '12345'
    UpdateInPersonLocationRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request for for updating an in-person location
              - $ref: '#/components/schemas/UpdateInPersonLocationRequestBody'
          examples:
            full-request:
              value:
                name: Ryft Computer Parts
                metadata:
                  custom: '12345'
            partial-request:
              value:
                name: Ryft Computer Parts
    CreateTerminalRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request for for creating (registering) a terminal
              - $ref: '#/components/schemas/CreateTerminalRequestBody'
          examples:
            full-request:
              value:
                serialNumber: '25050808291100'
                name: Front of house terminal
                locationId: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
                metadata:
                  custom: '12345'
    UpdateTerminalRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request for updating an existing terminal
              - $ref: '#/components/schemas/UpdateTerminalRequestBody'
          examples:
            full-request:
              value:
                name: Front of house terminal
                locationId: iploc_01FCTS1XMKH9FF43CAFA4CXT3P
                metadata:
                  custom: '12345'
    TerminalPaymentRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request for initiating a payment on a terminal
              - $ref: '#/components/schemas/TerminalPaymentRequestBody'
          examples:
            minimal-example:
              value:
                amounts:
                  requested: 1000
                currency: GBP
            full-example:
              value:
                amounts:
                  requested: 1000
                currency: GBP
                paymentSession:
                  platformFee: 10
                  metadata:
                    custom: '12345'
                  paymentSettings:
                    platform:
                      paymentFees:
                        combined:
                          bookTo: ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327
    TerminalRefundRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: The request for initiating a refund on a terminal
              - $ref: '#/components/schemas/TerminalRefundRequestBody'
          examples:
            full-refund:
              value:
                paymentSession:
                  id: ps_01J8HRF1FBEGYFFXNJMRZ704R6
            partial-refund:
              value:
                paymentSession:
                  id: ps_01J8HRF1FBEGYFFXNJMRZ704R6
                amount: 500
    TerminalConfirmReceiptRequest:
      content:
        application/json:
          schema:
            allOf:
              - description: >-
                  The request for confirming the result of receipt printing for
                  the current action on a terminal
              - $ref: '#/components/schemas/TerminalConfirmReceiptRequestBody'
          examples:
            customer-receipt-printing-succeeded:
              value:
                customerCopy:
                  status: Succeeded
            customer-receipt-printing-failed:
              value:
                customerCopy:
                  status: Failed
            merchant-receipt-printing-succeeded:
              value:
                merchantCopy:
                  status: Succeeded
            merchant-receipt-printing-failed:
              value:
                merchantCopy:
                  status: Failed
