openapi: 3.1.0
info:
  version: 1.0.0
  title: GetPaid API Reference
  termsOfService: https://getpaid.io/terms/
  contact:
    email: support@getpaid.io
    url: https://getpaid.io/contact
  description: |
    # Introduction

    Our APIs provide programmatic access to the GetPaid platform. This page contains
    a comprehensive reference for all of our public APIs. For walkthrough
    documentation please see our [main docs site](https://docs.getpaid.io).

    ## Getting Started

    To get started, sign up at <https://getpaid.io>. This will give you access to
    the [GetPaid Dashboard](https://dashboard.getpaid.io) where you can configure
    your account and retrieve your credentials needed to authenticate with our APIs.

    To streamline integration we provide [client libraries](https://docs.getpaid.io)
    for a number of languages, otherwise you can integrate directly with the API
    using the HTTP tooling built-in to most modern frameworks.
servers:
  - url: https://api.getpaid.io
    description: Live
  - url: https://api.sandbox.getpaid.io
    description: Sandbox
security: []
tags:
  - name: Authentication
    description: |
      In order to authenticate with GetPaid APIs you need to request an OAuth 2.0 Access Token using your Client ID and Secret
      available from the [GetPaid Dashboard](https://dashboard.getpaid.io):

      ```
      curl --location --request POST 'https://auth.getpaid.io/oauth/token' \
      --header 'Content-Type: application/json' \
      --data-raw '{
        "client_id": "{{client_id}}",
        "client_secret": "{{client_secret}}",
        "audience": "https://api.sandbox.getpaid.io",
        "grant_type": "client_credentials"
      }'
      ```

      Specify the appropriate `audience`, `client_id` and `client_secret` to switch between Sandbox and Live environments.
      Full details of the access token endpoint can be found [here](#tag/Authentication/operation/access_token).

      This will return a Bearer access token in the JSON Web Token (JWT) format which you should use in the `Authorization`
      header of any subsequent GetPaid API requests:

      ```json
      {
        "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
        "token_type": "bearer",
        "expires_in": 3600
      }
      ```

      The access token will be valid for the length of time in seconds indicated by the `expires_in` field. When it expires, you should request a new one.
      If using one of our client libraries, this will be handled automatically for you.


      <!-- ReDoc-Inject: <security-definitions> -->
  - name: Payments
    description: |
      The Payments API enables you to initiate and process payments for multiple payment methods.
  - name: Payment Webhooks
    description: |
      We send webhook notifications to inform you of payment events that occur so you can take action within your own systems, for example, updating the order's state, notifying your customers or integrating with third-parties.
  - name: Payout Webhooks
    description: |
      We send webhook notifications to inform you of payout events that occur so you can take action within your own systems, for example, updating the order's state, notifying your customers or integrating with third-parties.
  - name: Payouts
    description: |
      The Payouts API enables you to get details about the transfers grouped on a single bank statement.
  - name: Refunds
    description: |
      The Refunds API enables you to initiate and process refunds for the authorized payments.
  - name: Refund Webhooks
    description: |
      We send webhook notifications to inform you of refund events that occur so you can take action within your own systems, for example, updating the order's state, notifying your customers or integrating with third-parties.
  - name: Onboarding
    description: |
      The onboarding API enables a platform to initiate a merchant onboarding.
  - name: Application Webhooks
    description: |
      We send webhook notifications to inform you of onboarding events that occur so you can take action within your own systems, for example, updating the merchant's state, notifying your customers or integrating with third-parties.
  - name: Merchant onboarding
    description: |
      API endpoints used to perform the merchant onboarding from any client.
paths:
  /oauth/token:
    post:
      tags:
        - Authentication
      summary: Access Token
      description: Obtain an OAuth 2.0 Access token to authenticate API requests
      operationId: access_token
      servers:
        - url: https://auth.getpaid.io
          description: OAuth Server
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthTokenRequest'
            examples:
              Live Token Request:
                value:
                  client_id: g6gWu46zeP0HH4jkW3i22yJ2shDrNxJ8
                  client_secret: S6gozTXzrS42OZ0cmxVJG133mOfuHhSfkIJkcH7FBm-0HyGrVZMLGJtyruTA4CQv
                  audience: https://api.getpaid.io
                  grant_type: client_credentials
              Sandbox Token Request:
                value:
                  client_id: 0UvlOgIPIKqAzd0yi7Xnk8NroSsRLOaj
                  client_secret: S6gozTXzrS42OZ0cmxVJG133mOfuHhSfkIJkcH7FBm-0HyGrVZMLGJtyruTA4CQv
                  audience: https://api.sandbox.getpaid.io
                  grant_type: client_credentials
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthTokenResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
  /payments:
    post:
      tags:
        - Payments
      summary: Initiate Payment
      description: Initiates a new payment
      operationId: initiate_payment
      security:
        - OAuth:
            - payments:*
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiatePaymentRequest'
            examples:
              many_merchants:
                summary: Many merchants
                value:
                  amount_minor: 1000
                  currency: EUR
                  payment_method:
                    type: user_selected
                  reference: ORD-123456
                  description: Your Haircutz appointment at Emma Stone Hair Salon
                  integration:
                    type: hosted
                    generate_qr_code: true
                  routing:
                    platform:
                      amount_minor: 100
                      processing_fee_contribution: 50
                    merchants:
                      - type: seller
                        id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                        reference: ORD-123456
                        amount_minor: 850
                        processing_fee_contribution: 25
                      - type: merchant
                        id: acc_4djj3n0hm1tn2eqwetedkvnsc3
                        reference: ORD-123456
                        amount_minor: 50
                        processing_fee_contribution: 25
                  urls:
                    redirect: https://haircutz.co/checkout/complete?order_id=ORD-123456
                    webhook: https://webhooks.haircutz.co/getpaid
              single_merchant:
                summary: One merchant
                value:
                  amount_minor: 1000
                  currency: EUR
                  payment_method:
                    type: user_selected
                  reference: ORD-123456
                  description: Your Haircutz appointment at Emma Stone Hair Salon
                  integration:
                    type: hosted
                    generate_qr_code: true
                  routing:
                    platform:
                      amount_minor: 100
                      processing_fee_contribution: 50
                    merchants:
                      - type: seller
                        id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                        reference: ORD-123456
                        amount_minor: 900
                        processing_fee_contribution: 50
                  urls:
                    redirect: https://haircutz.co/checkout/complete?order_id=ORD-123456
                    webhook: https://webhooks.haircutz.co/getpaid
              no_platform_commission:
                summary: No platform commission
                value:
                  amount_minor: 1000
                  currency: EUR
                  payment_method:
                    type: user_selected
                  reference: ORD-123456
                  description: Your Haircutz appointment at Emma Stone Hair Salon
                  integration:
                    type: hosted
                    generate_qr_code: true
                  routing:
                    merchants:
                      - type: seller
                        id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                        reference: ORD-123456
                        amount_minor: 1000
                        processing_fee_contribution: 100
                  urls:
                    redirect: https://haircutz.co/checkout/complete?order_id=ORD-123456
                    webhook: https://webhooks.haircutz.co/getpaid
              cit_initial:
                summary: Customer initiated transaction for future payments
                value:
                  amount_minor: 1000
                  currency: EUR
                  payment_method:
                    type: user_selected
                  reference: ORD-123456
                  description: Your Haircutz appointment at Emma Stone Hair Salon
                  integration:
                    type: hosted
                    generate_qr_code: true
                  routing:
                    platform:
                      amount_minor: 100
                      processing_fee_contribution: 50
                    merchants:
                      - type: seller
                        id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                        reference: ORD-123456
                        amount_minor: 900
                        processing_fee_contribution: 50
                  urls:
                    redirect: https://haircutz.co/checkout/complete?order_id=ORD-123456
                    webhook: https://webhooks.haircutz.co/getpaid
                  cit_mode: initial
              only_platform:
                summary: Only platform
                value:
                  amount_minor: 1000
                  currency: EUR
                  payment_method:
                    type: user_selected
                  reference: ORD-123456
                  description: Your Haircutz appointment at Emma Stone Hair Salon
                  integration:
                    type: hosted
                    generate_qr_code: true
                  urls:
                    redirect: https://haircutz.co/checkout/complete?order_id=ORD-123456
                    webhook: https://webhooks.haircutz.co/getpaid
              with_customer_data:
                summary: Only platform with customer data
                value:
                  amount_minor: 1000
                  currency: EUR
                  payment_method:
                    type: user_selected
                  reference: ORD-123456
                  description: Your Haircutz appointment at Emma Stone Hair Salon
                  integration:
                    type: hosted
                    generate_qr_code: true
                  urls:
                    redirect: https://haircutz.co/checkout/complete?order_id=ORD-123456
                    webhook: https://webhooks.haircutz.co/getpaid
                  customer:
                    first_name: John
                    last_name: Doe
                    email: customer@email.com
        required: true
      responses:
        '201':
          description: Payment Initiated Successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiatePaymentResponse'
        '401':
          description: Unauthorized
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
      x-codeSamples:
        - lang: curl
          source: |
            curl -X POST \
              https://api.getpaid.io/payments \
              -H 'authorization: Bearer {{your_auth_token}}' \
              -H 'content-type: application/json' \
              -H 'idempotency-key: 083675c6-e25c-4c49-9d40-5f51aa061c12' \
              -d '{
              "amount_minor": 1000,
              "currency": "EUR",
              "payment_method": {
                "type": "user_selected"
              },
              "reference": "ORD-123456",
              "description": "Your Haircutz appointment at Emma Stone Hair Salon",
              "integration": {
                "type": "hosted",
                "generate_qr_code": true
              },
              "routing": {
                "platform": {
                  "amount_minor": 100,
                  "processing_fee_contribution": 50
                },
                "merchants": [
                  {
                    "type": "seller",
                    "id": "acc_4zjjxn0nm1tnweqbttedkvnsc8",
                    "reference": "ORD-123456",
                    "amount_minor": 900,
                    "processing_fee_contribution": 50
                  }
                ]
              },
              "urls": {
                "redirect": "https://haircutz.co/checkout/complete?order_id=ORD-123456",
                "webhook": "https://webhooks.haircutz.co/getpaid"
              }
            }'
  /payments/authorize:
    post:
      tags:
        - Payments
      summary: Authorize MIT Payment
      description: |
        Authorizes a MIT payment using a initial CIT payment.
      operationId: authorize_payments
      security:
        - OAuth:
            - payments:*
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizePaymentsRequest'
            examples:
              mit:
                summary: Merchant initiated transaction
                value:
                  initial_payment_id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                  amount_minor: 1000
                  currency: EUR
                  reference: ORD-123456
                  description: Your Haircutz appointment at Emma Stone Hair Salon
                  routing:
                    platform:
                      amount_minor: 100
                      processing_fee_contribution: 50
                    merchants:
                      - type: seller
                        id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                        reference: ORD-123456
                        amount_minor: 900
                        processing_fee_contribution: 50
                  urls:
                    webhook: https://webhooks.haircutz.co/getpaid
      responses:
        '201':
          description: Authorization completed
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizePaymentsResponse'
        '401':
          description: Unauthorized
        '404':
          description: Initial payment not found
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /applications:
    post:
      tags:
        - Onboarding
      summary: Initiate application
      description: Initiate an application for a merchant to start the onboarding process
      operationId: initiate_merchant_application
      security:
        - OAuth:
            - onboarding:initiate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiateMerchantApplicationRequest'
        required: true
      responses:
        '201':
          description: Created
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/InitiateMerchantApplicationHostedResponse'
                  - $ref: '#/components/schemas/InitiateMerchantApplicationSdkResponse'
        '401':
          description: Unauthorized
        '409':
          description: Conflict
          $ref: '#/components/responses/ProblemConflict'
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
      x-codeSamples:
        - lang: curl
          source: |
            curl -X POST \
              https://api.getpaid.io/applications \
              -H 'content-type: application/json' \
              -H 'authorization: Bearer {{your_auth_token}}' \
              -d '{
              "applicant": {
                "email": "jon.smith@acme.com",
                "first_name": "Jon",
                "last_name": "Smith"
              },
              "currencies": [
                "EUR"
              ],
              "integration": {
                "type": "hosted"
              },
              "language": "en",
              "reference": "merch-001",
              "urls": {
                "webhook": "http://example.com"
              }
            }'
  /applications/{application_id}/link:
    post:
      tags:
        - Onboarding
      summary: Refresh an existing application
      description: Gets a new link to allow the merchant to continue the onboarding process when an available link is expired.
      operationId: refresh_merchant_application_link
      security:
        - OAuth:
            - onboarding:initiate
      parameters:
        - name: application_id
          in: path
          description: The unique identifier of the application
          required: true
          schema:
            type: string
            example: app_44678r08jtm8zbt227tzhc4nw5
      responses:
        '200':
          description: Link created successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefreshLinkResponse'
        '401':
          description: Unauthorized
        '404':
          description: Application not found
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
      x-codeSamples:
        - lang: curl
          source: |
            curl -X POST \
              https://api.getpaid.io/applications/app_44678r08jtm8zbt227tzhc4nw5/link \
              -H 'content-type: application/json' \
              -H 'authorization: Bearer {{your_auth_token}}'
  /payments/{payment_id}:
    get:
      tags:
        - Payments
      summary: Get Payment
      description: Returns a payment's details.
      operationId: get_payment
      security:
        - OAuth:
            - payments:*
            - payments:read
      parameters:
        - name: payment_id
          in: path
          description: The unique identifier of the payment
          required: true
          schema:
            type: string
            example: pay_473cr1y0ghbyc3m1yfbwvn3nxx
      responses:
        '200':
          description: Payment retrieved successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPaymentResponse'
              examples:
                with_transfers:
                  summary: Platform and merchant with transfers
                  value:
                    id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 2000
                    currency: EUR
                    initiated_at: '2019-08-24T14:15:22Z'
                    status: completed
                    processing_fee:
                      amount_minor: 200
                      currency: EUR
                    routing:
                      platform:
                        amount_minor: 1500
                        processing_fee_contribution: 50
                        refundable_amount: 1500
                        transfer:
                          transfer_id: tra_2e7uy7q5zer3a4pokjgt4512a
                          amount_minor: 1400
                          processing_fee:
                            amount_minor: 100
                            currency: EUR
                      merchants:
                        - id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                          type: seller
                          amount_minor: 500
                          processing_fee_contribution: 50
                          reference: MER-123456
                          refundable_amount: 5500
                          transfer:
                            transfer_id: tra_1a6po0p7zqv1q2arfsyr9548q
                            amount_minor: 400
                            processing_fee:
                              amount_minor: 100
                              currency: EUR
                    succeeded: true
                    reference: ORD-123456
                    _links:
                      self:
                        href: https://api.getpaid.io/payments/pay_473cr1y0ghbyc3m1yfbwvn3nxx
                without_transfers:
                  summary: Platform and merchant without transfers
                  value:
                    id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 2000
                    currency: EUR
                    initiated_at: '2019-08-24T14:15:22Z'
                    status: captured
                    routing:
                      platform:
                        amount_minor: 1500
                        processing_fee_contribution: 50
                        refundable_amount: 1500
                      merchants:
                        - id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                          type: seller
                          amount_minor: 500
                          processing_fee_contribution: 50
                          reference: MER-123456
                          refundable_amount: 500
                    succeeded: true
                    reference: ORD-123456
                    _links:
                      self:
                        href: https://api.getpaid.io/payments/pay_473cr1y0ghbyc3m1yfbwvn3nxx
                only_platform:
                  summary: Platform with transfer
                  value:
                    id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 2000
                    currency: EUR
                    initiated_at: '2019-08-24T14:15:22Z'
                    status: completed
                    processing_fee:
                      amount_minor: 200
                      currency: EUR
                    routing:
                      platform:
                        amount_minor: 2000
                        processing_fee_contribution: 100
                        refundable_amount: 2000
                        transfer:
                          transfer_id: tra_2e7uy7q5zer3a4pokjgt4512a
                          amount_minor: 1400
                          processing_fee:
                            amount_minor: 100
                            currency: EUR
                    succeeded: true
                    reference: ORD-123456
                    _links:
                      self:
                        href: https://api.getpaid.io/payments/pay_473cr1y0ghbyc3m1yfbwvn3nxx
                refunds_associated:
                  summary: Platform and merchant with partial refunds associated
                  value:
                    id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 2000
                    currency: EUR
                    initiated_at: '2019-08-24T14:15:22Z'
                    status: completed
                    processing_fee:
                      amount_minor: 200
                      currency: EUR
                    routing:
                      platform:
                        amount_minor: 1500
                        processing_fee_contribution: 50
                        refundable_amount: 1500
                        transfer:
                          transfer_id: tra_2e7uy7q5zer3a4pokjgt4512a
                          amount_minor: 1400
                          processing_fee:
                            amount_minor: 100
                            currency: EUR
                      merchants:
                        - id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                          type: seller
                          amount_minor: 500
                          processing_fee_contribution: 50
                          reference: MER-123456
                          refundable_amount: 500
                          transfer:
                            transfer_id: tra_1a6po0p7zqv1q2arfsyr9548q
                            amount_minor: 400
                            processing_fee:
                              amount_minor: 100
                              currency: EUR
                    succeeded: true
                    reference: ORD-123456
                    _links:
                      self:
                        href: https://api.getpaid.io/payments/pay_473cr1y0ghbyc3m1yfbwvn3nxx
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
  /refunds:
    post:
      tags:
        - Refunds
      summary: Initiate Refund
      description: Initiates a full or partial refund over a specific payment.
      operationId: initiate_refund
      security:
        - OAuth:
            - refunds:initiate
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiateRefundRequest'
            examples:
              full_refund:
                summary: Full refund
                value:
                  payment_id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                  description: Full refund for ORD-123456
                  reference: FULL-REFUND-123456
                  urls:
                    webhook: https://webhooks.haircutz.co/getpaid
              partial_refund:
                summary: Partial refund
                value:
                  payment_id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                  description: Partial refund for ORD-123456
                  routing:
                    platform:
                      amount_minor: 300
                    merchants:
                      - id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                        amount_minor: 700
                  reference: PARTIAL-REFUND-123456
                  urls:
                    webhook: https://webhooks.haircutz.co/getpaid
        required: true
      responses:
        '201':
          description: Refund Initiated Successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiateRefundResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '409':
          $ref: '#/components/responses/ProblemConflict'
        '422':
          $ref: '#/components/responses/ProblemInvalidParametersRefunds'
      x-codeSamples:
        - lang: curl
          source: |
            curl -X POST \
              https://api.getpaid.io/refunds \
              -H 'authorization: Bearer {{your_auth_token}}' \
              -H 'content-type: application/json' \
              -H 'idempotency-key: 083675c6-e25c-4c49-9d40-5f51aa061c12' \
              -d '{
              "payment_id": "pay_473cr1y0ghbyc3m1yfbwvn3nxx",
              "description": "Refund for ORD-123456",
              "reference": "REFUND-123456"
            }'
  /refunds/{refund_id}:
    get:
      tags:
        - Refunds
      summary: Get Refund
      description: Returns a refund's details.
      operationId: get_refund
      security:
        - OAuth:
            - refunds:read
      parameters:
        - name: refund_id
          in: path
          description: The unique identifier of the refund.
          required: true
          schema:
            type: string
            example: rfd_473cr1y0ghbyc3m1yfbwvn3nxx
      responses:
        '200':
          description: Refund retrieved successfully.
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRefundResponse'
              examples:
                partial_refund:
                  summary: Full refund
                  value:
                    id: rfd_473cr1y0ghbyc3m1yfbwvn3nxx
                    initiated_at: '2019-08-24T14:15:22Z'
                    status: completed
                    payment_id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 1000
                    currency: EUR
                    description: Refund for ORD-123456
                    reference: REFUND-123456
                    _links:
                      self:
                        href: https://api.getpaid.io/refunds/rfd_473cr1y0ghbyc3m1yfbwvn3nxx
                full_refund:
                  summary: Partial refund
                  value:
                    id: rfd_473cr1y0ghbyc3m1yfbwvn3nxx
                    initiated_at: '2019-08-24T14:15:22Z'
                    status: completed
                    payment_id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 1000
                    currency: EUR
                    description: Refund for ORD-123456
                    routing:
                      platform:
                        amount_minor: 300
                      merchants:
                        - id: acc_4zjjxn0nm1tnweqbttedkvnsc8
                          amount_minor: 700
                    reference: REFUND-123456
                    _links:
                      self:
                        href: https://api.getpaid.io/refunds/rfd_473cr1y0ghbyc3m1yfbwvn3nxx
        '401':
          description: Unauthorized.
        '404':
          description: Refund not found.
  /payouts/{payout_id}:
    get:
      tags:
        - Payouts
      summary: Get Payout
      description: Returns a payout's details.
      operationId: get_payout
      security:
        - OAuth:
            - payouts:read
      parameters:
        - name: payout_id
          in: path
          description: The unique identifier of the payout.
          required: true
          schema:
            $ref: '#/components/schemas/PayoutId'
      responses:
        '200':
          description: Payout retrieved successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPayoutResponse'
        '401':
          description: Unauthorized
        '404':
          description: Payout not found
  /payouts:
    get:
      tags:
        - Payouts
      summary: Search Payouts
      description: Returns the unique identifier of the payouts associated to a specific payment.
      operationId: search_payouts
      security:
        - OAuth:
            - payouts:read
      parameters:
        - name: payment_id
          in: query
          description: The unique identifier of the payment.
          required: true
          schema:
            $ref: '#/components/schemas/PaymentId'
      responses:
        '200':
          description: Payouts retrieved successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                type: array
                description: The payout identifiers associated to the current payment.
                items:
                  $ref: '#/components/schemas/SearchPayoutItem'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
  /hpp/payment:
    get:
      tags:
        - Hosted Payment Page
      summary: Get Payment
      description: Returns a payment's details.
      operationId: bff_get_payment
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Payment retrieved successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPaymentResponseBff'
              examples:
                initiated:
                  summary: Initiated
                  value:
                    id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 1000
                    currency: EUR
                    status: initiated
                    expires_at: '2019-08-24T14:15:22Z'
                    description: Your Haircutz appointment at Emma Stone Hair Salon
                    branding:
                      format: merchant_primary
                      platform:
                        name: HairCutz
                        logo_url: https://cdn.getpaid.io/assets/4r8t310nhp2mferdc1waa07s5d.png
                        colors:
                          primary: '#000000'
                          secondary: '#FFFFFF'
                      merchant:
                        name: Emma Stone Hair Salon
                        logo_url: https://cdn.getpaid.io/assets/4y7rv0p7zqv0f9arfsyr50864t.png
                        colors:
                          primary: '#f39c12'
                          secondary: '#2c3e50'
                    payment_methods:
                      - type: card
                        name: Card
                        description: Pay with your credit or debit card.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/card.png
                      - type: sepa_direct_debit
                        name: Sepa Direct Debit
                        description: Pay with SEPA Direct debit.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/sdd.png
                    tokenization:
                      merchant_id: 1234567890
                    requires_store_credentials: false
                    workflow:
                      complete: false
                      next: hpp:start
                    _links:
                      self:
                        href: https://bff.getpaid.io/hpp/payment
                        methods:
                          - GET
                      hpp:start:
                        href: https://bff.getpaid.io/hpp/payment/start
                        methods:
                          - POST
                started:
                  summary: Started
                  value:
                    id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 1000
                    currency: EUR
                    status: started
                    expires_at: '2019-08-24T14:15:22Z'
                    description: Your Haircutz appointment at Emma Stone Hair Salon
                    branding:
                      format: merchant_primary
                      platform:
                        name: HairCutz
                        logo_url: https://cdn.getpaid.io/assets/4r8t310nhp2mferdc1waa07s5d.png
                        colors:
                          primary: '#000000'
                          secondary: '#FFFFFF'
                      merchant:
                        name: Emma Stone Hair Salon
                        logo_url: https://cdn.getpaid.io/assets/4y7rv0p7zqv0f9arfsyr50864t.png
                        colors:
                          primary: '#f39c12'
                          secondary: '#2c3e50'
                    payment_methods:
                      - type: card
                        name: Card
                        description: Pay with your credit or debit card.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/card.png
                      - type: sepa_direct_debit
                        name: Sepa Direct Debit
                        description: Pay with SEPA Direct debit.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/sdd.png
                    tokenization:
                      merchant_id: 1234567890
                    requires_store_credentials: false
                    workflow:
                      complete: false
                      next: hpp:authorize
                    _links:
                      self:
                        href: https://bff.getpaid.io/hpp/payment
                        methods:
                          - GET
                      hpp:authorize:
                        href: https://bff.getpaid.io/hpp/payment/authorize
                        methods:
                          - POST
                authentication_failed:
                  summary: Authentication Failed
                  value:
                    id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 1000
                    currency: EUR
                    status: authentication_failed
                    expires_at: '2019-08-24T14:15:22Z'
                    description: Your Haircutz appointment at Emma Stone Hair Salon
                    branding:
                      format: merchant_primary
                      platform:
                        name: HairCutz
                        logo_url: https://cdn.getpaid.io/assets/4r8t310nhp2mferdc1waa07s5d.png
                        colors:
                          primary: '#000000'
                          secondary: '#FFFFFF'
                      merchant:
                        name: Emma Stone Hair Salon
                        logo_url: https://cdn.getpaid.io/assets/4y7rv0p7zqv0f9arfsyr50864t.png
                        colors:
                          primary: '#f39c12'
                          secondary: '#2c3e50'
                    payment_methods:
                      - type: card
                        name: Card
                        description: Pay with your credit or debit card.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/card.png
                      - type: sepa_direct_debit
                        name: Sepa Direct Debit
                        description: Pay with SEPA Direct debit.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/sdd.png
                    payment_method_selected: card
                    tokenization:
                      merchant_id: 1234567890
                    requires_store_credentials: false
                    workflow:
                      complete: false
                      next: hpp:authorize
                    _links:
                      self:
                        href: https://bff.getpaid.io/hpp/payment
                        methods:
                          - GET
                      hpp:authorize:
                        href: https://bff.getpaid.io/hpp/payment/authorize
                        methods:
                          - POST
                authenticated_with_sdd:
                  summary: Authenticated with SDD
                  value:
                    id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 1000
                    currency: EUR
                    status: authenticated
                    expires_at: '2019-08-24T14:15:22Z'
                    description: Your Haircutz appointment at Emma Stone Hair Salon
                    branding:
                      format: merchant_primary
                      platform:
                        name: HairCutz
                        logo_url: https://cdn.getpaid.io/assets/4r8t310nhp2mferdc1waa07s5d.png
                        colors:
                          primary: '#000000'
                          secondary: '#FFFFFF'
                      merchant:
                        name: Emma Stone Hair Salon
                        logo_url: https://cdn.getpaid.io/assets/4y7rv0p7zqv0f9arfsyr50864t.png
                        colors:
                          primary: '#f39c12'
                          secondary: '#2c3e50'
                    payment_methods:
                      - type: card
                        name: Card
                        description: Pay with your credit or debit card.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/card.png
                      - type: sepa_direct_debit
                        name: Sepa Direct Debit
                        description: Pay with SEPA Direct debit.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/sdd.png
                    payment_method_selected: sepa_direct_debit
                    tokenization:
                      merchant_id: 1234567890
                    requires_store_credentials: false
                    workflow:
                      complete: false
                      next: hpp:mandate
                    _links:
                      self:
                        href: https://bff.getpaid.io/hpp/payment
                        methods:
                          - GET
                      hpp:mandate:
                        href: https://bff.getpaid.io/hpp/payment/sdd-mandate
                        methods:
                          - POST
                Declined:
                  summary: Declined
                  value:
                    id: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor: 1000
                    currency: EUR
                    status: declined
                    expires_at: '2019-08-24T14:15:22Z'
                    description: Your Haircutz appointment at Emma Stone Hair Salon
                    branding:
                      format: merchant_primary
                      platform:
                        name: HairCutz
                        logo_url: https://cdn.getpaid.io/assets/4r8t310nhp2mferdc1waa07s5d.png
                        colors:
                          primary: '#000000'
                          secondary: '#FFFFFF'
                      merchant:
                        name: Emma Stone Hair Salon
                        logo_url: https://cdn.getpaid.io/assets/4y7rv0p7zqv0f9arfsyr50864t.png
                        colors:
                          primary: '#f39c12'
                          secondary: '#2c3e50'
                    payment_methods:
                      - type: card
                        name: Card
                        description: Pay with your credit or debit card.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/card.png
                      - type: sepa_direct_debit
                        name: Sepa Direct Debit
                        description: Pay with SEPA Direct debit.
                        icon_url: https://cdn.getpaid.io/assets/payment-methods/sdd.png
                    payment_method_selected: card
                    tokenization:
                      merchant_id: 1234567890
                    requires_store_credentials: false
                    workflow:
                      complete: false
                      next: hpp:authorize
                    _links:
                      self:
                        href: https://bff.getpaid.io/hpp/payment
                        methods:
                          - GET
                      hpp:authorize:
                        href: https://bff.getpaid.io/hpp/payment/authorize
                        methods:
                          - POST
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
  /hpp/payment/start:
    post:
      tags:
        - Hosted Payment Page
      summary: Start Payment
      description: |
        Indicates the payment workflow is starting.
        Typically this corresponds with the end-user visiting the payment page (either hosted or embedded via SDK).
      operationId: start_payment
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Payment started successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartPaymentResponse'
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
  /hpp/tokens:
    post:
      tags:
        - Hosted Payment Page
      summary: Request Token
      description: |
        Exchange card details or third-party tokens for a GetPaid token that can later be used as a payment method on a payment.
        Tokens are single use and expire after 15 minutes.
      operationId: request_token
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
        required: true
      responses:
        '200':
          description: Token Created Successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /hpp/payment/authorize:
    post:
      tags:
        - Hosted Payment Page
      summary: Authorize Payment
      description: |
        Authorizes the payment using the previously selected payment method.

        In some cases, further action might be required in order to complete authorization, for example, 3D-Secure authentication.
        To handle the response, inspect the `workflow.complete` field. If `true`, the `workflow.next` link will be the final action to perform
        and you can use the `succeeded` field to indicate the success of the payment.
      operationId: authorize_payment
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizePaymentRequest'
      responses:
        '200':
          description: Authorization processed successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/AuthorizationActionRequired'
                  - $ref: '#/components/schemas/AuthorizationComplete'
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /hpp/payment/authorize/information/check:
    put:
      tags:
        - Hosted Payment Page
      summary: Check Payment Authorization Information
      description: |
        Checks payment authorization information used to simplify the checkout process from the payment method previously selected.
      operationId: get_payment_authorization_information
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizeInformationPaymentRequest'
      responses:
        '200':
          description: Payment authorization information retrieved successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizeInformationPaymentResponse'
        '401':
          description: Unauthorized
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /hpp/payment/cancel:
    post:
      tags:
        - Hosted Payment Page
      summary: Cancel Payment
      description: Indicates the end-user has cancelled the payment and will be returned to the platform's redirect URL.
      operationId: cancel_payment
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Payment cancelled successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelPaymentResponse'
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
  /hpp/payment/payment_method/reset:
    post:
      tags:
        - Hosted Payment Page
      summary: Reset Payment Method
      description: Resets the selected payment method for a payment. This will allow the end-user to select a different payment method.
      operationId: reset_payment_method
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '204':
          description: Payment method reset successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
  /hpp/3ds/complete/{payment_id}:
    get:
      tags:
        - Hosted Payment Page
      summary: Complete 3D Secure Payment
      description: |
        When executing a card payment authorization 3D security check might be requested.
        This endpoint is the callback endpoint exposed to be called by the 3D security provider
        with the result of the authentication process.
      operationId: complete_3ds
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      parameters:
        - name: payment_id
          in: path
          description: The unique identifier of the payment.
          required: true
          schema:
            type: string
            example: pay_473cr1y0ghbyc3m1yfbwvn3nxx
        - name: gp_token
          in: query
          required: true
          description: The authentication token.
          schema:
            type: string
        - name: 3ds_eci
          in: query
          description: The Electronic Commerce Indicator security level associated with the 3D Secure enrollment result.
          schema:
            type: string
        - name: 3ds_cavv
          in: query
          description: A Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the cardholder authentication result (3D Secure).
          schema:
            type: string
        - name: 3ds_trxid
          in: query
          description: The 3D Secure transaction id.
          schema:
            type: string
        - name: 3ds_version
          in: query
          required: true
          description: Indicates the version of 3D Secure that was used for authentication.
          schema:
            type: string
        - name: 3ds_status
          in: query
          description: The authentication result.
          schema:
            type: string
            enum:
              - 'Y'
              - A
              - 'N'
              - U
        - name: 3ds_valid_payment
          in: query
          required: true
          description: Value indicating if payment is valid.
          schema:
            type: string
            enum:
              - 'Y'
              - 'N'
      responses:
        '302':
          description: Redirects the end-user to on completion of the payment workflow.
        '401':
          description: Unauthorized.
        '404':
          description: Payment not found.
  /hpp/account_verification/complete:
    get:
      tags:
        - Hosted Payment Page
      summary: Completes Account Verification Payment
      description: |
        When executing Sepa direct debit payment authorization an account verification might be requested.
        This endpoint is the callback endpoint exposed to be called by the account verification provider
        with the result of the verification.
      operationId: complete_account_verification
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      parameters:
        - name: token
          in: query
          schema:
            type: string
            description: The payment resource token.
            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJwYXlfNDczY3IxeTBnaGJ5YzNtMXlmYnd2bjNueHgiLCJpYXQiOjE1MTYyMzkwMjJ9.zuk299M04Racuejn5RBybpBZFSIxBPuCYWQH_mbfQoUyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhcHBfNDkyNHNhNnliOGZ4a2VicjBkNDBrOHN4bWoiLCJzdWIiOiJhY2NfNHI4dDMxMG5ocDJtZmVyZGMxd2FhMDdzNTEiLCJuYmYiOjE2Njc5OTM2NDYsImV4cCI6MTY2ODU5ODQ0NiwiaWF0IjoxNjY3OTkzNjQ2LCJpc3MiOiJodHRwczovL2FwaS5kZXYuZ2V0cGFpZC5pbyIsImF1ZCI6Imh0dHBzOi8vYXBpLmRldi5nZXRwYWlkLmlvIn0.21jy-sm4LdfevUDUBRLOE-KKOXUrefrbovTuENlqPlA
        - name: report_id
          in: query
          description: The report identifier provided by the account verification provider.
          required: true
          schema:
            type: string
            example: 6e68cc6287704273984567b3300c5822
        - name: error
          in: query
          description: |
            The type of error that has ocurred.
            It's only present when the report_id is empty meaning that the account verification process fails.
          schema:
            type: string
            example: AUTHENTICATION_ERROR
        - name: error_reason
          in: query
          description: |
            The error reason that describes the cause of the error.
            It's only present when the report_id is empty meaning that the account verification process fails.
          schema:
            type: string
            example: INVALID_STATE_REDIRECT_URI
        - name: message
          in: query
          description: |
            A localized end-user facing error message provided by the third party.
            It's only present when the report_id is empty meaning that the account verification process fails.
          schema:
            type: string
            example: We are sorry, but an error has occurred
        - name: tracking_id
          in: query
          description: |
            Third party internal id indentifying the request on its system.
            It's only present when the report_id is empty meaning that the account verification process fails.
          schema:
            type: string
            example: 3526f84-226a-43cc-ae2d-2747f394d71b
      responses:
        '302':
          description: Redirects the end-user to on completion of the payment workflow.
        '401':
          description: Unauthorized.
        '404':
          description: Payment not found.
  /hpp/payment/sdd-mandate/form:
    get:
      tags:
        - Hosted Payment Page
      summary: Form details for a Sepa Direct Debit Mandate
      description: |
        Describes the dynamic fields of the mandate creation step.
        If the selected payment method is not SEPA Direct Debit the endpoint returns an empty object. If `type=consumer` then both
        `registration_number_types` and `district_courts` are not returned. If `type=business` then `registration_number_types` is always provided,
        but `district_courts` is only provided if any registration number requires it.
      operationId: sdd_mandate_form
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Form details
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SddMandateForm'
              examples:
                businessDE:
                  summary: German business
                  value:
                    type: business
                    registration_numbers:
                      - code: DeHrb
                        name: HRB
                        district_court_code:
                          required: true
                      - code: DeHra
                        name: HRA
                        district_court_code:
                          required: true
                      - code: DeVr
                        name: VR
                        district_court_code:
                          required: true
                      - code: vat
                        name: VAT
                    district_courts:
                      - code: Aachen
                        name: Aachen
                      - code: Altenburg
                        name: Altenburg
                      - code: Amberg
                        name: Amberg
                      - code: Ansbach
                        name: Ansbach
                      - code: Apolda
                        name: Apolda
                      - code: Arnsberg
                        name: Arnsberg
                      - code: Arnstadt
                        name: Arnstadt
                      - code: ArnstadtZweigstelleIlmenau
                        name: Arnstadt Zweigstelle Ilmenau
                    fields:
                      - company_name
                      - registration_number
                      - registration_number_code
                      - first_name
                      - last_name
                      - postal_address
                    mandate_legal_mention: By signing this mandate form, you authorise (A) {NAME OF THE COMPANY} to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from {NAME OF THE COMPANY}.
                businessEE:
                  summary: Estonian business
                  value:
                    type: business
                    registration_numbers:
                      - code: EeKmkr
                        name: Kmkr
                      - code: vat
                        name: VAT
                    fields:
                      - company_name
                      - registration_number
                      - registration_number_code
                      - first_name
                      - last_name
                      - postal_address
                    mandate_legal_mention: By signing this mandate form, you authorise (A) {NAME OF THE COMPANY} to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from {NAME OF THE COMPANY}.
                consumer:
                  summary: Consumer
                  value:
                    type: consumer
                    fields:
                      - first_name
                      - last_name
                      - postal_address
                    mandate_legal_mention: By signing this mandate form, you authorise (A) {NAME OF THE COMPANY} to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from {NAME OF THE COMPANY}.
                card_payment:
                  summary: Not supported by chosen payment method
                  value: {}
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /hpp/payment/sdd-mandate:
    post:
      tags:
        - Hosted Payment Page
      summary: Creates a Sepa Direct Debit Mandate
      description: |
        Creates a Sepa Direct Debit Mandate after the buyer has completed the IAS check and provided all the required information.
      operationId: create_sdd_mandate
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SddMandateRequest'
      responses:
        '200':
          description: Mandate created and authorization processed successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationComplete'
        '401':
          description: Unauthorized
        '404':
          description: Payment not found
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /hpp/countries:
    get:
      tags:
        - Hosted Payment Page
      summary: Get Countries
      description: Get available countries
      operationId: get_countries_hpp
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Countries'
        '401':
          description: Unauthorized
  /smo/application:
    get:
      tags:
        - Merchant onboarding
      summary: Get Application
      description: Gets an application already initiated.
      operationId: get_merchant_application
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApplicationResponse'
              examples:
                initiated:
                  summary: Initiated
                  value:
                    id: app_44678r08jtm8zbt227tzhc4nw5
                    status: initiated
                    language: en
                    platform:
                      name: My Platform
                      logo_url: http://mydomain.com/images/logo.png
                      colors:
                        primary_color: '#FFFFFF'
                        secondary_color: '#FFFFFF'
                    applicant:
                      first_name: John
                      last_name: Doe
                      email: john.doe@mydomain.com
                    workflow:
                      next: gpa:confirm-applicant
                      complete: false
                    _links:
                      self:
                        href: https://bff.getpaid.io/smo/application
                      gpa:confirm-applicant:
                        href: https://bff.getpaid.io/smo/application/applicant
                applicant_confirmed:
                  summary: With Applicant Confirmed
                  value:
                    id: app_44678r08jtm8zbt227tzhc4nw5
                    status: in_progress
                    language: en
                    platform:
                      name: My Platform
                      logo_url: http://mydomain.com/images/logo.png
                      colors:
                        primary_color: '#FFFFFF'
                        secondary_color: '#FFFFFF'
                    applicant:
                      first_name: John
                      last_name: Doe
                      email: john.doe@mydomain.com
                    workflow:
                      previous: gpa:confirm-applicant
                      next: gpa:business-type
                      complete: false
                    _links:
                      self:
                        href: https://bff.getpaid.io/smo/application
                      gpa:confirm-applicant:
                        href: https://bff.getpaid.io/smo/application/applicant
                      gpa:applicant-details:
                        href: https://bff.getpaid.io/smo/application/applicant-details
                      gpa:applicant-documents:
                        href: https://bff.getpaid.io/smo/application/applicant/documents
                applicant_details:
                  summary: With Applicant Details
                  value:
                    id: app_44678r08jtm8zbt227tzhc4nw5
                    status: in_progress
                    language: en
                    platform:
                      name: My Platform
                      logo_url: http://mydomain.com/images/logo.png
                      colors:
                        primary_color: '#FFFFFF'
                        secondary_color: '#FFFFFF'
                    applicant:
                      first_name: John
                      last_name: Doe
                      email: john.doe@mydomain.com
                      nationality: en
                      gender: male
                      date_of_birth: '1980-01-10'
                      pep: true
                      pep_description: Brother of <name of politician>
                      roles:
                        - owner
                      documents:
                        - id: doc_YKrXD8NUnUKixytyRSBYd1
                          name: passport.png
                          type: passport
                          side: front
                          _links:
                            self: https://bff.getpaid.io/smo/application/applicant/documents/doc_YKrXD8NUnUKixytyRSBYd1
                    workflow:
                      previous: gpa:confirm-applicant
                      next: gpa:business-type
                      complete: false
                    _links:
                      self:
                        href: https://bff.getpaid.io/smo/application
                      gpa:confirm-applicant:
                        href: https://bff.getpaid.io/smo/application/applicant
                      gpa:applicant-details:
                        href: https://bff.getpaid.io/smo/application/applicant-details
                      gpa:applicant-documents:
                        href: https://bff.getpaid.io/smo/application/applicant/documents
                      gpa:business-type:
                        href: https://bff.getpaid.io/smo/application/business-type
                business_type:
                  summary: With Business Type
                  value:
                    id: app_44678r08jtm8zbt227tzhc4nw5
                    status: in_progress
                    language: en
                    platform:
                      name: My Platform
                      logo_url: http://mydomain.com/images/logo.png
                      colors:
                        primary_color: '#FFFFFF'
                        secondary_color: '#FFFFFF'
                    applicant:
                      first_name: John
                      last_name: Doe
                      email: john.doe@mydomain.com
                      nationality: en
                      gender: male
                      date_of_birth: '1980-01-10'
                      pep: true
                      pep_description: Brother of <name of politician>
                      roles:
                        - owner
                      documents:
                        - id: doc_YKrXD8NUnUKixytyRSBYd1
                          name: passport.png
                          type: passport
                          side: front
                          _links:
                            self: https://bff.getpaid.io/smo/application/applicant/documents/doc_YKrXD8NUnUKixytyRSBYd1
                    business:
                      type: company
                      structure: private
                      country_code: IT
                    workflow:
                      previous: gpa:business-type
                      next: gpa:business-profile
                      complete: false
                    _links:
                      self:
                        href: https://bff.getpaid.io/smo/application
                      gpa:confirm-applicant:
                        href: https://bff.getpaid.io/smo/application/applicant
                      gpa:applicant-details:
                        href: https://bff.getpaid.io/smo/application/applicant-details
                      gpa:applicant-documents:
                        href: https://bff.getpaid.io/smo/application/applicant/documents
                      gpa:business-type:
                        href: https://bff.getpaid.io/smo/application/business-type
                      gpa:business-profile:
                        href: https://bff.getpaid.io/smo/application/business-profile
                      gpa:documents:
                        href: https://bff.getpaid.io/smo/application/documents
                business_profile:
                  summary: With Business Profile
                  value:
                    id: app_44678r08jtm8zbt227tzhc4nw5
                    status: in_progress
                    language: en
                    platform:
                      name: My Platform
                      logo_url: http://mydomain.com/images/logo.png
                      colors:
                        primary_color: '#FFFFFF'
                        secondary_color: '#FFFFFF'
                    applicant:
                      first_name: John
                      last_name: Doe
                      email: john.doe@mydomain.com
                      nationality: en
                      gender: male
                      date_of_birth: '1980-01-10'
                      pep: true
                      pep_description: Brother of <name of politician>
                      roles:
                        - owner
                      documents:
                        - id: doc_YKrXD8NUnUKixytyRSBYd1
                          name: passport.png
                          type: passport
                          side: front
                          _links:
                            self: https://bff.getpaid.io/smo/application/applicant/documents/doc_YKrXD8NUnUKixytyRSBYd1
                    business:
                      type: company
                      structure: private
                      country_code: IT
                      profile:
                        legal_name: Wildcat Pumps GmbH
                        trading_name: ''
                        registration_number: '12345678'
                        registered_address:
                          line1: Unit 1
                          line2: Taubenstraße 7
                          town_city: Düsseldorf
                          state: ''
                          zip: '40479'
                        mcc: '5691'
                        website: https://wildcatpumps.de
                        phone_number:
                          country_code: '+49'
                          number: '555666698'
                      representatives:
                        - id: rep_48htvhp14z97m57q5ngm6d2d12
                          first_name: John
                          last_name: Doe
                          email: john.doe@mydomain.com
                          roles:
                            - owner
                          status: awaiting_documents
                          _links:
                            self:
                              href: https://bff.getpaid.io/smo/application/representative/rep_48htvhp14z97m57q5ngm6d2d40
                    documents:
                      - id: doc_4wt0wrfqwz0vkatave0fkjg046
                        name: registration.pdf
                        purpose: company_registration
                        _links:
                          self:
                            href: https://bff.getpaid.io/smo/application/documents/doc_4wt0wrfqwz0vkatave0fkjg046
                    workflow:
                      previous: gpa:business-profile
                      next: gpa:representatives
                      complete: false
                    _links:
                      self:
                        href: https://bff.getpaid.io/smo/application
                      gpa:confirm-applicant:
                        href: https://bff.getpaid.io/smo/application/applicant
                      gpa:applicant-details:
                        href: https://bff.getpaid.io/smo/application/applicant-details
                      gpa:applicant-documents:
                        href: https://bff.getpaid.io/smo/application/applicant/documents
                      gpa:business-type:
                        href: https://bff.getpaid.io/smo/application/business-type
                      gpa:business-profile:
                        href: https://bff.getpaid.io/smo/application/business-profile
                      gpa:documents:
                        href: https://bff.getpaid.io/smo/application/documents
                      gpa:representatives:
                        href: https://bff.getpaid.io/smo/application/representatives
                      gpa:confirm-representatives:
                        href: https://bff.getpaid.io/smo/application/representatives/confirm
                german_business_profile:
                  summary: With Business Profile (German)
                  value:
                    id: app_44678r08jtm8zbt227tzhc4nw5
                    status: in_progress
                    language: en
                    platform:
                      name: My Platform
                      logo_url: http://mydomain.com/images/logo.png
                      colors:
                        primary_color: '#FFFFFF'
                        secondary_color: '#FFFFFF'
                    applicant:
                      first_name: John
                      last_name: Doe
                      email: john.doe@mydomain.com
                      nationality: en
                      gender: male
                      date_of_birth: '1980-01-10'
                      pep: true
                      pep_description: Brother of <name of politician>
                      roles:
                        - owner
                      documents:
                        - id: doc_YKrXD8NUnUKixytyRSBYd1
                          name: passport.png
                          type: passport
                          side: front
                          _links:
                            self: https://bff.getpaid.io/smo/application/applicant/documents/doc_YKrXD8NUnUKixytyRSBYd1
                    business:
                      type: company
                      structure: private
                      country_code: DE
                      profile:
                        legal_name: Wildcat Pumps GmbH
                        trading_name: ''
                        registration_number: HRB 00000
                        district_court_code: Arnsberg
                        registered_address:
                          line1: Unit 1
                          line2: Taubenstraße 7
                          town_city: Düsseldorf
                          state: ''
                          zip: '40479'
                        mcc: '5691'
                        website: https://wildcatpumps.de
                        phone_number:
                          country_code: '+49'
                          number: '555666698'
                      representatives:
                        - id: rep_48htvhp14z97m57q5ngm6d2d12
                          first_name: John
                          last_name: Doe
                          email: john.doe@mydomain.com
                          roles:
                            - owner
                          status: awaiting_documents
                          _links:
                            self:
                              href: https://bff.getpaid.io/smo/application/representative/rep_48htvhp14z97m57q5ngm6d2d40
                    documents:
                      - id: doc_4wt0wrfqwz0vkatave0fkjg046
                        name: registration.pdf
                        purpose: company_registration
                        _links:
                          self:
                            href: https://bff.getpaid.io/smo/application/documents/doc_4wt0wrfqwz0vkatave0fkjg046
                    workflow:
                      previous: gpa:business-profile
                      next: gpa:representatives
                      complete: false
                    _links:
                      self:
                        href: https://bff.getpaid.io/smo/application
                      gpa:confirm-applicant:
                        href: https://bff.getpaid.io/smo/application/applicant
                      gpa:applicant-details:
                        href: https://bff.getpaid.io/smo/application/applicant-details
                      gpa:applicant-documents:
                        href: https://bff.getpaid.io/smo/application/applicant/documents
                      gpa:business-type:
                        href: https://bff.getpaid.io/smo/application/business-type
                      gpa:business-profile:
                        href: https://bff.getpaid.io/smo/application/business-profile
                      gpa:documents:
                        href: https://bff.getpaid.io/smo/application/documents
                      gpa:representatives:
                        href: https://bff.getpaid.io/smo/application/representatives
                      gpa:confirm-representatives:
                        href: https://bff.getpaid.io/smo/application/representatives/confirm
                representatives:
                  summary: With Representatives
                  value:
                    id: app_44678r08jtm8zbt227tzhc4nw5
                    status: in_progress
                    language: en
                    platform:
                      name: My Platform
                      logo_url: http://mydomain.com/images/logo.png
                      colors:
                        primary_color: '#FFFFFF'
                        secondary_color: '#FFFFFF'
                    applicant:
                      first_name: John
                      last_name: Doe
                      email: john.doe@mydomain.com
                      nationality: en
                      gender: male
                      date_of_birth: '1980-01-10'
                      pep: true
                      pep_description: Brother of <name of politician>
                      roles:
                        - owner
                      documents:
                        - id: doc_YKrXD8NUnUKixytyRSBYd1
                          name: passport.png
                          type: passport
                          side: front
                          _links:
                            self: https://bff.getpaid.io/smo/application/applicant/documents/doc_YKrXD8NUnUKixytyRSBYd1
                    business:
                      type: company
                      structure: private
                      country_code: DE
                      profile:
                        legal_name: Wildcat Pumps GmbH
                        trading_name: ''
                        registration_number: HRB 00000
                        district_court_code: Arnsberg
                        registered_address:
                          line1: Unit 1
                          line2: Taubenstraße 7
                          town_city: Düsseldorf
                          state: ''
                          zip: '40479'
                        mcc: '5691'
                        website: https://wildcatpumps.de
                        phone_number:
                          country_code: '+49'
                          number: '555666698'
                      representatives:
                        - id: rep_48htvhp14z97m57q5ngm6d2d12
                          first_name: John
                          last_name: Doe
                          email: john.doe@mydomain.com
                          roles:
                            - owner
                          status: awaiting_documents
                          _links:
                            self:
                              href: https://bff.getpaid.io/smo/application/representative/rep_48htvhp14z97m57q5ngm6d2d40
                        - id: rep_48htvhp14z97m57q5ngm6d2d40
                          first_name: James
                          last_name: Smith
                          email: james@wildcatpumps.de
                          roles:
                            - executive
                            - owner
                          status: awaiting_documents
                          _links:
                            self:
                              href: https://bff.getpaid.io/smo/application/representative/rep_48htvhp14z97m57q5ngm6d2d40
                    documents:
                      - id: doc_4wt0wrfqwz0vkatave0fkjg046
                        purpose: company_registration
                        _links:
                          self:
                            href: https://bff.getpaid.io/smo/application/documents/doc_4wt0wrfqwz0vkatave0fkjg046
                    workflow:
                      previous: gpa:representatives
                      next: gpa:payout-account
                      complete: false
                    _links:
                      self:
                        href: https://bff.getpaid.io/smo/application
                      gpa:confirm-applicant:
                        href: https://bff.getpaid.io/smo/application/applicant
                      gpa:applicant-details:
                        href: https://bff.getpaid.io/smo/application/applicant-details
                      gpa:applicant-documents:
                        href: https://bff.getpaid.io/smo/application/applicant/documents
                      gpa:business-type:
                        href: https://bff.getpaid.io/smo/application/business-type
                      gpa:business-profile:
                        href: https://bff.getpaid.io/smo/application/business-profile
                      gpa:documents:
                        href: https://bff.getpaid.io/smo/application/documents
                      gpa:representatives:
                        href: https://bff.getpaid.io/smo/application/representatives
                      gpa:confirm-representatives:
                        href: https://bff.getpaid.io/smo/application/representatives/confirm
                      gpa:payout-account:
                        href: https://bff.getpaid.io/smo/application/payout-account
                payout_account:
                  summary: With Payout Account
                  value:
                    id: app_44678r08jtm8zbt227tzhc4nw5
                    status: in_progress
                    language: en
                    platform:
                      name: My Platform
                      logo_url: http://mydomain.com/images/logo.png
                      colors:
                        primary_color: '#FFFFFF'
                        secondary_color: '#FFFFFF'
                    applicant:
                      first_name: John
                      last_name: Doe
                      email: john.doe@mydomain.com
                      nationality: en
                      gender: male
                      date_of_birth: '1980-01-10'
                      pep: true
                      pep_description: Brother of <name of politician>
                      roles:
                        - owner
                      documents:
                        - id: doc_YKrXD8NUnUKixytyRSBYd1
                          name: passport.png
                          type: passport
                          side: front
                          _links:
                            self: https://bff.getpaid.io/smo/application/applicant/documents/doc_YKrXD8NUnUKixytyRSBYd1
                    business:
                      type: company
                      structure: private
                      country_code: DE
                      profile:
                        legal_name: Wildcat Pumps GmbH
                        trading_name: ''
                        registration_number: HRB 00000
                        district_court_code: Arnsberg
                        registered_address:
                          line1: Unit 1
                          line2: Taubenstraße 7
                          town_city: Düsseldorf
                          state: ''
                          zip: '40479'
                        mcc: '5691'
                        website: https://wildcatpumps.de
                        phone_number:
                          country_code: '+49'
                          number: '555666698'
                      representatives:
                        - id: rep_48htvhp14z97m57q5ngm6d2d12
                          first_name: John
                          last_name: Doe
                          email: john.doe@mydomain.com
                          roles:
                            - owner
                          status: awaiting_documents
                          _links:
                            self:
                              href: https://bff.getpaid.io/smo/application/representative/rep_48htvhp14z97m57q5ngm6d2d40
                        - id: rep_48htvhp14z97m57q5ngm6d2d40
                          first_name: James
                          last_name: Smith
                          email: james@wildcatpumps.de
                          roles:
                            - executive
                            - owner
                          status: awaiting_documents
                          _links:
                            self:
                              href: https://bff.getpaid.io/smo/application/representative/rep_48htvhp14z97m57q5ngm6d2d40
                    documents:
                      - id: doc_4wt0wrfqwz0vkatave0fkjg046
                        purpose: company_registration
                        _links:
                          self:
                            href: https://bff.getpaid.io/smo/application/documents/doc_4wt0wrfqwz0vkatave0fkjg046
                      - id: doc_2qw4uiokjg9aecgjum4lopu967
                        purpose: bank_account_proof
                        _links:
                          self:
                            href: https://bff.getpaid.io/smo/application/documents/doc_2qw4uiokjg9aecgjum4lopu967
                    payout_account:
                      account_number:
                        type: iban
                        value: DE755**************199
                      account_owners_name: Wildcat Pumps GmbH
                      currency: EUR
                    workflow:
                      previous: gpa:payout-account
                      next: gpa:submit
                      complete: false
                    _links:
                      self:
                        href: https://bff.getpaid.io/smo/application
                      gpa:confirm-applicant:
                        href: https://bff.getpaid.io/smo/application/applicant
                      gpa:applicant-details:
                        href: https://bff.getpaid.io/smo/application/applicant-details
                      gpa:applicant-documents:
                        href: https://bff.getpaid.io/smo/application/applicant/documents
                      gpa:business-type:
                        href: https://bff.getpaid.io/smo/application/business-type
                      gpa:business-profile:
                        href: https://bff.getpaid.io/smo/application/business-profile
                      gpa:documents:
                        href: https://bff.getpaid.io/smo/application/documents
                      gpa:representatives:
                        href: https://bff.getpaid.io/smo/application/representatives
                      gpa:confirm-representatives:
                        href: https://bff.getpaid.io/smo/application/representatives/confirm
                      gpa:payout-account:
                        href: https://bff.getpaid.io/smo/application/payout-account
                      gpa:submit:
                        href: https://bff.getpaid.io/smo/application/submit
                submitted:
                  summary: Submitted
                  value:
                    id: app_44678r08jtm8zbt227tzhc4nw5
                    status: submitted
                    language: en
                    platform:
                      name: My Platform
                      logo_url: http://mydomain.com/images/logo.png
                      colors:
                        primary_color: '#FFFFFF'
                        secondary_color: '#FFFFFF'
                    workflow:
                      complete: true
                    _links:
                      self:
                        href: https://bff.getpaid.io/smo/application
                      gpa:redirect:
                        href: https://haircutz.co/onboarding/complete
        '401':
          description: Unauthorized
        '404':
          description: Not found
          $ref: '#/components/responses/ProblemNotFound'
      x-codeSamples:
        - lang: curl
          source: |
            curl -X GET \
              https://api.getpaid.io/merchants/application \
              -H 'authorization: Bearer {{your_auth_token}}' \
              -H 'content-type: application/json' \
  /smo/application/applicant:
    put:
      tags:
        - Merchant onboarding
      summary: Confirm Applicant
      description: Confirms the details of the individual completing the application.
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: confirm_applicant
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmApplicantRequest'
        required: true
      responses:
        '200':
          description: Applicant confirmed successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmApplicantResponse'
        '401':
          description: Unauthorized
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          description: Conflict
          $ref: '#/components/responses/ProblemConflict'
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /smo/application/applicant/details:
    put:
      tags:
        - Merchant onboarding
      summary: Update Applicant Details
      description: Update the applicant details used for identity verification.
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: update_applicant_details
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateApplicantDetailsRequest'
        required: true
      responses:
        '200':
          description: Applicant details updated successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateApplicantDetailsResponse'
        '401':
          description: Unauthorized
        '403':
          $ref: '#/components/responses/ProblemForbidden'
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          $ref: '#/components/responses/ProblemConflict'
        '422':
          $ref: '#/components/responses/ProblemInvalidParameters'
  /smo/application/applicant/documents:
    post:
      tags:
        - Merchant onboarding
      summary: Upload Applicant Document
      description: |
        Upload a document associated with the applicant
        Files must be in either JPEG/JPG, PNG or PDF format and be no larger than 4MB.
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: upload_applicant_document
      security:
        - Resource-Token: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadApplicantDocumentRequest'
            examples:
              multipart:
                summary: multipart/form-data,
                value: |
                  POST /smo/application/documents HTTP/1.1
                  Host: bff.getpaid.io
                  Content-Length: 296
                  Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

                  ----WebKitFormBoundary7MA4YWxkTrZu0gW
                  Content-Disposition: form-data; name="file"; filename="passport.png"
                  Content-Type: image/png

                  (data)
                  ----WebKitFormBoundary7MA4YWxkTrZu0gW
                  Content-Disposition: form-data; name="type"

                  passport
                  ----WebKitFormBoundary7MA4YWxkTrZu0gW
                  Content-Disposition: form-data; name="side"

                  front
                  ----WebKitFormBoundary7MA4YWxkTrZu0gW
      responses:
        '201':
          description: Document uploaded successfully.
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadApplicantDocumentResponse'
        '401':
          description: Unauthorized
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          description: Conflict
          $ref: '#/components/responses/ProblemConflict'
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /smo/application/applicant/documents/{document_id}:
    delete:
      tags:
        - Merchant onboarding
      summary: Delete Applicant Document
      description: Deletes a document from the applicant
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: delete_applicant_document
      security:
        - Resource-Token: []
      parameters:
        - name: document_id
          in: path
          description: The document identifier
          required: true
          schema:
            type: string
            example: doc_4wt0wrfqwz0vkatave0fkjg046
      responses:
        '204':
          description: Document deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: Document Not found
          $ref: '#/components/responses/ProblemNotFound'
  /smo/application/business-type:
    put:
      tags:
        - Merchant onboarding
      summary: Update Business Type
      description: Confirms the type of business being onboarded which will determine the application requirements
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: update_business_type
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBusinessTypeRequest'
        required: true
      responses:
        '200':
          description: Business type updated successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateBusinessTypeResponse'
        '401':
          description: Unauthorized
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          description: Conflict
          $ref: '#/components/responses/ProblemConflict'
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /smo/application/business-profile:
    put:
      tags:
        - Merchant onboarding
      summary: Update Business Profile
      description: Update the details of the merchant business. Available and required fields may change depending on the business type, structure and entity type.
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: update_business_profile
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBusinessProfileRequest'
        required: true
      responses:
        '200':
          description: Business profile updated successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateBusinessProfileResponse'
        '401':
          description: Unauthorized
        '403':
          $ref: '#/components/responses/ProblemForbidden'
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          $ref: '#/components/responses/ProblemConflict'
        '422':
          $ref: '#/components/responses/ProblemInvalidParameters'
  /smo/application/documents:
    post:
      tags:
        - Merchant onboarding
      summary: Upload Document
      description: |
        Upload a document associated with the application.
        Files must be in either JPEG/JPG, PNG or PDF format and be no larger than 4MB.
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: upload_document
      security:
        - Resource-Token: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadDocumentRequest'
            examples:
              multipart:
                summary: multipart/form-data,
                value: |
                  POST /smo/application/documents HTTP/1.1
                  Host: bff.getpaid.io
                  Content-Length: 296
                  Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

                  ----WebKitFormBoundary7MA4YWxkTrZu0gW
                  Content-Disposition: form-data; name="file"; filename="company-registration.png"
                  Content-Type: image/png

                  (data)
                  ----WebKitFormBoundary7MA4YWxkTrZu0gW
                  Content-Disposition: form-data; name="purpose"

                  company_registration
                  ----WebKitFormBoundary7MA4YWxkTrZu0gW
      responses:
        '201':
          description: Document uploaded successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadDocumentResponse'
        '401':
          description: Unauthorized
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          description: Conflict
          $ref: '#/components/responses/ProblemConflict'
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /smo/application/documents/{document_id}:
    delete:
      tags:
        - Merchant onboarding
      summary: Delete Document
      description: Deletes a document from the application
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: delete_document
      security:
        - Resource-Token: []
      parameters:
        - name: document_id
          in: path
          description: The document identifier
          required: true
          schema:
            type: string
            example: doc_4wt0wrfqwz0vkatave0fkjg046
      responses:
        '204':
          description: Document deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: Document Not found
          $ref: '#/components/responses/ProblemNotFound'
  /smo/application/representatives:
    post:
      tags:
        - Merchant onboarding
      summary: Add Representative
      description: Adds a business representative
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: add_representative
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddRepresentativeRequest'
        required: true
      responses:
        '201':
          description: Representative added successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddRepresentativeResponse'
        '401':
          description: Unauthorized
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          description: Conflict
          $ref: '#/components/responses/ProblemConflict'
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
    patch:
      tags:
        - Merchant onboarding
      summary: Confirm Representatives
      description: Confirms that all relevant company representatives have been added
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: confirm_representatives
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Representatives confirmed successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmRepresentativesResponse'
        '401':
          description: Unauthorized
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          description: Conflict
          $ref: '#/components/responses/ProblemConflict'
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /smo/application/representatives/{representative_id}:
    delete:
      tags:
        - Merchant onboarding
      summary: Delete Representative
      description: Deletes a representative from the application
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: delete_representative
      security:
        - Resource-Token: []
      parameters:
        - name: representative_id
          in: path
          description: The representative identifier
          required: true
          schema:
            type: string
            example: rep_48htvhp14z97m57q5ngm6d2d40
      responses:
        '204':
          description: Representative deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: Representative Not found
          $ref: '#/components/responses/ProblemNotFound'
  /smo/application/payout-account:
    put:
      tags:
        - Merchant onboarding
      summary: Update Payout Account
      description: Updates the payout account where funds will be settled
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: update_payout_account
      security:
        - Resource-Token: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePayoutAccountRequest'
        required: false
      responses:
        '200':
          description: Payout Account updated successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePayoutAccountResponse'
        '401':
          description: Unauthorized
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          description: Conflict
          $ref: '#/components/responses/ProblemConflict'
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /smo/application/submit:
    patch:
      tags:
        - Merchant onboarding
      summary: Submit Application
      description: |
        Submit the merchant application for processing.
        After this point the application can no longer be modified by the applicant.
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: submit_application
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Application submitted successfully
          headers:
            GetPaid-Trace-Id:
              $ref: '#/components/headers/TraceId'
            GetPaid-Api-Version:
              $ref: '#/components/headers/Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitApplicationResponse'
        '401':
          description: Unauthorized
        '404':
          description: Application Not found
          $ref: '#/components/responses/ProblemNotFound'
        '409':
          description: Conflict
          $ref: '#/components/responses/ProblemConflict'
        '422':
          description: Invalid Parameters
          $ref: '#/components/responses/ProblemInvalidParameters'
  /smo/countries:
    get:
      tags:
        - Merchant onboarding
      summary: Get Countries
      description: Get available countries
      operationId: get_countries_smo
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Countries'
        '401':
          description: Unauthorized
  /smo/merchant-categories:
    get:
      tags:
        - Merchant onboarding
      summary: Get Merchant Categories
      description: Get merchant categories
      operationId: get_mccs
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mccs'
        '401':
          description: Unauthorized
  /smo/countries/{country_code}/district-courts:
    get:
      tags:
        - Merchant onboarding
      summary: Get District Courts
      description: Get available district courts.
      operationId: get_district_courts_smo
      parameters:
        - name: country_code
          in: path
          description: The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the business
          schema:
            type: string
            example: DE
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistrictCourts'
        '401':
          description: Unauthorized
  /smo/countries/{country_code}/business-types:
    get:
      tags:
        - Merchant onboarding
      summary: Get Business Types
      description: Gets the business types and their respective structures for the region in which the merchant is onboarding. If a country code provided is not a valid [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), a 404 response will be returned.
      operationId: get_business_types
      parameters:
        - name: country_code
          in: path
          description: The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the business
          schema:
            $ref: '#/components/schemas/Country'
            example: GB
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBusinessTypesResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not found
          $ref: '#/components/responses/ProblemNotFound'
  /smo/application/forms/{step}:
    get:
      tags:
        - Merchant onboarding
      summary: Get Form
      description: |
        Returns the configuration for the dynamic fields of the desired step. If the step value is not in the list of accepted values the endpoint will return a `404` error. If the configuration for a field is null, the field should be hidden.
      parameters:
        - name: step
          in: path
          schema:
            type: string
            enum:
              - business-profile
      servers:
        - url: https://bff.getpaid.io
          description: Live
        - url: https://bff.sandbox.getpaid.io
          description: Sandbox
      operationId: get_form
      security:
        - Resource-Token: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                oneOf:
                  - title: business-profile
                    $ref: '#/components/schemas/GetBusinessProfileFormResponse'
              examples:
                business-profile:
                  summary: Business profile step
                  value:
                    registration_number:
                      required: true
                      type: DeHrb
                    vat_number:
                      required: false
                    district_court_code:
                      required: true
        '401':
          description: Unauthorized
        '404':
          description: Not found
          $ref: '#/components/responses/ProblemNotFound'
webhooks:
  payment_succeeded:
    post:
      summary: Payment Succeeded
      operationId: payment_succeeded
      description: The `payment_succeeded` webhook is sent when a payment succeeds. By default it is triggered when a payment is Captured. For manual captures (not yet supported), it is triggered when the payment is Authorized. The status of the payment is `captured` or `completed` depending on the payment method. We use `captured` for card payments and `completed` for Sepa Direct Debit payments.
      tags:
        - Payment Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4r8t310nhp2mferdc1waa07s5d
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - payment_succeeded
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  description: The event data.
                  type: object
                  required:
                    - id
                    - status
                  properties:
                    id:
                      $ref: '#/components/schemas/PaymentId'
                    status:
                      type: string
                      description: The status of the payment.
                      enum:
                        - captured
                        - completed
                    reference:
                      $ref: '#/components/schemas/PaymentReference'
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  payment_failed:
    post:
      summary: Payment Failed
      operationId: payment_failed
      description: The `payment_failed` webhook is sent when a payment fails. You can inspect the `status` field to determine the cause of the failure. The status of the payment is `declined` or `not_completed` depending on the payment method. We use `declined` for card payments and `not_completed` for Sepa Direct Debit payments.
      tags:
        - Payment Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4y7rv0p7zqv0f9arfsyr50864t
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - payment_failed
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  description: The event data.
                  type: object
                  required:
                    - id
                    - status
                  properties:
                    id:
                      $ref: '#/components/schemas/PaymentId'
                    status:
                      type: string
                      description: The status of the payment.
                      enum:
                        - declined
                        - not_completed
                    reference:
                      $ref: '#/components/schemas/PaymentReference'
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  payment_authentication_failed:
    post:
      summary: Authentication Failed
      operationId: payment_authentication_failed
      description: The `payment_authentication_failed` webhook is sent when a buyer fails to complete a Strong Customer Authentication (SCA) flow. It will be triggered if the user fails 3DS SCA or if it fails AIS for a bank transfer. The payment will be marked as `authentication_failed` but it is not a final state. The buyer can retry the payment with a different payment method or retry the authentication flow with the same payment method.
      tags:
        - Payment Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4r8t310nhp2mferdc1waa07s5d
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - payment_authentication_failed
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  description: The event data.
                  type: object
                  required:
                    - id
                    - status
                  properties:
                    id:
                      $ref: '#/components/schemas/PaymentId'
                    status:
                      type: string
                      description: The status of the payment.
                      enum:
                        - authentication_failed
                    reference:
                      $ref: '#/components/schemas/PaymentReference'
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  refund_initiated:
    post:
      summary: Refund Initiated
      operationId: refund_initiated
      description: |-
        The `refund_initiated` webhook is sent when the refund has been initiated.

        We will emit this webhook regardless the state of the payout.
      tags:
        - Refund Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4y7rv0p7zqv0f9arfsyr50864t
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - refund_initiated
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  $ref: '#/components/schemas/refund-webhook-data'
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  refund_initiated_from_buyer:
    post:
      summary: Refund Initiated from Buyer
      operationId: refund_initiated_from_buyer
      description: |-
        The `refund_initiated_from_buyer` webhook is sent when the refund has been initiated by the buyer (or debtor) - typically from his/her bank. This is supported only for SEPA Direct Debit payments.

        We will emit this webhook regardless the state of the payout.
      tags:
        - Refund Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4y7rv0p7zqv0f9arfsyr50864t
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - refund_initiated_from_buyer
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  type: object
                  description: The event data
                  required:
                    - refund_id
                    - payment_id
                    - amount_minor
                    - currency
                  properties:
                    refund_id:
                      description: The unique identifier of the refund.
                      type: string
                      example: rfd_4x7as7q1zqv3f9qamnyr69852t
                    payment_id:
                      type: string
                      description: The unique identifier of the payment.
                      example: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    amount_minor:
                      description: The refund amount in the minor currency unit (e.g. 100 cents for 1 EUR).
                      allOf:
                        - $ref: '#/components/schemas/AmountMinor'
                    currency:
                      $ref: '#/components/schemas/Currency'
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  transfer_received_from_creditor:
    post:
      summary: Transfer Received from Creditor
      operationId: transfer_received_from_creditor
      description: |-
        The `transfer_received_from_creditor` webhook is sent when the funds from a specific transfer have been received from the creditor. We will emit a webhook for the platform and also one per merchant configured at the payment's initiation routing.

        Please note that this webhook is sent only if the payout has already started at the moment the refund was initiated.
      tags:
        - Refund Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4y7rv0p7zqv0f9arfsyr50864t
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - transfer_received_from_creditor
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  description: The event data
                  type: object
                  required:
                    - transfer_id
                    - refund_id
                    - payment_id
                    - account_id
                    - amount_minor
                    - currency
                  properties:
                    transfer_id:
                      type: string
                      description: The unique identifier of the transfer.
                      example: tra_1a6po0p7zqv1q2arfsyr9548q
                    refund_id:
                      description: The unique identifier of the refund.
                      type: string
                      example: rfd_4x7as7q1zqv3f9qamnyr69852t
                    payment_id:
                      type: string
                      description: The unique identifier of the payment.
                      example: pay_473cr1y0ghbyc3m1yfbwvn3nxx
                    account_id:
                      $ref: '#/components/schemas/AccountId'
                      description: The unique identifier of the account whose transfer is related.
                    amount_minor:
                      $ref: '#/components/schemas/AmountMinor'
                      description: The transfer amount in the minor currency unit (e.g. 100 cents for 1 EUR).
                    currency:
                      $ref: '#/components/schemas/Currency'
                    reference:
                      type: string
                      maxLength: 50
                      description: Your reference for the refund. This will never be displayed to end users.
                      example: REF-123456
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  refund_completed:
    post:
      summary: Refund Completed
      operationId: refund_completed
      description: |-
        The `refund_completed` webhook is sent when the execution of the refund has been completed (the refund should be reflected at the buyer's account).

        We will emit this webhook regardless the state of the payout.
      tags:
        - Refund Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4y7rv0p7zqv0f9arfsyr50864t
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - refund_completed
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  $ref: '#/components/schemas/refund-webhook-data'
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  transfer_started:
    post:
      summary: Transfer Started
      operationId: transfer_started
      description: The `transfer_started` webhook is sent when the execution of the money transfer to the creditor's bank account has started. We will emit a webhook for the platform and also one per merchant configured at the payment's initiation routing.
      tags:
        - Payout Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4y7rv0p7zqv0f9arfsyr50864t
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - transfer_started
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  $ref: '#/components/schemas/transfer-webhook-data'
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  transfer_updated:
    post:
      summary: Transfer Updated
      operationId: transfer_updated
      description: The `transfer_updated` webhook is sent when the `payout_id` is available for the transfer. We will emit a webhook for the platform and also one per merchant configured at the payment's initiation routing.
      tags:
        - Payout Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4y7rv0p7zqv0f9arfsyr50864t
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - transfer_updated
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  allOf:
                    - $ref: '#/components/schemas/transfer-webhook-data'
                    - type: object
                      required:
                        - payout_id
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  transfer_completed:
    post:
      summary: Transfer Completed
      operationId: transfer_completed
      description: The `transfer_completed` webhook is sent when the execution of the transfer has been completed. The money has arrived to the creditor's bank account. We will emit a webhook for the platform and also one per merchant configured at the payment's initiation routing.
      tags:
        - Payout Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4y7rv0p7zqv0f9arfsyr50864t
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - transfer_completed
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  $ref: '#/components/schemas/transfer-webhook-data'
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  application_started:
    post:
      summary: Application Started
      operationId: application_started
      description: The `application_started` webhook is sent when the merchant starts the onboarding process by navigating to the hosted onboarding page.
      tags:
        - Application Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4r8t310nhp2mferdc1waa07s5d
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - application_started
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  description: The event data.
                  type: object
                  required:
                    - id
                    - merchant_id
                  properties:
                    id:
                      $ref: '#/components/schemas/ApplicationId'
                    merchant_id:
                      $ref: '#/components/schemas/MerchantId'
                    reference:
                      type: string
                      maxLength: 50
                      description: The reference for the merchant if provided during initiation.
                      example: merch-001
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  application_submitted:
    post:
      summary: Application Submitted
      operationId: application_submitted
      description: The `application_submitted` webhook is sent when the merchant submits the application using the hosted onboarding page.
      tags:
        - Application Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4r8t310nhp2mferdc1waa07s5d
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - application_submitted
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  description: The event data.
                  type: object
                  required:
                    - id
                    - merchant_id
                  properties:
                    id:
                      $ref: '#/components/schemas/ApplicationId'
                    merchant_id:
                      $ref: '#/components/schemas/MerchantId'
                    reference:
                      type: string
                      maxLength: 50
                      description: The reference for the merchant if provided during initiation.
                      example: merch-001
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  application_succeeded:
    post:
      summary: Application Succeeded
      operationId: application_succeeded
      description: The `application_succeeded` webhook is sent when the compliance checks on an application are completed successfully.
      tags:
        - Application Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4r8t310nhp2mferdc1waa07s5d
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - application_succeeded
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  description: The event data.
                  type: object
                  required:
                    - id
                    - merchant_id
                  properties:
                    id:
                      $ref: '#/components/schemas/ApplicationId'
                    merchant_id:
                      $ref: '#/components/schemas/MerchantId'
                    reference:
                      type: string
                      maxLength: 50
                      description: The reference for the merchant if provided during initiation.
                      example: merch-001
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
  application_action_required:
    post:
      summary: Application Action Required
      operationId: application_action_required
      description: The `application_action_required` webhook is sent when more information are needed in order to complete the compliance checks.
      tags:
        - Application Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - type
                - occurred_at
                - data
              properties:
                event_id:
                  description: The unique identifier of the event.
                  type: string
                  example: evt_4r8t310nhp2mferdc1waa07s5d
                type:
                  description: The type of event.
                  type: string
                  enum:
                    - application_action_required
                occurred_at:
                  description: The UTC date & time that the event occurred.
                  type: string
                  format: date-time
                data:
                  description: The event data.
                  type: object
                  required:
                    - id
                    - merchant_id
                  properties:
                    id:
                      $ref: '#/components/schemas/ApplicationId'
                    merchant_id:
                      $ref: '#/components/schemas/MerchantId'
                    reference:
                      type: string
                      maxLength: 50
                      description: The reference for the merchant if provided during initiation.
                      example: merch-001
      responses:
        '400':
          description: The webhook action will be disabled
        '404':
          description: The webhook action will be disabled
        '422':
          description: The webhook action will be disabled
        '429':
          description: The webhook action will be retried according to the workflow retry schedule
        2XX:
          description: Return any `2XX` status code to indicate success
        5XX:
          description: The webhook action will be retried according to the workflow retry schedule
components:
  securitySchemes:
    OAuth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://auth.getpaid.io/oauth/token
          scopes:
            payments:*: Process and obtain the state of payments
            payments:read: Read-only access to payment information
            refunds:initiate: Initiate refunds
            refunds:read: Read-only access to refund information
            onboarding:initiate: Onboard merchants
            payouts:read: Read-only access to payout information
    Resource-Token:
      type: http
      scheme: bearer
      description: Use the token retrieved from `Initiate Application` endpoint
    Basic:
      type: http
      scheme: basic
  schemas:
    OAuthTokenRequest:
      type: object
      properties:
        client_id:
          description: Your OAuth Client ID for the environment, Live or Sandbox, you are requesting the token for.
          type: string
          example: g6gWu46zeP0HH4jkW3i22yJ2shDrNxJ8
        client_secret:
          description: Your OAuth Client Secret for the environment, Live or Sandbox, you are requesting the token for.
          type: string
          example: S6gozTXzrS42OZ0cmxVJG133mOfuHhSfkIJkcH7FBm-0HyGrVZMLGJtyruTA4CQv
        audience:
          description: The API you wish to integrate with. Use this to switch between Sandbox and Live.
          type: string
          format: uri
          enum:
            - https://api.getpaid.io
            - https://api.sandbox.getpaid.io
        grant_type:
          description: The OAuth grant type.
          type: string
          enum:
            - client_credentials
    OAuthTokenResponse:
      type: object
      properties:
        access_token:
          description: The OAuth Access token (JWT) used to authenticate to GetPaid APIs
          type: string
          example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImliVmVSLV...
        scope:
          description: The API scopes granted to the access token
          type: string
          example: payments
        expires_in:
          description: The duration (in seconds) until the access token expires
          type: integer
          example: 86400
        token_type:
          description: The type of token returned
          type: string
          enum:
            - Bearer
    Problem:
      type: object
      description: The Problem Details JSON Object [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      required:
        - type
        - title
        - trace_id
        - status
      properties:
        type:
          type: string
          description: A URI reference [[RFC3986](https://tools.ietf.org/html/rfc3986)] that identifies the problem type. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank".
          format: uri
          example: https://docs.getpaid.io/ref/error-types#problem
        title:
          type: string
          description: A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
          example: Invalid Request
        trace_id:
          type: string
          description: The unique identifier of the request. This should be provided when submitting a support request.
          example: 96ce50247f87f540bb2d86771b3728b8
        status:
          type: integer
          description: The HTTP status code.
          minimum: 400
          maximum: 599
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the problem.
          example: The request body was invalid
    AmountMinor:
      type: number
      format: int64
      minimum: 1
      description: The payment amount in the minor currency unit (e.g. 100 cents for 1 EUR).
      example: 1000
    Currency:
      type: string
      format: iso-4217
      minLength: 3
      maxLength: 3
      description: The processing currency code according to the [ISO-4217 standard](https://en.wikipedia.org/wiki/ISO_4217).
      example: EUR
    PaymentMethod:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The payment method(s) available to process the payment
          example: user_selected
    PaymentReference:
      type: string
      maxLength: 50
      description: Your reference for the payment. This will never be displayed to end users.
      example: ORD-123456
    HostedPaymentIntegration:
      allOf:
        - $ref: '#/components/schemas/PaymentIntegration'
        - type: object
          description: Process a payment using the GetPaid Hosted Payment Page (HPP)
          properties:
            generate_qr_code:
              type: boolean
              description: Whether to generate a QR code
              example: true
              default: false
    PaymentIntegration:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The integration method
          example: hosted
    ProcessingFeeContribution:
      type: number
      format: int32
      minimum: 0
      maximum: 100
      description: |
        The contribution to the processing fee. If no value is provided, it would take 0 as default value.
        E.g. 50 would indicate a contribution of the 50% of the processing fee.

        If the resulting proportional processing fee is not covered in the `amount_minor`, it will return an error.
      default: 0
      example: 50
    PlatformRoute:
      type: object
      description: The route for the platform.
      required:
        - amount_minor
      properties:
        amount_minor:
          description: |
            The amount to be routed in the minor currency unit (e.g. 100 cents for 1 EUR).

            The proportional processing fee will be deducted from this amount.
          allOf:
            - $ref: '#/components/schemas/AmountMinor'
        processing_fee_contribution:
          $ref: '#/components/schemas/ProcessingFeeContribution'
    MerchantRoute:
      type: object
      description: A route to send funds to a merchant.
      required:
        - id
        - type
        - amount_minor
      properties:
        id:
          type: string
          description: The merchant account identifier.
          example: acc_4zjjxn0nm1tnweqbttedkvnsc8
        type:
          type: string
          description: The funding route type.
          enum:
            - merchant
            - seller
          example: seller
        amount_minor:
          description: |
            The amount to be routed in the minor currency unit (e.g. 100 cents for 1 EUR).

            The proportional processing fee will be deducted from this amount.
          allOf:
            - $ref: '#/components/schemas/AmountMinor'
        processing_fee_contribution:
          $ref: '#/components/schemas/ProcessingFeeContribution'
        reference:
          type: string
          maxLength: 50
          description: Your reference that will be visible to the receiving party.
          example: ORD-123456
    PaymentRouting:
      type: object
      description: |
        Determines how funds for successful payments will be routed. If no routing is provided, the payment will be routed entirely to the platform.
        - The sum of the platform and merchants `amount_minor` declared at the routing should have the same value as the total `amount_minor` of the payment.
        - The sum of the platform and merchants `processing_fee_contribution` declared at the routing should be 100.
      required:
        - merchants
      properties:
        platform:
          description: Route for the platform. If it's not provided, the platform would not get any commission.
          $ref: '#/components/schemas/PlatformRoute'
        merchants:
          type: array
          description: A set of routes for the different merchants. There must be only one route of type `seller`.
          minItems: 1
          items:
            $ref: '#/components/schemas/MerchantRoute'
    PaymentCustomerAddress:
      type: object
      properties:
        line1:
          type: string
          minLength: 1
          maxLength: 300
          description: Line 1 of the address.
          example: Unit 1
        line2:
          type: string
          maxLength: 300
          description: Line 2 of the address.
          example: Taubenstraße
        number:
          type: string
          maxLength: 50
          description: Address number.
          example: 7
        town_city:
          type: string
          minLength: 2
          maxLength: 300
          description: The Town or City.
          example: Düsseldorf
        state:
          type: string
          maxLength: 300
          description: The State or County.
          example: ''
        zip:
          type: string
          minLength: 1
          maxLength: 16
          description: The Zip or Postal Code.
          example: '40479'
    PaymentCustomer:
      type: object
      properties:
        first_name:
          type: string
          minLength: 2
          maxLength: 50
          description: The first name of the customer
          example: John
        last_name:
          type: string
          minLength: 2
          maxLength: 50
          description: The last name of the customer
          example: Doe
        email:
          type: string
          format: email
          maxLength: 100
          description: The email address of the customer
          example: customer@email.com
        postal_address:
          description: The postal address of the customer
          $ref: '#/components/schemas/PaymentCustomerAddress'
        company_name:
          type: string
          minLength: 2
          maxLength: 150
          description: The company name of the customer
          example: Example Company
    InitiatePaymentRequest:
      type: object
      required:
        - amount_minor
        - currency
        - reference
        - integration
        - urls
      properties:
        amount_minor:
          $ref: '#/components/schemas/AmountMinor'
        currency:
          $ref: '#/components/schemas/Currency'
        payment_method:
          type: object
          description: |
            The payment method(s) used to process the payment.
            If ommitted the method will default to `user_selected` with all payment methods activated on your account available to the end user.
          oneOf:
            - $ref: '#/components/schemas/PaymentMethod'
          discriminator:
            propertyName: type
            mapping:
              user_selected: '#/components/schemas/PaymentMethod'
        reference:
          $ref: '#/components/schemas/PaymentReference'
        description:
          type: string
          maxLength: 100
          description: A description of the payment. This will be displayed if using one of our hosted integration options.
          example: Your Haircutz appointment at Emma Stone Hair Salon
        integration:
          type: object
          description: |
            The type of integration you wish to use to process the payment.
            - `hosted` - will return a link to our hosted payment page that you can share with the end user
            - `sdk` - will return a resource token that can be used to initiate our client-side SDKs
          oneOf:
            - $ref: '#/components/schemas/HostedPaymentIntegration'
            - $ref: '#/components/schemas/PaymentIntegration'
          discriminator:
            propertyName: type
            mapping:
              hosted: '#/components/schemas/HostedPaymentIntegration'
              sdk: '#/components/schemas/PaymentIntegration'
        routing:
          $ref: '#/components/schemas/PaymentRouting'
        urls:
          type: object
          description: URLs that are used throughout the payment process
          required:
            - redirect
          properties:
            redirect:
              type: string
              format: uri
              maxLength: 1024
              description: |
                The URL the end user will be redirected to after the payment process completes.

                We recommend including a unique identifier such as your order ID to help you retrieve the appropriate information when the end-user is returned.
              example: https://haircutz.co/checkout/complete?order_id=ORD-123456
            webhook:
              type: string
              format: uri
              maxLength: 1024
              description: |
                The webhook endpoint to which events for this payment will be sent to.

                If ommitted, webhooks will not be sent.
              example: https://webhooks.haircutz.co/getpaid
        cit_mode:
          type: string
          enum:
            - one_off
            - initial
          default: one_off
          description: |
            The mode of CIT, Customer Initiated Transaction, to process the payment.
            - `one_off` - default, initiates exactly one payment transaction.
            - `initial` - initial collection in a series which generates a token to be used in subsequent MIT, Merchant Initiated Transaction, payments.
        customer:
          description: Customer details to pre-fill the payment form.
          $ref: '#/components/schemas/PaymentCustomer'
    PaymentId:
      description: The unique identifier of the payment.
      type: string
      example: pay_473cr1y0ghbyc3m1yfbwvn3nxx
    Link:
      type: object
      required:
        - href
      properties:
        href:
          description: The link URL.
          type: string
          format: uri
        methods:
          description: The HTTP methods supported by the link.
          type: array
          minItems: 1
          items:
            type: string
            enum:
              - GET
              - POST
              - PUT
              - PATCH
              - DELETE
    PaymentLinks:
      description: Links related to the payment.
      type: object
      required:
        - self
      properties:
        self:
          description: The URI of the payment.
          $ref: '#/components/schemas/Link'
      example:
        self:
          href: https://api.getpaid.io/payments/pay_473cr1y0ghbyc3m1yfbwvn3nxx
    InitiatePaymentResponse:
      type: object
      required:
        - id
        - status
        - _links
      properties:
        id:
          $ref: '#/components/schemas/PaymentId'
        status:
          type: string
          enum:
            - initiated
        reference:
          $ref: '#/components/schemas/PaymentReference'
        expires_at:
          type: string
          format: date-time
          description: The date/time that the payment expires
        integration:
          type: object
          description: The type of integration to use to process the payment
          oneOf:
            - type: object
              title: hosted
              required:
                - type
                - resource_token
              properties:
                type:
                  type: string
                  enum:
                    - hosted
            - type: object
              title: sdk
              required:
                - type
                - resource_token
              properties:
                type:
                  type: string
                  enum:
                    - sdk
                resource_token:
                  type: string
                  description: The payment resource token
                  example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJwYXlfNDczY3IxeTBnaGJ5YzNtMXlmYnd2bjNueHgiLCJpYXQiOjE1MTYyMzkwMjJ9.zuk299M04Racuejn5RBybpBZFSIxBPuCYWQH_mbfQoU
        _links:
          allOf:
            - $ref: '#/components/schemas/PaymentLinks'
            - type: object
              properties:
                gp:redirect:
                  $ref: '#/components/schemas/Link'
                  description: A URI to redirect the end user to
                gp:qr-code:
                  $ref: '#/components/schemas/Link'
                  description: The generated payment QR code
                  example: https://cdn.getpaid.io/qrcodes/ay7rv0p7zqv0f9arfsyr50864t.png
              example:
                gp:redirect:
                  href: https://hpp.getpaid.io/tok/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJwYXlfNDczY3IxeTBnaGJ5YzNtMXlmYnd2bjNueHgiLCJpYXQiOjE1MTYyMzkwMjJ9.zuk299M04Racuejn5RBybpBZFSIxBPuCYWQH_mbfQoU
                gp:qr-code:
                  href: https://cdn.getpaid.io/qrcodes/ay7rv0p7zqv0f9arfsyr50864t.png
    AuthorizePaymentsRequest:
      type: object
      required:
        - initial_payment_id
        - amount_minor
        - currency
        - reference
        - routing
      properties:
        initial_payment_id:
          type: string
          description: The initial CIT payment identifier to correlate the current MIT payment (which is the subsequent in the serie).
          example: pay_473cr1y0ghbyc3m1yfbwvn3nxx
        amount_minor:
          $ref: '#/components/schemas/AmountMinor'
        currency:
          $ref: '#/components/schemas/Currency'
        reference:
          $ref: '#/components/schemas/PaymentReference'
        description:
          type: string
          maxLength: 100
          description: A description of the payment. This will be displayed if using one of our hosted integration options.
          example: Your Haircutz appointment at Emma Stone Hair Salon
        routing:
          $ref: '#/components/schemas/PaymentRouting'
        urls:
          type: object
          description: URLs that are used throughout the payment process
          properties:
            webhook:
              type: string
              format: uri
              maxLength: 1024
              description: |
                The webhook endpoint to which events for this payment will be sent to.

                If ommitted, webhooks will not be sent.
              example: https://webhooks.haircutz.co/getpaid
    AuthorizePaymentsResponse:
      type: object
      required:
        - id
        - status
        - succeeded
        - _links
      properties:
        id:
          $ref: '#/components/schemas/PaymentId'
        status:
          type: string
          description: The payment status
          enum:
            - captured
            - declined
        succeeded:
          type: boolean
          description: Whether the payment was approved and completed successfully
          example: true
        reference:
          $ref: '#/components/schemas/PaymentReference'
        _links:
          allOf:
            - $ref: '#/components/schemas/PaymentLinks'
    Applicant:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          format: email
          description: The email of the merchant to be onboarded
          example: jon.smith@acme.com
        first_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The first name of the merchant to be onboarded
          example: Jon
        last_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The last name of the merchant to be onboarded
          example: Smith
    Address:
      type: object
      required:
        - line1
        - number
        - town_city
        - zip
      properties:
        line1:
          type: string
          minLength: 1
          maxLength: 300
          description: Line 1 of the address.
          example: Unit 1
        line2:
          type: string
          maxLength: 300
          description: Line 2 of the address.
          example: Taubenstraße
        number:
          type: string
          maxLength: 50
          description: Address number.
          example: 7
        town_city:
          type: string
          minLength: 2
          maxLength: 300
          description: The Town or City.
          example: Düsseldorf
        state:
          type: string
          maxLength: 300
          description: The State or County.
          example: ''
        zip:
          type: string
          minLength: 1
          maxLength: 16
          description: The Zip or Postal Code.
          example: '40479'
    BusinessProfile:
      type: object
      properties:
        legal_name:
          type: string
          description: The name of the merchant's company.
          minLength: 2
          maxLength: 300
          example: Haircutz Ltd.
        registered_address:
          $ref: '#/components/schemas/Address'
          description: The address of the merchant's company.
        registration_number_code:
          type: string
          enum:
            - DeHrb
            - DeHra
            - DeVr
            - SiTin
            - EeKmkr
          description: The registration number code of the merchant's company.
          example: DeHrb
        registration_number:
          type: string
          description: The registration number of the merchant's company.
          minLength: 1
          maxLength: 50
          example: 123456
    MerchantOnboardingIntegrationType:
      type: string
      enum:
        - hosted
        - sdk
    MerchantOnboardingIntegration:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/MerchantOnboardingIntegrationType'
    Language:
      type: string
      enum:
        - de
        - en
        - es
    InitiateMerchantApplicationRequest:
      type: object
      required:
        - applicant
        - integration
      properties:
        applicant:
          $ref: '#/components/schemas/Applicant'
          description: Details of the merchant applicant
        business:
          description: The business details
          required:
            - profile
          properties:
            profile:
              $ref: '#/components/schemas/BusinessProfile'
              description: Details of the merchant's business profile
        currencies:
          type: array
          items:
            type: string
            format: iso-4217
            description: The processing currency code according to the [ISO-4217 standard](https://en.wikipedia.org/wiki/ISO_4217)
          description: The list of currencies to be enabled for the merchant.
          example:
            - EUR
        integration:
          description: The integration type
          $ref: '#/components/schemas/MerchantOnboardingIntegration'
        language:
          $ref: '#/components/schemas/Language'
          description: The language the hosted onboarding page is displayed in.
        reference:
          type: string
          description: Your reference for the merchant.
          example: merch-001
        urls:
          type: object
          description: URLs that are used throughout the application process.
          properties:
            redirect:
              type: string
              format: uri
              maxLength: 1024
              description: |
                The URL the merchant will be redirected to after the onboarding process is completed.

                If no value is provided, no redirection will be performed and the merchant will be presented with a success message.
              example: https://haircutz.co/onboarding/complete
            webhook:
              type: string
              format: uri
              maxLength: 1024
              description: |
                The webhook endpoint to which events for this application will be sent to.

                If ommitted, webhooks will not be sent.
    ApplicationId:
      type: string
      description: The unique identifier of the application.
      example: app_44678r08jtm8zbt227tzhc4nw5
    InitiateMerchantApplicationHostedResponse:
      type: object
      title: Hosted integration type
      required:
        - id
        - merchant_id
        - _links
      properties:
        id:
          $ref: '#/components/schemas/ApplicationId'
        reference:
          type: string
          description: Your reference for the merchant
          example: merch-001
        merchant_id:
          type: string
          description: The unique identifier of the merchant
          example: acc_4zjjxn0nm1tnweqbttedkvnsc8
        _links:
          description: Links related to the application
          type: object
          required:
            - redirect
          properties:
            redirect:
              type: object
              required:
                - href
              properties:
                href:
                  type: string
                  format: url
                  description: The url for the hosted onboarding page
                  example: https://hop.getpaid.io/app_44678r08jtm8zbt227tzhc4nw5
    InitiateMerchantApplicationSdkResponse:
      type: object
      title: Sdk integration type
      required:
        - id
        - merchant_id
        - integration
      properties:
        id:
          $ref: '#/components/schemas/ApplicationId'
        reference:
          type: string
          description: Your reference for the merchant
          example: merch-001
        merchant_id:
          type: string
          description: The unique identifier of the merchant
          example: acc_4zjjxn0nm1tnweqbttedkvnsc8
        integration:
          type: object
          required:
            - resource_token
          properties:
            resource_token:
              type: string
              description: the resource scoped bearer token that can be used to access application apis
              example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhcHBfNDkyNHNhNnliOGZ4a2VicjBkNDBrOHN4bWoiLCJzdWIiOiJhY2NfNHI4dDMxMG5ocDJtZmVyZGMxd2FhMDdzNTEiLCJuYmYiOjE2Njc5OTM2NDYsImV4cCI6MTY2ODU5ODQ0NiwiaWF0IjoxNjY3OTkzNjQ2LCJpc3MiOiJodHRwczovL2FwaS5kZXYuZ2V0cGFpZC5pbyIsImF1ZCI6Imh0dHBzOi8vYXBpLmRldi5nZXRwYWlkLmlvIn0.21jy-sm4LdfevUDUBRLOE-KKOXUrefrbovTuENlqPlA
    RefreshLinkResponse:
      type: object
      required:
        - id
        - _links
      properties:
        id:
          $ref: '#/components/schemas/ApplicationId'
        _links:
          description: Links related to the application
          type: object
          required:
            - redirect
          properties:
            redirect:
              type: object
              required:
                - href
              properties:
                href:
                  type: string
                  format: url
                  description: The url for the hosted onboarding page
                  example: https://hop.getpaid.io/app_44678r08jtm8zbt227tzhc4nw5
    Amount:
      type: object
      description: The amount associated to a specific transaction.
      required:
        - amount_minor
        - currency
      properties:
        amount_minor:
          $ref: '#/components/schemas/AmountMinor'
        currency:
          $ref: '#/components/schemas/Currency'
    ProcessingFeeForPayment:
      description: |
        The processing fee of the payment. Only present once the payment has been completed.

        This fee is calculated depending on the payment method and some other parameters (such as the type of card, amount, etc.).

        Its distribution through the platform and the involved merchants is configured at the `routing`.
      allOf:
        - $ref: '#/components/schemas/Amount'
        - example:
            amount_minor: 100
    RefundableAmount:
      type: number
      description: |
        The maximum amount allowed to refund (to the buyer) in the minor currency unit (e.g. 100 cents for 1 EUR).

        Please note that this amount will always be less or equal than the one defined at the payment initiation process. It may vary depending on the initiated full/partial refunds associated to this payment.
      allOf:
        - $ref: '#/components/schemas/AmountMinor'
    ProcessingFeeForTransfer:
      description: |
        The proportional processing fee of the transfer.

        This fee will be calculated according to the `processing_fee_contribution` configured in the routing on the payment's initiation.
      allOf:
        - $ref: '#/components/schemas/Amount'
        - example:
            amount_minor: 10
    PaymentTransfer:
      description: The transfer data
      type: object
      required:
        - transfer_id
        - amount_minor
        - processing_fee
      properties:
        transfer_id:
          type: string
          description: The unique identifier of the transfer.
          example: tra_1a6po0p7zqv1q2arfsyr9548q
        amount_minor:
          $ref: '#/components/schemas/AmountMinor'
          description: |
            The transfer amount in the minor currency unit (e.g. 100 cents for 1 EUR).

            This is the amount that will be payed-out, that includes the processing fee deduction.
        processing_fee:
          $ref: '#/components/schemas/ProcessingFeeForTransfer'
    GetPaymentResponse:
      type: object
      required:
        - id
        - amount_minor
        - initiated_at
        - status
        - routing
        - _links
      properties:
        id:
          $ref: '#/components/schemas/PaymentId'
        amount_minor:
          $ref: '#/components/schemas/AmountMinor'
        currency:
          $ref: '#/components/schemas/Currency'
        initiated_at:
          type: string
          format: date-time
          description: The date/time that the payment was first initiated
        status:
          type: string
          description: The current status of the payment. See [status of the payment](https://docs.getpaid.io/payments/accept-payments#payment-status).
          enum:
            - initiated
            - started
            - authenticating
            - authentication_failed
            - authenticated
            - authorized
            - declined
            - captured
            - processing
            - not_completed
            - completed
          example: captured
        processing_fee:
          $ref: '#/components/schemas/ProcessingFeeForPayment'
        routing:
          type: object
          description: |
            Describes how the funds will be routed if the payment is successful, including processing fees after they became available.
          properties:
            platform:
              allOf:
                - $ref: '#/components/schemas/PlatformRoute'
                - type: object
                  required:
                    - refundable_amount
                    - processing_fee_contribution
                  properties:
                    refundable_amount:
                      $ref: '#/components/schemas/RefundableAmount'
                    transfer:
                      $ref: '#/components/schemas/PaymentTransfer'
                      description: The resulting transfer to the platform. Only present once the payment has been completed.
            merchants:
              type: array
              description: A set of routes to the different merchants.
              items:
                allOf:
                  - $ref: '#/components/schemas/MerchantRoute'
                  - type: object
                    required:
                      - refundable_amount
                      - processing_fee_contribution
                    properties:
                      refundable_amount:
                        $ref: '#/components/schemas/RefundableAmount'
                      transfer:
                        $ref: '#/components/schemas/PaymentTransfer'
                        description: The resulting transfer to the merchant. Only present once the payment has been completed.
        succeeded:
          type: boolean
          description: Whether the payment was approved and completed successfully
          example: true
        reference:
          $ref: '#/components/schemas/PaymentReference'
        _links:
          $ref: '#/components/schemas/PaymentLinks'
    RefundRouting:
      type: object
      description: |
        Determines from which creditors the funds will be retrieved. Only required for partial refunds.

        - Please note that the amounts routed must be less or equal than the ones defined at the `routing` object on the payment initiation process.
        - At least, one of the `platform` or `merchants` fields must be provided.

        If no value is provided, the full amount of the payment will be refunded.
      properties:
        platform:
          type: object
          description: A route to the platform.
          required:
            - amount_minor
          properties:
            amount_minor:
              description: |
                The amount to be routed in the minor currency unit (e.g. 100 cents for 1 EUR).

                Please note that the amount must be less or equal than the amount initially routed to the platform.
              allOf:
                - $ref: '#/components/schemas/AmountMinor'
        merchants:
          type: array
          description: A set of routes to the different merchants.
          minItems: 1
          items:
            type: object
            description: A route to send funds to a merchant.
            required:
              - id
              - amount_minor
            properties:
              id:
                type: string
                description: The merchant account identifier.
                example: acc_4zjjxn0nm1tnweqbttedkvnsc8
              amount_minor:
                description: |
                  The amount to be routed in the minor currency unit (e.g. 100 cents for 1 EUR).

                  Please note that the amount must be less or equal than the amount initially routed to the merchant.
                allOf:
                  - $ref: '#/components/schemas/AmountMinor'
    InitiateRefundRequest:
      type: object
      required:
        - payment_id
        - description
      properties:
        payment_id:
          $ref: '#/components/schemas/PaymentId'
        description:
          type: string
          maxLength: 100
          description: A description of the refund. This will be displayed in the bank statement. Only allowed alpha-numeric characters and some symbols (`_`, `-`, `#`).
          example: Refund for ORD-123456
        routing:
          $ref: '#/components/schemas/RefundRouting'
        reference:
          type: string
          maxLength: 50
          description: Your reference for the refund. This will never be displayed to end users.
          example: REFUND-123456
        urls:
          type: object
          description: URLs that are used throughout the refund process
          properties:
            webhook:
              type: string
              format: uri
              maxLength: 1024
              description: |
                The webhook endpoint to which events for this refund will be sent to.

                If ommitted, webhooks will not be sent.
              example: https://webhooks.haircutz.co/getpaid
    RefundId:
      description: The unique identifier of the refund.
      type: string
      example: rfd_473cr1y0ghbyc3m1yfbwvn3nxx
    RefundLinks:
      description: Links related to the refund.
      type: object
      required:
        - self
      properties:
        self:
          description: The URI of the refund.
          $ref: '#/components/schemas/Link'
      example:
        self:
          href: https://api.getpaid.io/refunds/rfd_473cr1y0ghbyc3m1yfbwvn3nxx
    InitiateRefundResponse:
      type: object
      required:
        - id
        - status
      properties:
        id:
          $ref: '#/components/schemas/RefundId'
        status:
          type: string
          description: The status of the refund.
          enum:
            - initiated
        _links:
          $ref: '#/components/schemas/RefundLinks'
    GetRefundResponse:
      type: object
      required:
        - id
        - initiated_at
        - status
        - succeeded
        - payment_id
        - amount_minor
        - currency
        - description
        - _links
      properties:
        id:
          $ref: '#/components/schemas/RefundId'
        initiated_at:
          type: string
          format: date-time
          description: The date/time that the refund was initiated.
        status:
          type: string
          description: The current status of the refund.
          enum:
            - initiated
            - started
            - completed
          example: completed
        payment_id:
          $ref: '#/components/schemas/PaymentId'
        amount_minor:
          description: The refund amount in the minor currency unit (e.g. 100 cents for 1 EUR).
          $ref: '#/components/schemas/AmountMinor'
        currency:
          $ref: '#/components/schemas/Currency'
        description:
          type: string
          maxLength: 100
          description: A description of the refund. This will be displayed in the bank statement.
          example: Refund for ORD-123456
        routing:
          $ref: '#/components/schemas/RefundRouting'
          description: |
            Determines from which creditors the funds will be retrieved. Only required for partial refunds.

            If no value is provided, the full amount of the payment will be refunded.
        reference:
          type: string
          maxLength: 50
          description: Your reference for the refund. This will never be displayed to end users.
          example: REFUND-123456
        _links:
          $ref: '#/components/schemas/RefundLinks'
    PayoutId:
      description: The unique identifier of the payout.
      type: string
      example: 0128c2184488450d8df8c458ff8e68c7
    AccountId:
      description: The unique identifier of the account.
      type: string
      example: acc_4y7rv0p7zqv0f9arfsyr50864t
    PayoutTransfer:
      description: The transfer data
      type: object
      required:
        - transfer_id
        - payment_id
        - amount_minor
        - currency
        - processing_fee
        - reference
      properties:
        transfer_id:
          type: string
          description: The unique identifier of the transfer.
          example: tra_1a6po0p7zqv1q2arfsyr9548q
        payment_id:
          type: string
          description: The unique identifier of the payment.
          example: pay_473cr1y0ghbyc3m1yfbwvn3nxx
        amount_minor:
          $ref: '#/components/schemas/AmountMinor'
          description: |
            The transfer amount in the minor currency unit (e.g. 100 cents for 1 EUR).

            This is the amount that will be payed-out, that includes the processing fee deduction.
        currency:
          $ref: '#/components/schemas/Currency'
        processing_fee:
          $ref: '#/components/schemas/ProcessingFeeForTransfer'
        reference:
          $ref: '#/components/schemas/PaymentReference'
    PayoutLinks:
      description: Links related to the payout.
      type: object
      required:
        - self
      properties:
        self:
          description: The URI of the payout.
          $ref: '#/components/schemas/Link'
      example:
        self:
          href: https://api.getpaid.io/payouts/0128c2184488450d8df8c458ff8e68c7
          methods:
            - GET
    GetPayoutResponse:
      type: object
      required:
        - id
        - account_id
        - created_at
        - transfers
        - _links
      properties:
        id:
          $ref: '#/components/schemas/PayoutId'
        account_id:
          $ref: '#/components/schemas/AccountId'
          description: The unique identifier of the account that the payout belongs to.
        created_at:
          type: string
          format: date-time
          description: The date/time when the payout was created.
        transfers:
          type: array
          description: A set of transfers included on the payout.
          minItems: 1
          items:
            $ref: '#/components/schemas/PayoutTransfer'
        _links:
          $ref: '#/components/schemas/PayoutLinks'
    SearchPayoutItem:
      type: object
      required:
        - id
        - account_id
        - _links
      properties:
        id:
          $ref: '#/components/schemas/PayoutId'
        account_id:
          $ref: '#/components/schemas/AccountId'
          description: The unique identifier of the account associated to the payout.
        _links:
          $ref: '#/components/schemas/PayoutLinks'
    BrandingConfig:
      type: object
      description: Branding details for customization
      required:
        - name
        - logo_url
        - colors
      properties:
        name:
          type: string
          description: The name of the party
          example: HairCutz
        logo_url:
          type: string
          description: The url of the platform logo
          example: https://cdn.getpaid.io/assets/4r8t310nhp2mferdc1waa07s5d.png
        colors:
          type: object
          description: The branding color configuration
          required:
            - primary
            - secondary
          properties:
            primary:
              type: string
              format: hex
              description: The primary color in Hex format
              example: '#000000'
            secondary:
              type: string
              format: hex
              description: The secondary color in Hex format
              example: '#FFFFFF'
    PaymentMethodType:
      type: string
      enum:
        - card
        - sepa_direct_debit
      description: The type of payment method to be used for the payment.
    PaymentWorkflow:
      type: object
      description: Represents the stages in the payments workflow
      required:
        - complete
      properties:
        complete:
          type: boolean
          description: Indicates whether the workflow is complete and the `next` action, if available is final
          example: false
        next:
          type: string
          format: rel
          description: The link relation for the next stage in the payments workflow
          example: hpp:authorize
    PaymentLinksBff:
      description: Links related to the payment.
      type: object
      required:
        - self
      properties:
        self:
          description: The URI of the payment.
          $ref: '#/components/schemas/Link'
      example:
        self:
          href: https://bff.getpaid.io/hpp/payment
    StartLink:
      description: |
        Link to start the payment flow.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/hpp/payment/start
    CancelLink:
      description: |
        Link to cancel the payment.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/hpp/payment/cancel
    AuthorizeLink:
      description: |
        Link to set the payment method for the payment.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/hpp/payment/authorize
    AuthenticateLink:
      description: Link to send the end-user to in order to authenticate the payment.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://api.getpaid.io/3ds/authenticate/pay_473cr1y0ghbyc3m1yfbwvn3nxx
    MandateCreationLink:
      description: Link to send the end-user to create the Sepa Direct Debit payment mandate.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/hpp/payment/sdd-mandate
    GetPaymentResponseBff:
      type: object
      required:
        - id
        - status
        - amount_minor
        - currency
        - branding
        - payment_methods
        - tokenization
        - requires_store_credentials
        - _links
      properties:
        id:
          $ref: '#/components/schemas/PaymentId'
        amount_minor:
          $ref: '#/components/schemas/AmountMinor'
        currency:
          $ref: '#/components/schemas/Currency'
        status:
          type: string
          description: The current status of the payment. See [status of the payment](https://docs.getpaid.io/payments/accept-payments#payment-status).
          enum:
            - initiated
            - started
            - authenticating
            - authentication_failed
            - authenticated
            - authorized
            - declined
            - captured
            - processing
            - not_completed
            - completed
            - refund_initiated
            - refund_completed
          example: initiated
        expires_at:
          type: string
          format: date-time
          description: The date/time that the payment expires.
        description:
          type: string
          description: The payment description that can be displayed to the end user.
          example: Your Haircutz appointment at Emma Stone Hair Salon
        branding:
          type: object
          description: The branding configuration for the payment UX.
          required:
            - platform
          properties:
            format:
              type: string
              description: The branding format
              enum:
                - platform_only
                - merchant_only
                - platform_primary
                - merchant_primary
              default: platform_only
              example: merchant_primary
            platform:
              $ref: '#/components/schemas/BrandingConfig'
            merchant:
              allOf:
                - $ref: '#/components/schemas/BrandingConfig'
                - type: object
                  example:
                    name: Emma Stone Hair Salon
                    logo_url: https://cdn.getpaid.io/assets/4y7rv0p7zqv0f9arfsyr50864t.png
                    colors:
                      primary: '#f39c12'
                      secondary: '#2c3e50'
        payment_methods:
          type: array
          description: The available payment methods for the payment, ordered by preference.
          items:
            type: object
            required:
              - type
              - name
              - description
              - icon_url
            properties:
              type:
                $ref: '#/components/schemas/PaymentMethodType'
              name:
                type: string
                description: The display name of the payment method.
                example: Card
              description:
                type: string
                description: The description of the payment method.
                example: Pay with your credit or debit card.
              icon_url:
                type: string
                format: uri
                description: The payment method logo.
                example: https://cdn.getpaid.io/assets/payment-methods/card.png
        payment_method_selected:
          $ref: '#/components/schemas/PaymentMethodType'
          description: The type of payment method used for the payment.
        tokenization:
          type: object
          description: The tokenization configuration for the card payment.
          required:
            - merchant_id
          properties:
            merchant_id:
              type: string
              description: The merchant id to be used in the tokenization process.
              example: 1234567890
        requires_store_credentials:
          type: boolean
          description: Whether the credentials should be stored for future use, typically for recursive payments.
          example: true
        customer:
          description: The customer details for the payment.
          $ref: '#/components/schemas/PaymentCustomer'
        workflow:
          allOf:
            - $ref: '#/components/schemas/PaymentWorkflow'
            - type: object
              properties:
                next:
                  example: hpp:start
        _links:
          allOf:
            - $ref: '#/components/schemas/PaymentLinksBff'
            - type: object
              properties:
                hpp:start:
                  $ref: '#/components/schemas/StartLink'
                hpp:cancel:
                  $ref: '#/components/schemas/CancelLink'
                hpp:authorize:
                  $ref: '#/components/schemas/AuthorizeLink'
                hpp:authenticate:
                  $ref: '#/components/schemas/AuthenticateLink'
                hpp:mandate:
                  $ref: '#/components/schemas/MandateCreationLink'
    StartPaymentResponse:
      type: object
      properties:
        status:
          type: string
          description: The payment status
          enum:
            - started
        workflow:
          $ref: '#/components/schemas/PaymentWorkflow'
        _links:
          type: object
          properties:
            hpp:authorize:
              $ref: '#/components/schemas/AuthorizeLink'
            hpp:cancel:
              $ref: '#/components/schemas/CancelLink'
    ThirdPartyTokenType:
      allOf:
        - $ref: '#/components/schemas/TokenType'
        - type: object
          description: Represents a token generated by a third-party TSP
          required:
            - value
            - issuer
          properties:
            value:
              type: string
              maxLength: 200
              description: The token value
              example: 7db6be255f764201aae52dfeb55897b0
            issuer:
              type: string
              maxLength: 50
              description: The identifier of the token issuer
              example: finaro
            token_data:
              type: object
              description: Additional data from the third-party TSP
              additionalProperties:
                type: string
                maxItems: 10
                maxLength: 50
              example:
                3ds_version: 2.1.0
                3ds_method: https://x3d-sim.credorax.net/acs/3ds-method
                3ds_trxid: e5a3b140-f014-4e15-b32e-2713274a7410
                response_id: 6bfb0049-82aa-48fa-88c0-5d28c4ebe691
                response_code: '0'
    GooglePayTokenType:
      type: object
      description: Google Pay Token Request
      allOf:
        - $ref: '#/components/schemas/TokenType'
        - type: object
          description: |
            The Google Pay API returns payment methods in a signed and encrypted `PaymentMethodToken` payload.
            The returned payment methods are either cards that consist of PAN, or tokenized cards that consist of device PAN and cryptograms.
          required:
            - token_data
          properties:
            token_data:
              type: object
              description: The Google Pay payment token
              required:
                - protocolVersion
                - signature
                - signedMessage
              properties:
                protocolVersion:
                  type: string
                  description: Identifies the encryption or signing scheme under which the message is created. It allows the protocol to evolve over time, if needed.
                signature:
                  type: string
                  description: Verifies that the message came from Google. It's base64-encoded, and created with ECDSA by the intermediate signing key.
                intermediateSigningKey:
                  type: object
                  description: |
                    A JSON object that contains the intermediate signing key from Google.
                    It contains the signedKey with keyValue, keyExpiration, and signatures.
                    It's serialized to simplify the intermediate signing key signature verification process.
                signedMessage:
                  type: string
                  description: A serialized JSON string containing the encryptedMessage, ephemeralPublicKey, and tag. To simplify the signature verification process, this value is serialized
              example:
                protocolVersion: ECv2
                signature: MEQCIH6Q4OwQ0jAceFEkGF0JID6sJNXxOEi4r+mA7biRxqBQAiAondqoUpU/bdsrAOpZIsrHQS9nwiiNwOrr24RyPeHA0Q==
                intermediateSigningKey:
                  signedKey: '{"keyExpiration":"1542323393147","keyValue":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/1+3HBVSbdv+j7NaArdgMyoSAM43yRydzqdg1TxodSzA96Dj4Mc1EiKroxxunavVIvdxGnJeFViTzFvzFRxyCw\u003d\u003d"}'
                  signatures:
                    - MEYCIQCO2EIi48s8VTH+ilMEpoXLFfkxAwHjfPSCVED/QDSHmQIhALLJmrUlNAY8hDQRV/y1iKZGsWpeNmIP+z+tCQHQxP0v
                signedMessage: '{"tag":"jpGz1F1Bcoi/fCNxI9n7Qrsw7i7KHrGtTf3NrRclt+U\u003d","ephemeralPublicKey":"BJatyFvFPPD21l8/uLP46Ta1hsKHndf8Z+tAgk+DEPQgYTkhHy19cF3h/bXs0tWTmZtnNm+vlVrKbRU9K8+7cZs\u003d","encryptedMessage":"mKOoXwi8OavZ"}'
    TokenType:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: The type of data to be tokenized
    TokenRequest:
      oneOf:
        - $ref: '#/components/schemas/ThirdPartyTokenType'
        - $ref: '#/components/schemas/GooglePayTokenType'
      discriminator:
        propertyName: type
        mapping:
          token: '#/components/schemas/ThirdPartyTokenType'
          googlepay: '#/components/schemas/GooglePayTokenType'
    GetPaidToken:
      type: string
      description: An opaque GetPaid token representing a tokenized payment instrument
      example: tok_47wg0ghrspj567mhvz80zvd0c3
    TokenResponse:
      type: object
      required:
        - token
      properties:
        token:
          $ref: '#/components/schemas/GetPaidToken'
    CardPaymentMethod:
      allOf:
        - $ref: '#/components/schemas/PaymentMethodBff'
        - type: object
          description: Represents a tokenized card
          required:
            - token
          properties:
            token:
              $ref: '#/components/schemas/GetPaidToken'
    SddPaymentMethod:
      allOf:
        - $ref: '#/components/schemas/PaymentMethodBff'
        - type: object
          description: Represents a sepa direct debit transaction.
          required:
            - iban
            - email
            - bank_account_type
          properties:
            iban:
              $ref: '#/components/schemas/IBAN'
            email:
              $ref: '#/components/schemas/Email'
            bank_account_type:
              $ref: '#/components/schemas/BankAccountType'
    PaymentMethodBff:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/PaymentMethodType'
    IBAN:
      type: string
      description: |
        Bank account identifier consisting of two letters country code followed by two other control digits,
        to which up to thirty alphanumeric characters are added to represent the bank account number.
      example: DE31500105172664848239
    Email:
      description: User email address.
      type: string
      format: email
      example: john.smith@example.com
    BankAccountType:
      type: string
      description: The type of the bank account.
      enum:
        - business
        - consumer
      example: business
    AuthorizePaymentRequest:
      oneOf:
        - $ref: '#/components/schemas/CardPaymentMethod'
        - $ref: '#/components/schemas/SddPaymentMethod'
      discriminator:
        propertyName: type
        mapping:
          card: '#/components/schemas/CardPaymentMethod'
          sepa_direct_debit: '#/components/schemas/SddPaymentMethod'
    AuthorizationActionRequired:
      type: object
      title: Action Required
      description: Inidicates further action is required to complete the payment
      required:
        - status
        - workflow
        - _links
      properties:
        status:
          type: string
          description: The payment status
          enum:
            - authenticating
        workflow:
          allOf:
            - $ref: '#/components/schemas/PaymentWorkflow'
            - type: object
              properties:
                next:
                  example: hpp:authenticate
        _links:
          type: object
          description: Links related to the payment
          properties:
            hpp:authenticate:
              $ref: '#/components/schemas/AuthenticateLink'
    CompleteLink:
      description: The link to redirect the end-user to on completion of the payment workflow.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://haircutz.co/checkout/complete?order_id=ORD-123456&gp_payment=pay_473cr1y0ghbyc3m1yfbwvn3nxx
    AuthorizationComplete:
      type: object
      title: Authorization Complete
      description: Inidicates the authorization is complete and no further action is required
      required:
        - status
        - succeeded
        - workflow
      properties:
        status:
          type: string
          description: The payment status
          enum:
            - authorized
            - captured
            - declined
        succeeded:
          type: boolean
          description: Whether the payment was approved and completed successfully
          example: true
        workflow:
          allOf:
            - $ref: '#/components/schemas/PaymentWorkflow'
            - type: object
              properties:
                complete:
                  example: true
                next:
                  example: hpp:complete
        _links:
          type: object
          description: Links related to the payment
          properties:
            hpp:complete:
              $ref: '#/components/schemas/CompleteLink'
    SddPaymentMethodAuthorizeInformation:
      allOf:
        - $ref: '#/components/schemas/PaymentMethodBff'
        - type: object
          description: Represents a sepa direct debit transaction.
          required:
            - iban
          properties:
            iban:
              $ref: '#/components/schemas/IBAN'
    AuthorizeInformationPaymentRequest:
      oneOf:
        - $ref: '#/components/schemas/SddPaymentMethodAuthorizeInformation'
      discriminator:
        propertyName: type
        mapping:
          sepa_direct_debit: '#/components/schemas/SddPaymentMethodAuthorizeInformation'
    SddPaymentMethodAuthorizeInformationResponse:
      allOf:
        - $ref: '#/components/schemas/PaymentMethodBff'
        - type: object
          description: Represents a sepa direct debit authorization infromation.
          properties:
            bank_account_type:
              $ref: '#/components/schemas/BankAccountType'
              description: The type of bank account of the iban if it's registered in the system.
    AuthorizeInformationPaymentResponse:
      oneOf:
        - $ref: '#/components/schemas/SddPaymentMethodAuthorizeInformationResponse'
      discriminator:
        propertyName: type
        mapping:
          sepa_direct_debit: '#/components/schemas/SddPaymentMethodAuthorizeInformationResponse'
    CancelPaymentResponse:
      type: object
      properties:
        status:
          type: string
          description: The payment status
          enum:
            - canceled
        workflow:
          allOf:
            - $ref: '#/components/schemas/PaymentWorkflow'
            - type: object
              properties:
                complete:
                  example: true
                next:
                  example: hpp:complete
        _links:
          type: object
          properties:
            hpp:complete:
              $ref: '#/components/schemas/CompleteLink'
    RegistrationNumberCodeBff:
      type: string
      description: The code of the registration number. This is an internal reference.
      enum:
        - DeHrb
        - DeHra
        - DeVr
        - SiTin
        - EeKmkr
        - Vat
    DistrictCourts:
      type: array
      items:
        type: object
        required:
          - code
          - name
        properties:
          code:
            type: string
            description: The name of the District Court without spaces or special characters.
          name:
            type: string
            description: The name of the District Court.
      example:
        - code: Aachen
          name: Aachen
        - code: Altenburg
          name: Altenburg
        - code: Amberg
          name: Amberg
        - code: Ansbach
          name: Ansbach
        - code: Apolda
          name: Apolda
        - code: Arnsberg
          name: Arnsberg
        - code: Arnstadt
          name: Arnstadt
        - code: ArnstadtZweigstelleIlmenau
          name: Arnstadt Zweigstelle Ilmenau
    SddMandateForm:
      type: object
      description: Describes the dynamic fields of the mandate step.
      required:
        - type
        - mandate_legal_mention
        - fields
      properties:
        type:
          type: string
          description: The type of the bank account.
          enum:
            - business
            - consumer
        registration_numbers:
          type: array
          description: The registration numbers of the company.
          items:
            type: object
            required:
              - code
              - name
            properties:
              code:
                description: The code of the registration number. This is an internal reference.
                $ref: '#/components/schemas/RegistrationNumberCodeBff'
              name:
                type: string
                description: The name of the registration number. This is to be displayed to the user.
                enum:
                  - HRB
                  - HRA
                  - VR
                  - TIN
                  - KMKR
                  - VAT
                example: HRB
              district_court_code:
                type: object
                required:
                  - required
                properties:
                  required:
                    type: boolean
                    description: Indicates if the district court code is required for this registration number.
                    example: true
        district_courts:
          description: The available district courts.
          $ref: '#/components/schemas/DistrictCourts'
        mandate_legal_mention:
          type: string
          description: Mandate legal mention that should be accepted by the buyer. It's customized using the company name.
        fields:
          type: array
          description: The fields which are displayed to the user on the create mandate form.
          items:
            type: string
            enum:
              - company_name
              - registration_number
              - registration_number_code
              - first_name
              - last_name
              - postal_address
    BirthDate:
      description: Date of birth of the buyer, age must be at least 16.
      type: string
      format: date
      example: '1990-01-01'
    Country:
      type: string
      format: iso-3166-alpha-2
      minLength: 2
      maxLength: 2
      description: The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the business
      example: DE
    BirthPlace:
      description: Place of birth of the buyer.
      type: object
      required:
        - city
        - country
      properties:
        city:
          description: The city of the buyer's birth place.
          type: string
          format: string
          minLength: 2
          maxLength: 50
          example: Berlin
        country:
          description: The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the buyer's birth place.
          $ref: '#/components/schemas/Country'
    ConsumerSddMandate:
      type: object
      required:
        - type
        - first_name
        - last_name
        - postal_address
        - birth_date
        - birth_place
      properties:
        type:
          type: string
          description: The type of the bank account, required to determine the correct mandate requirements. It has to match the type received in the `sdd_mandate_form` response.
          enum:
            - consumer
        first_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The first name of the buyer.
          example: John
        last_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The last name of the buyer.
          example: Doe
        birth_date:
          $ref: '#/components/schemas/BirthDate'
        birth_place:
          $ref: '#/components/schemas/BirthPlace'
        postal_address:
          description: The postal address of the buyer.
          $ref: '#/components/schemas/Address'
    RegistrationNumber:
      type: string
      description: Your company registration number, may be required based on the business type and structure.
      example: '12345678'
    BusinessSddMandate:
      type: object
      required:
        - type
        - first_name
        - last_name
        - birth_date
        - birth_place
        - postal_address
        - registration_number_code
        - registration_number
        - company_name
      properties:
        type:
          type: string
          description: The type of the bank account, required to determine the correct mandate requirements. It has to match the type received in the `sdd_mandate_form` response.
          enum:
            - business
        first_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The first name of the buyer.
          example: John
        last_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The last name of the buyer.
          example: Doe
        birth_date:
          $ref: '#/components/schemas/BirthDate'
        birth_place:
          $ref: '#/components/schemas/BirthPlace'
        postal_address:
          description: The postal address of the buyer.
          $ref: '#/components/schemas/Address'
        company_name:
          type: string
          minLength: 2
          maxLength: 150
          description: The legal name of the company.
          example: Wildcat Pumps GmbH
        registration_number_code:
          description: The type of registration number provided by the buyer.
          $ref: '#/components/schemas/RegistrationNumberCodeBff'
        registration_number:
          $ref: '#/components/schemas/RegistrationNumber'
          description: The registration number of the company.
    BusinessSddMandateDE:
      type: object
      required:
        - district_court_code
      allOf:
        - $ref: '#/components/schemas/BusinessSddMandate'
        - type: object
          properties:
            district_court_code:
              type: string
              example: Arnsberg
              description: The code of the district court where the company is registered. Can be required depending on the selected `registration_number_code`.
    SddMandateRequest:
      type: object
      oneOf:
        - type: object
          title: Consumer
          $ref: '#/components/schemas/ConsumerSddMandate'
        - type: object
          title: Non-German business
          $ref: '#/components/schemas/BusinessSddMandate'
        - type: object
          title: German business
          $ref: '#/components/schemas/BusinessSddMandateDE'
    Countries:
      type: array
      items:
        type: object
        required:
          - code
          - phone_prefix
          - name
        properties:
          code:
            type: string
            format: iso-3166-alpha-2
            maxLength: 2
            minLength: 2
          phone_prefix:
            type: string
          name:
            type: string
          eea_member:
            type: boolean
            description: This field indicates whether a country is in the European economic area or not.
      example:
        - code: AD
          phone_prefix: '376'
          name: Andorra
          eea_member: false
        - code: AE
          phone_prefix: '971'
          name: United Arab Emirates
          eea_member: false
        - code: AF
          phone_prefix: '93'
          name: Afghanistan
          eea_member: false
        - code: AG
          phone_prefix: 1-268
          name: Antigua and Barbuda
          eea_member: false
        - code: AI
          phone_prefix: 1-264
          name: Anguilla
          eea_member: false
        - code: AL
          phone_prefix: '355'
          name: Albania
          eea_member: false
        - code: AM
          phone_prefix: '374'
          name: Armenia
          eea_member: false
        - code: AO
          phone_prefix: '244'
          name: Angola
          eea_member: false
        - code: AQ
          phone_prefix: '672'
          name: Antarctica
          eea_member: false
    Platform:
      type: object
      required:
        - id
        - name
        - logo_url
        - colors
      description: Details of the platform onboarding the merchant.
      properties:
        id:
          type: string
          description: The unique identifier of the platform.
          example: acc_44678r08jtm8zbt227tzhc4nw5
        name:
          type: string
          description: The name of the platform.
          example: My Platform
        logo_url:
          type: string
          description: The url of the platform logo.
          example: http://mydomain.com/images/logo.png
        colors:
          type: object
          required:
            - primary_color
            - secondary_color
          description: The platform's color configuration.
          properties:
            primary_color:
              type: string
              description: The platform's primary color in Hex format.
              example: '#FFFFFF'
            secondary_color:
              type: string
              description: The platform's secondary color in Hex format.
              example: '#FFFFFF'
    PrefilledBusiness:
      type: object
      description: The business details.
      properties:
        country_code:
          type: string
          description: The country the company is registered in.
          example: IT
        profile:
          type: object
          description: Your business details.
          properties:
            legal_name:
              type: string
              minLength: 2
              maxLength: 300
              description: The legal name of the business.
              example: Wildcat Pumps GmbH
            registration_number:
              type: string
              description: Your company registration number.
              example: '12345678'
            vat_number:
              type: string
              description: Your company VAT number.
              example: '12345678'
            registered_address:
              type: object
              allOf:
                - $ref: '#/components/schemas/Address'
              description: The registered address of the business.
    Workflow:
      type: object
      description: Represents the stages in the application workflow.
      required:
        - complete
      properties:
        previous:
          type: string
          description: The previous stage of the application workflow.
          example: gpa:confirm-applicant
        next:
          type: string
          description: The next stage of the application workflow.
          example: gpa:business-type
        complete:
          type: boolean
          description: Indicates whether the workflow is complete and the `next` action, if available is final.
          example: false
    ConfirmApplicantLink:
      description: Link to confirm the applicant's details.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/applicant
    Initiated:
      type: object
      required:
        - id
        - language
        - platform
        - applicant
        - workflow
        - _links
      properties:
        id:
          type: string
          description: The unique identifier of the application.
          example: app_44678r08jtm8zbt227tzhc4nw5
        language:
          $ref: '#/components/schemas/Language'
          description: The language to display the hosted onboarding page.
        platform:
          $ref: '#/components/schemas/Platform'
        applicant:
          type: object
          required:
            - first_name
            - last_name
            - email
          description: Details of the individual applying for the merchant account.
          properties:
            first_name:
              type: string
              description: The first name of the applicant.
              example: John
            last_name:
              type: string
              description: The last name of the applicant.
              example: Doe
            email:
              type: string
              description: The email of the applicant.
              example: john.doe@mydomain.com
        business:
          description: The business details as provided by the platform.
          $ref: '#/components/schemas/PrefilledBusiness'
        workflow:
          $ref: '#/components/schemas/Workflow'
        _links:
          description: Links related to the application.
          type: object
          required:
            - self
            - gpa:confirm-applicant
          properties:
            self:
              description: The URI of the application.
              allOf:
                - $ref: '#/components/schemas/Link'
                - type: object
                  properties:
                    href:
                      example: https://bff.getpaid.io/smo/application
            gpa:confirm-applicant:
              $ref: '#/components/schemas/ConfirmApplicantLink'
    ApplicantDetailsLink:
      description: |
        Link to update the applicant details.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/applicant/details
    ApplicantDocumentsLink:
      description: Link to manage documents for the applicant.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/documents
    WithApplicantConfirmed:
      type: object
      allOf:
        - $ref: '#/components/schemas/Initiated'
        - type: object
          properties:
            _links:
              required:
                - gpa:applicant-details
                - gpa:applicant-documents
              properties:
                gpa:applicant-details:
                  $ref: '#/components/schemas/ApplicantDetailsLink'
                gpa:applicant-documents:
                  $ref: '#/components/schemas/ApplicantDocumentsLink'
    Gender:
      type: string
      enum:
        - male
        - female
        - na
    Pep:
      type: boolean
      example: true
      description: Politically exposed person.
    PepDescription:
      type: string
      description: Details of political exposure, required if pep is true.
      example: Brother of <name of politician>
      maxLength: 300
    RepresentativeRoles:
      type: array
      description: The roles that the individual holds at your business.
      minItems: 1
      items:
        type: string
        enum:
          - executive
          - owner
          - director
        examples:
          - executive
    ApplicantDocumentType:
      type: string
      description: The type of the document.
      enum:
        - passport
        - id
        - driving_license
        - selfie_with_id
      example: passport
    ApplicantDocument:
      type: object
      required:
        - id
        - name
        - type
        - side
        - _links
      properties:
        id:
          type: string
          description: The unique identifier of the document.
          example: doc_4wt0wrfqwz0vkatave0fkjg046
        name:
          type: string
          description: The file name.
          example: registration.pdf
        type:
          $ref: '#/components/schemas/ApplicantDocumentType'
        side:
          type: string
          description: The side of the document contained in the file.
          enum:
            - front
            - back
          example: front
        _links:
          description: Links related to the document.
          type: object
          required:
            - self
          properties:
            self:
              description: The URI of the document.
              allOf:
                - $ref: '#/components/schemas/Link'
                - type: object
                  properties:
                    href:
                      example: https://bff.getpaid.io/smo/application/applicant/documents/doc_4wt0wrfqwz0vkatave0fkjg046
    BusinessTypeLink:
      description: |
        Link to update the business type.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/business-type
    WithApplicantDetails:
      type: object
      allOf:
        - $ref: '#/components/schemas/WithApplicantConfirmed'
        - type: object
          properties:
            applicant:
              required:
                - nationality
                - gender
                - date_of_birth
                - pep
                - roles
                - documents
              properties:
                nationality:
                  $ref: '#/components/schemas/Country'
                gender:
                  $ref: '#/components/schemas/Gender'
                date_of_birth:
                  description: Date of birth of the applicant.
                  type: string
                  format: date
                pep:
                  $ref: '#/components/schemas/Pep'
                pep_description:
                  $ref: '#/components/schemas/PepDescription'
                roles:
                  $ref: '#/components/schemas/RepresentativeRoles'
                documents:
                  type: array
                  minLength: 1
                  description: Documents associated with the applicant.
                  items:
                    type: object
                    $ref: '#/components/schemas/ApplicantDocument'
            _links:
              required:
                - gpa:business-type
              properties:
                gpa:business-type:
                  $ref: '#/components/schemas/BusinessTypeLink'
    BusinessProfileLink:
      description: |
        Link to update the business profile.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/business-profile
    DocumentsLink:
      description: Link to manage documents for the application.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/documents
    WithBusinessType:
      type: object
      allOf:
        - $ref: '#/components/schemas/WithApplicantDetails'
        - type: object
          required:
            - business
          properties:
            business:
              type: object
              description: The business details.
              required:
                - country_code
                - type
                - structure
              properties:
                country_code:
                  type: string
                  description: The country the company is registered in.
                  example: IT
                type:
                  type: string
                  description: The type of business.
                  example: company
                structure:
                  type: string
                  description: The legal structure of the business.
                  example: private
            _links:
              required:
                - gpa:business-profile
                - gpa:documents
              properties:
                gpa:business-profile:
                  $ref: '#/components/schemas/BusinessProfileLink'
                gpa:documents:
                  $ref: '#/components/schemas/DocumentsLink'
    PhoneNumber:
      type: object
      required:
        - country_code
        - number
      properties:
        country_code:
          type: string
          description: The international country calling code.
          example: '+49'
        number:
          type: string
          format: string
          minLength: 3
          maxLength: 16
          description: The phone number.
          example: '555666698'
    BusinessProfile-2:
      type: object
      description: Your business details.
      required:
        - legal_name
        - registered_address
        - mcc
        - website
      properties:
        legal_name:
          type: string
          minLength: 2
          maxLength: 300
          description: The legal name of the business.
          example: Wildcat Pumps GmbH
        trading_name:
          type: string
          minLength: 2
          maxLength: 300
          description: The operating name of your company if it's different from the `legal_name`.
        registration_number:
          type: string
          description: Your company registration number.
          example: '12345678'
        vat_number:
          type: string
          description: Your company VAT number.
          example: '12345678'
        registered_address:
          type: object
          allOf:
            - $ref: '#/components/schemas/Address'
          description: The registered address of the business.
        mcc:
          type: string
          description: The merchant-category-code that best describes the goods or services the business offers.
          format: mcc
          example: '5691'
        website:
          type: string
          format: uri
          description: The business website, app store link or social media profile under which business is conducted.
          example: https://wildcatpumps.de
        phone_number:
          type: object
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
          description: Your business contact telephone number.
    RepresentativeSummary:
      type: object
      required:
        - id
        - first_name
        - last_name
        - email_address
        - roles
      description: A representative of your business.
      properties:
        id:
          type: string
          description: The representative's unique identifier.
          example: rep_48htvhp14z97m57q5ngm6d2d40
        first_name:
          type: string
          description: The representative's first name.
          example: James
        last_name:
          type: string
          description: The representative's last name.
          example: Smith
        email_address:
          type: string
          description: |
            The representative's contact email address.
            We will use this address to contact the individual with any additional verification requests.
          format: email
          example: james@wildcatpumps.de
        roles:
          type: array
          description: The roles that the individual holds at your business.
          minItems: 1
          items:
            type: string
            enum:
              - executive
              - owner
              - director
            example:
              - executive
    Business:
      type: object
      required:
        - profile
        - representatives
      properties:
        profile:
          allOf:
            - $ref: '#/components/schemas/BusinessProfile-2'
        representatives:
          type: array
          description: The business representatives.
          items:
            type: object
            $ref: '#/components/schemas/RepresentativeSummary'
    BusinessProfileDE:
      type: object
      description: Your business details.
      allOf:
        - $ref: '#/components/schemas/BusinessProfile-2'
        - type: object
          properties:
            district_court_code:
              type: string
              description: The district court (Amtsgericht) where the company is registered.
              example: Arnsberg
    BusinessDE:
      type: object
      required:
        - profile
        - representatives
      properties:
        profile:
          allOf:
            - $ref: '#/components/schemas/BusinessProfileDE'
        representatives:
          type: array
          description: The business representatives.
          items:
            type: object
            $ref: '#/components/schemas/RepresentativeSummary'
    RepresentativesLink:
      description: |
        Link to add business representatives.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/representatives
    ConfirmRepresentativesLink:
      description: |
        Link to confirm representatives.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/representatives
    WithBusinessProfile:
      type: object
      allOf:
        - $ref: '#/components/schemas/WithBusinessType'
        - type: object
          properties:
            business:
              oneOf:
                - title: Others
                  $ref: '#/components/schemas/Business'
                - title: German
                  $ref: '#/components/schemas/BusinessDE'
            _links:
              required:
                - gpa:representatives
                - gpa:confirm-representatives
              properties:
                gpa:representatives:
                  $ref: '#/components/schemas/RepresentativesLink'
                gpa:confirm-representatives:
                  $ref: '#/components/schemas/ConfirmRepresentativesLink'
    PayoutAccountLink:
      description: Link to update the payout account.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/payout-account
    WithRepresentatives:
      type: object
      allOf:
        - $ref: '#/components/schemas/WithBusinessProfile'
        - type: object
          properties:
            _links:
              required:
                - gpa:payout-account
              properties:
                gpa:payout-account:
                  $ref: '#/components/schemas/PayoutAccountLink'
    BankAccountNumber:
      type: object
      required:
        - type
        - value
      properties:
        type:
          type: string
          description: The type of the bank account number.
          enum:
            - iban
        value:
          type: string
          format: format depending on the selected type
          description: The bank account number.
          example: DE75512108001245126199
    MaskedPayoutAccount:
      type: object
      required:
        - account_number
        - account_owners_name
        - currency
      properties:
        account_number:
          description: An object representing the bank account number.
          allOf:
            - type: object
              properties:
                type:
                  type: string
                value:
                  description: The masked bank account number.
            - $ref: '#/components/schemas/BankAccountNumber'
        account_owners_name:
          type: string
          maxLength: 300
          description: The bank account owners' name.
          example: Wildcat Pumps GmbH
        currency:
          $ref: '#/components/schemas/Currency'
    SubmitLink:
      description: Link to submit the application.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://bff.getpaid.io/smo/application/submit
    WithPayoutAccount:
      type: object
      allOf:
        - $ref: '#/components/schemas/WithRepresentatives'
        - type: object
          required:
            - payout_account
          properties:
            payout_account:
              description: The payout account associated with the application.
              $ref: '#/components/schemas/MaskedPayoutAccount'
            _links:
              required:
                - gpa:submit
              properties:
                gpa:submit:
                  $ref: '#/components/schemas/SubmitLink'
    RedirectLink:
      description: The link to redirect the end-user to on completon of the onboarding workflow.
      allOf:
        - $ref: '#/components/schemas/Link'
        - type: object
          properties:
            href:
              example: https://haircutz.co/onboarding/complete&gp_application=app_44678r08jtm8zbt227tzhc4nw5
    Submitted:
      type: object
      required:
        - id
        - language
        - platform
        - workflow
        - _links
      properties:
        id:
          type: string
          description: The unique identifier of the application.
          example: app_44678r08jtm8zbt227tzhc4nw5
        language:
          $ref: '#/components/schemas/Language'
          description: The language to display the hosted onboarding page.
        platform:
          $ref: '#/components/schemas/Platform'
        workflow:
          $ref: '#/components/schemas/Workflow'
        _links:
          description: Links related to the application.
          type: object
          required:
            - self
            - gpa:redirect
          properties:
            self:
              description: The URI of the application.
              allOf:
                - $ref: '#/components/schemas/Link'
                - type: object
                  properties:
                    href:
                      example: https://bff.getpaid.io/smo/application
            gpa:redirect:
              $ref: '#/components/schemas/RedirectLink'
    GetApplicationResponse:
      type: object
      oneOf:
        - type: object
          title: Initiated
          $ref: '#/components/schemas/Initiated'
        - type: object
          title: With Applicant Confirmed
          $ref: '#/components/schemas/WithApplicantConfirmed'
        - type: object
          title: With Applicant Details
          $ref: '#/components/schemas/WithApplicantDetails'
        - type: object
          title: With Business Type
          $ref: '#/components/schemas/WithBusinessType'
        - type: object
          title: With Business Profile
          $ref: '#/components/schemas/WithBusinessProfile'
        - type: object
          title: With Representatives
          $ref: '#/components/schemas/WithRepresentatives'
        - type: object
          title: With Payout Account
          $ref: '#/components/schemas/WithPayoutAccount'
        - type: object
          title: Submitted
          $ref: '#/components/schemas/Submitted'
    ConfirmApplicantRequest:
      type: object
      required:
        - first_name
        - last_name
        - email
      properties:
        first_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The applicant's first name.
          example: Jon
        last_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The applicant's last name.
          example: Smith
        email:
          type: string
          format: email
          description: The applicant's email address.
          example: jon.smith@acme.com
    ConfirmApplicantResponse:
      type: object
      required:
        - status
        - workflow
        - _links
      properties:
        status:
          type: string
          description: The status of the application.
          enum:
            - in_progress
        workflow:
          $ref: '#/components/schemas/Workflow'
        _links:
          description: Links related to the application.
          type: object
          properties:
            gpa:confirm-applicant:
              $ref: '#/components/schemas/ConfirmApplicantLink'
            gpa:applicant-details:
              $ref: '#/components/schemas/ApplicantDetailsLink'
    UpdateApplicantDetailsRequest:
      type: object
      required:
        - nationality
        - gender
        - date_of_birth
        - pep
      properties:
        nationality:
          $ref: '#/components/schemas/Country'
        gender:
          $ref: '#/components/schemas/Gender'
        date_of_birth:
          type: string
          description: Date of birth of the applicant, age of the applicant must be at least 16
          format: date
        pep:
          $ref: '#/components/schemas/Pep'
        pep_description:
          $ref: '#/components/schemas/PepDescription'
        roles:
          $ref: '#/components/schemas/RepresentativeRoles'
    UpdateApplicantDetailsResponse:
      type: object
      required:
        - status
        - workflow
        - _links
      properties:
        status:
          type: string
          description: The status of the application.
          enum:
            - in_progress
        workflow:
          $ref: '#/components/schemas/Workflow'
        _links:
          description: Links related to the application.
          type: object
          properties:
            gpa:applicant-details:
              $ref: '#/components/schemas/ApplicantDetailsLink'
            gpa:business-type:
              $ref: '#/components/schemas/BusinessTypeLink'
    UploadApplicantDocumentRequest:
      type: object
      required:
        - file
        - type
        - side
      properties:
        file:
          type: string
          format: binary
          description: The file to upload.
        type:
          $ref: '#/components/schemas/ApplicantDocumentType'
        side:
          type: string
          enum:
            - front
            - back
          example: back
    UploadApplicantDocumentResponse:
      type: object
      required:
        - id
        - _links
      properties:
        id:
          type: string
          description: The unique identifier of the document.
          example: doc_4wt0wrfqwz0vkatave0fkjg046
        _links:
          description: Links related to the document.
          type: object
          required:
            - self
          properties:
            self:
              description: The URI of the document.
              allOf:
                - $ref: '#/components/schemas/Link'
                - type: object
                  properties:
                    href:
                      example: https://bff.getpaid.io/smo/application/applicant/documents/doc_4wt0wrfqwz0vkatave0fkjg046
    UpdateBusinessTypeRequest:
      type: object
      required:
        - type
        - country_code
      properties:
        type:
          type: string
          description: The type of business.
          example: company
        structure:
          type: string
          description: The structure of the business.
          example: private
        country_code:
          $ref: '#/components/schemas/Country'
    UpdateBusinessTypeResponse:
      type: object
      required:
        - status
        - workflow
        - _links
      properties:
        status:
          type: string
          description: The status of the application.
          enum:
            - in_progress
        workflow:
          allOf:
            - $ref: '#/components/schemas/Workflow'
            - type: object
              properties:
                previous:
                  example: gpa:business-type
                next:
                  example: gpa:business-profile
        _links:
          description: Links related to the application.
          type: object
          properties:
            gpa:confirm-applicant:
              $ref: '#/components/schemas/ConfirmApplicantLink'
            gpa:business-type:
              $ref: '#/components/schemas/BusinessTypeLink'
            gpa:business-profile:
              $ref: '#/components/schemas/BusinessProfileLink'
            gpa:documents:
              $ref: '#/components/schemas/DocumentsLink'
    RegistrationNumberCode:
      type: string
      description: The code of the registration number. This is an internal reference.
      enum:
        - DeHrb
        - DeHra
        - DeVr
        - SiTin
        - EeKmkr
    UpdateBusinessProfile:
      type: object
      description: Your business details.
      required:
        - legal_name
        - registered_address
        - mcc
        - website
      properties:
        legal_name:
          type: string
          minLength: 2
          maxLength: 300
          description: The legal name of the business.
          example: Wildcat Pumps GmbH
        trading_name:
          type: string
          minLength: 2
          maxLength: 300
          description: The operating name of your company if it's different from the `legal_name`.
          example: ''
        registration_number_code:
          $ref: '#/components/schemas/RegistrationNumberCode'
        registration_number:
          $ref: '#/components/schemas/RegistrationNumber'
          example: '12345678'
        vat_number:
          type: string
          description: Your company VAT number, may be required based on the business type, structure or entity type (merchant/platform).
          example: IT12345678
        registered_address:
          $ref: '#/components/schemas/Address'
          description: The registered address of the business.
        mcc:
          type: string
          description: The merchant-category-code that best describes the goods or services the business offers.
          format: mcc
          example: '5691'
        website:
          type: string
          format: uri
          description: The business website, app store link or social media profile under which business is conducted.
          example: https://wildcatpumps.de
        phone_number:
          type: object
          allOf:
            - $ref: '#/components/schemas/PhoneNumber'
          description: Your business contact telephone number.
    UpdateBusinessProfileGerman:
      type: object
      description: The request body parameters for updating a business profile for a German business.
      required:
        - district_court_code
      allOf:
        - $ref: '#/components/schemas/UpdateBusinessProfile'
        - type: object
          properties:
            legal_name:
              type: string
              minLength: 2
              maxLength: 300
              description: The legal name of the business.
              example: Wildcat Pumps GmbH
            trading_name:
              type: string
              minLength: 2
              maxLength: 300
              description: The operating name of your company if it's different from the `legal_name`.
              example: ''
            registration_number:
              $ref: '#/components/schemas/RegistrationNumber'
              format: HRB|HRA|VR
              example: HRB 12345
            district_court_code:
              type: string
              description: The district court (Amtsgericht) where the company is registered.
              example: Arnsberg
            vat_number:
              type: string
              description: Your company VAT number, may be required based on the business type, structure or entity type (merchant/platform).
              example: DE12345678
    UpdateBusinessProfileRequest:
      type: object
      oneOf:
        - type: object
          title: Non-German business
          $ref: '#/components/schemas/UpdateBusinessProfile'
        - type: object
          title: German business
          $ref: '#/components/schemas/UpdateBusinessProfileGerman'
    UpdateBusinessProfileResponse:
      type: object
      required:
        - status
        - workflow
        - _links
      properties:
        status:
          type: string
          description: The status of the application.
          enum:
            - in_progress
        workflow:
          allOf:
            - $ref: '#/components/schemas/Workflow'
            - type: object
              properties:
                previous:
                  example: gpa:business-profile
                next:
                  example: gpa:representatives
        _links:
          description: Links related to the application.
          type: object
          properties:
            gpa:confirm-applicant:
              $ref: '#/components/schemas/ConfirmApplicantLink'
            gpa:business-type:
              $ref: '#/components/schemas/BusinessTypeLink'
            gpa:business-profile:
              $ref: '#/components/schemas/BusinessProfileLink'
            gpa:representatives:
              $ref: '#/components/schemas/RepresentativesLink'
    CompanyDocumentType:
      type: string
      description: The type of the file to be uploaded.
      enum:
        - company_registration
        - bank_account_proof
      example: company_registration
    UploadDocumentRequest:
      type: object
      required:
        - file
        - type
      properties:
        file:
          type: string
          format: binary
          description: The file to upload.
        type:
          $ref: '#/components/schemas/CompanyDocumentType'
    UploadDocumentResponse:
      type: object
      required:
        - id
        - _links
      properties:
        id:
          type: string
          description: The unique identifier of the document.
          example: doc_4wt0wrfqwz0vkatave0fkjg046
        _links:
          description: Links related to the document.
          type: object
          required:
            - self
          properties:
            self:
              description: The URI of the document.
              allOf:
                - $ref: '#/components/schemas/Link'
                - type: object
                  properties:
                    href:
                      example: https://bff.getpaid.io/smo/application/documents/doc_4wt0wrfqwz0vkatave0fkjg046
    AddRepresentativeRequest:
      type: object
      required:
        - first_name
        - last_name
        - email
        - roles
        - date_of_birth
        - pep
      description: A representative of your business.
      properties:
        first_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The representative's first name.
          example: James
        last_name:
          type: string
          format: string
          minLength: 2
          maxLength: 50
          description: The representative's last name.
          example: Smith
        email:
          type: string
          description: |
            The representative's contact email address.
            We will use this address to contact the individual with any additional verification requests.
          format: email
          example: james@wildcatpumps.de
        roles:
          $ref: '#/components/schemas/RepresentativeRoles'
        date_of_birth:
          type: string
          description: Date of birth of the representative, age of the representative must be at least 16.
          format: date
        nationality:
          $ref: '#/components/schemas/Country'
        pep:
          $ref: '#/components/schemas/Pep'
        pep_description:
          $ref: '#/components/schemas/PepDescription'
    RepresentativeStatus:
      type: string
      description: The status of the representative.
      enum:
        - awaiting_documents
        - verifying
        - verified
      example: awaiting_documents
    AddRepresentativeResponse:
      type: object
      required:
        - id
        - status
        - workflow
        - _links
      properties:
        id:
          type: string
          description: The unique identifier of the business representative.
          example: rep_48htvhp14z97m57q5ngm6d2d40
        status:
          $ref: '#/components/schemas/RepresentativeStatus'
        workflow:
          allOf:
            - $ref: '#/components/schemas/Workflow'
            - type: object
              properties:
                previous:
                  example: gpa:representatives
                next:
                  example: gpa:confirm-representatives
        _links:
          type: object
          required:
            - self
          properties:
            self:
              description: URI of the representative.
              allOf:
                - $ref: '#/components/schemas/Link'
                - type: object
                  properties:
                    href:
                      example: https://bff.getpaid.io/smo/application/representative/rep_48htvhp14z97m57q5ngm6d2d40
            gpa:representatives:
              $ref: '#/components/schemas/RepresentativesLink'
            gpa:confirm-representatives:
              $ref: '#/components/schemas/ConfirmRepresentativesLink'
    ConfirmRepresentativesResponse:
      type: object
      required:
        - status
        - workflow
        - _links
      properties:
        status:
          type: string
          description: The status of the application.
          enum:
            - in_progress
        workflow:
          allOf:
            - $ref: '#/components/schemas/Workflow'
            - type: object
              properties:
                previous:
                  example: gpa:representatives
                next:
                  example: gpa:payout-account
        _links:
          description: Links related to the application.
          type: object
          properties:
            gpa:confirm-applicant:
              $ref: '#/components/schemas/ConfirmApplicantLink'
            gpa:business-type:
              $ref: '#/components/schemas/BusinessTypeLink'
            gpa:business-profile:
              $ref: '#/components/schemas/BusinessProfileLink'
            gpa:representatives:
              $ref: '#/components/schemas/RepresentativesLink'
            gpa:confirm-representatives:
              $ref: '#/components/schemas/ConfirmRepresentativesLink'
            gpa:payout-account:
              $ref: '#/components/schemas/PayoutAccountLink'
    PayoutAccount:
      type: object
      required:
        - type
        - account_number
        - account_owners_name
        - currency
      properties:
        account_number:
          description: An object representing the bank account number.
          $ref: '#/components/schemas/BankAccountNumber'
        account_owners_name:
          type: string
          maxLength: 300
          description: The bank account owners' name.
          example: Wildcat Pumps GmbH
        currency:
          $ref: '#/components/schemas/Currency'
    UpdatePayoutAccountRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/PayoutAccount'
    UpdatePayoutAccountResponse:
      type: object
      required:
        - status
        - workflow
        - _links
      properties:
        status:
          type: string
          description: The status of the application.
          enum:
            - in_progress
        workflow:
          allOf:
            - $ref: '#/components/schemas/Workflow'
            - type: object
              properties:
                previous:
                  example: gpa:payout-account
                next:
                  example: gpa:submit
        _links:
          description: Links related to the application.
          type: object
          properties:
            gpa:confirm-applicant:
              $ref: '#/components/schemas/ConfirmApplicantLink'
            gpa:business-type:
              $ref: '#/components/schemas/BusinessTypeLink'
            gpa:business-profile:
              $ref: '#/components/schemas/BusinessProfileLink'
            gpa:representatives:
              $ref: '#/components/schemas/RepresentativesLink'
            gpa:confirm-representatives:
              $ref: '#/components/schemas/ConfirmRepresentativesLink'
            gpa:payout-account:
              $ref: '#/components/schemas/PayoutAccountLink'
            gpa:submit:
              $ref: '#/components/schemas/SubmitLink'
    SubmitApplicationResponse:
      type: object
      required:
        - status
        - workflow
        - _links
      properties:
        status:
          type: string
          description: The status of the application.
          enum:
            - submitted
        workflow:
          allOf:
            - $ref: '#/components/schemas/Workflow'
          example:
            complete: true
        _links:
          description: Links related to the application.
          type: object
          properties:
            self:
              description: The URI of the application
              allOf:
                - $ref: '#/components/schemas/Link'
                - type: object
                  properties:
                    href:
                      example: https://bff.getpaid.io/smo/application
            gpa:redirect:
              $ref: '#/components/schemas/RedirectLink'
    Mccs:
      type: array
      items:
        type: object
        required:
          - code
          - description
        properties:
          code:
            type: string
            format: mcc
            maxLength: 4
            minLength: 4
          description:
            type: string
      example:
        - code: '0742'
          description: Veterinary services
        - code: '0763'
          description: Agricultural co-operatives
        - code: '0780'
          description: Landscaping and horticultural services
        - code: '1520'
          description: General contractors – residential & commercial
        - code: '1711'
          description: Heating, plumbing, and air conditioning contractors
        - code: '1731'
          description: Electrical contractors
        - code: '1740'
          description: Masonry, stonework, tile setting, plastering & insulation contractors
        - code: '1750'
          description: Carpentry contractors
    SelectItem:
      type: object
      required:
        - value
        - label
      properties:
        value:
          type: string
          description: The item value.
        label:
          type: string
          description: The item label.
    GetBusinessTypesResponse:
      type: object
      properties:
        items:
          type: array
          description: The business types.
          minItems: 1
          items:
            allOf:
              - $ref: '#/components/schemas/SelectItem'
              - type: object
                properties:
                  children:
                    properties:
                      items:
                        type: array
                        description: The business type structures.
                        items:
                          $ref: '#/components/schemas/SelectItem'
                      default_value:
                        type: string
                        description: The default value to be displayed.
        default_value:
          type: string
          description: The default value to be displayed.
      example:
        default_value: company
        items:
          - value: company
            label: Company
            children:
              default_value: llp
              items:
                - value: llp
                  label: LLP
                - value: unincorporated
                  label: Unincorporated
                - value: private
                  label: Private
          - value: individual_sole_trader
            label: Individual or Sole Trader
          - value: non_profit
            label: Non-profit
            children:
              default_value: charitable_company
              items:
                - value: charitable_company
                  label: Charitable Company
                - value: unincorporated
                  label: Unincorporated
                - value: other
                  label: Other
    FormFieldConfiguration:
      type: object
      required:
        - required
      properties:
        required:
          description: Indicates whether the field is required.
          type: boolean
          example: true
    GetBusinessProfileFormResponse:
      type: object
      description: Describes the dynamic fields of the business profile step.
      properties:
        registration_number:
          description: Configuration for the registration number field.
          allOf:
            - $ref: '#/components/schemas/FormFieldConfiguration'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  description: The type of the registration number to support different formats and enable validation.
                  enum:
                    - DeHrb
                    - DeHra
                    - DeVr
                    - SiTin
                    - EeKmkr
        vat_number:
          description: Configuration for the VAT number field.
          allOf:
            - $ref: '#/components/schemas/FormFieldConfiguration'
        district_court_code:
          description: Configuration for the district court field.
          allOf:
            - $ref: '#/components/schemas/FormFieldConfiguration'
    refund-webhook-data:
      description: The event data
      type: object
      required:
        - refund_id
        - payment_id
        - amount_minor
        - currency
      properties:
        refund_id:
          description: The unique identifier of the refund.
          type: string
          example: rfd_4x7as7q1zqv3f9qamnyr69852t
        payment_id:
          type: string
          description: The unique identifier of the payment.
          example: pay_473cr1y0ghbyc3m1yfbwvn3nxx
        amount_minor:
          description: The refund amount in the minor currency unit (e.g. 100 cents for 1 EUR).
          allOf:
            - $ref: '#/components/schemas/AmountMinor'
        currency:
          $ref: '#/components/schemas/Currency'
        reference:
          type: string
          maxLength: 50
          description: Your reference for the refund. This will never be displayed to end users.
          example: REF-123456
    transfer-webhook-data:
      description: The event data
      type: object
      required:
        - transfer_id
        - payment_id
        - account_id
        - amount_minor
        - processing_fee
        - currency
        - reference
      properties:
        transfer_id:
          type: string
          description: The unique identifier of the transfer.
          example: tra_1a6po0p7zqv1q2arfsyr9548q
        payment_id:
          type: string
          description: The unique identifier of the payment.
          example: pay_473cr1y0ghbyc3m1yfbwvn3nxx
        account_id:
          $ref: '#/components/schemas/AccountId'
          description: The unique identifier of the account whose transfer is related.
        payout_id:
          $ref: '#/components/schemas/PayoutId'
          description: The unique identifier of the payout. This value is included in the bank statement description of the grouped transfers.
        amount_minor:
          $ref: '#/components/schemas/AmountMinor'
          description: The transfer amount in the minor currency unit (e.g. 100 cents for 1 EUR).
        currency:
          $ref: '#/components/schemas/Currency'
        processing_fee:
          $ref: '#/components/schemas/ProcessingFeeForTransfer'
        reference:
          $ref: '#/components/schemas/PaymentReference'
    MerchantId:
      description: The unique identifier of the merchant account.
      type: string
      example: acc_4zjjxn0nm1tnweqbttedkvnsc8
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: |
        An idempotency key to allow safe retrying without the operation being performed multiple times.
        The value should be unique for each operation, e.g. a UUID, with the same key being sent on a retry of the same request.
      schema:
        type: string
        example: 5c255194-30ec-11ed-a261-0242ac120002
  headers:
    TraceId:
      description: The trace identifier for the request. It is a good idea to log this and provide it with any support requests.
      schema:
        type: string
        example: 96ce50247f87f540bb2d86771b3728b8
    Version:
      description: The version of the GetPaid API.
      schema:
        type: string
        format: semver
        example: 1.0.2
  responses:
    ProblemInvalidParameters:
      description: Invalid Parameters
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                required:
                  - errors
                properties:
                  errors:
                    type: object
                    description: The JSON path of any request body fields or header names that are invalid with a description of the error
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    example:
                      currency:
                        - currency_invalid
                  type:
                    example: https://docs.getpaid.io/overview/getting-started#422---invalid-parameters
                  title:
                    example: Invalid Parameters
                  status:
                    example: 422
    ProblemConflict:
      description: Conflict
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                properties:
                  type:
                    example: https://docs.getpaid.io/overview/getting-started#409---conflict
                  title:
                    example: Conflict
                  status:
                    example: 409
                  detail:
                    example: Request cannot be completed due to the current state of the server
    ProblemInvalidParametersRefunds:
      description: Invalid Parameters
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                required:
                  - errors
                properties:
                  errors:
                    type: object
                    description: The JSON path of any request body fields or header names that are invalid with a description of the error
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    example:
                      payment_id:
                        - payment_id_invalid
                  type:
                    example: https://docs.getpaid.io/overview/getting-started#422---invalid-parameters
                  title:
                    example: Invalid Parameters
                  status:
                    example: 422
    ProblemNotFound:
      description: Not found
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                properties:
                  type:
                    example: https://docs.getpaid.io/overview/getting-started#404---not-found
                  title:
                    example: Not Found
                  status:
                    example: 404
                  trace_id:
                    example: 00-f1671379f53264cd8e8338a6c7944350-f4b3f0e493a36088-00
    ProblemForbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Problem'
              - type: object
                properties:
                  type:
                    example: https://docs.getpaid.io/overview/getting-started#403---forbidden
                  title:
                    example: Forbidden
                  status:
                    example: 403
                  detail:
                    example: applicant_documents_not_uploaded
x-tagGroups:
  - name: General
    tags:
      - Authentication
  - name: Payments
    tags:
      - Payments
      - Payment Webhooks
  - name: Payouts
    tags:
      - Payouts
      - Payout Webhooks
  - name: Refunds
    tags:
      - Refunds
      - Refund Webhooks
  - name: Merchants
    tags:
      - Onboarding
      - Application Webhooks
  - name: Client APIs
    tags:
      - Merchant onboarding
      - Hosted Payment Page
