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

# Initiate a payment for an embedded flow using payment_token (query or body) and selected bank

> Initiate a payment for an embedded flow using payment_token (query or body) and selected bank



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/embedded/payment-initiation
openapi: 3.1.0
info:
  title: Quidkey API
  version: 1.0.0
  description: API documentation for Quidkey Core Services
servers:
  - url: https://core.quidkey.com
    description: Production
security: []
paths:
  /api/v1/embedded/payment-initiation:
    post:
      tags:
        - Embedded
      summary: >-
        Initiate a payment for an embedded flow using payment_token (query or
        body) and selected bank
      description: >-
        Initiate a payment for an embedded flow using payment_token (query or
        body) and selected bank
      requestBody:
        required: true
        description: Request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/paymentInitiation_Input'
            example:
              bankId: 123e4567-e89b-12d3-a456-426614174000
              paymentScheme: null
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInitiation_Response'
              example:
                success: true
                data:
                  order_id: '123'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shared_Error400'
              example:
                success: false
                error:
                  message: Invalid input provided
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shared_Error401'
              example:
                success: false
                error:
                  message: Invalid input provided
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shared_Error404'
              example:
                success: false
                error:
                  message: Invalid input provided
components:
  schemas:
    paymentInitiation_Input:
      anyOf:
        - type: object
          required:
            - bankId
          properties:
            bankId:
              format: uuid
              description: The selected bank ID for redirect-based payment flows
              examples:
                - 123e4567-e89b-12d3-a456-426614174000
              type: string
            paymentScheme:
              description: >-
                Payment scheme selected by user. null = use default scheme for
                customer country, explicit value = user choice
              examples:
                - null
                - SEPA_CREDIT_TRANSFER
                - MULTIBANCO
              anyOf:
                - type: 'null'
                - title: Payment Scheme Type
                  description: The type of payment scheme
                  examples:
                    - SEPA_CREDIT_TRANSFER
                    - MULTIBANCO
                    - FASTER_PAYMENTS
                    - DANISH_DOMESTIC_CREDIT_TRANSFER
                    - BECS
                    - ACH
                  anyOf:
                    - const: SEPA_CREDIT_TRANSFER
                      type: string
                    - const: MULTIBANCO
                      type: string
                    - const: DANISH_DOMESTIC_CREDIT_TRANSFER
                      type: string
                    - const: FASTER_PAYMENTS
                      type: string
                    - const: BACS
                      type: string
                    - const: BECS
                      type: string
                    - const: ACH
                      type: string
            clientEvidence:
              additionalProperties: false
              type: object
              properties:
                fingerprint:
                  type: string
                timezone:
                  type: string
                checkout_page_version:
                  type: string
                payment_terms_agreement_id:
                  format: uuid
                  description: >-
                    The Agreement.id of the ACH Authorization (Payment Terms)
                    that the checkout page showed the customer. Server validates
                    it resolves to a kind=ach_authorization agreement.
                  type: string
                payment_page_url:
                  type: string
                authorization_language:
                  maxLength: 4096
                  description: >-
                    Exact click-wrap text rendered next to Pay at the moment of
                    acceptance. Stored verbatim on the EvidenceRecord so the
                    stored evidence matches what the customer saw.
                  type: string
        - type: object
          required:
            - customerBankAccountId
          properties:
            customerBankAccountId:
              format: uuid
              description: The selected customer bank account ID for direct payment flows
              examples:
                - 123e4567-e89b-12d3-a456-426614174000
              type: string
            paymentScheme:
              description: >-
                Payment scheme selected by user. null = use default scheme for
                customer country, explicit value = user choice
              examples:
                - null
                - SEPA_CREDIT_TRANSFER
                - MULTIBANCO
              anyOf:
                - type: 'null'
                - title: Payment Scheme Type
                  description: The type of payment scheme
                  examples:
                    - SEPA_CREDIT_TRANSFER
                    - MULTIBANCO
                    - FASTER_PAYMENTS
                    - DANISH_DOMESTIC_CREDIT_TRANSFER
                    - BECS
                    - ACH
                  anyOf:
                    - const: SEPA_CREDIT_TRANSFER
                      type: string
                    - const: MULTIBANCO
                      type: string
                    - const: DANISH_DOMESTIC_CREDIT_TRANSFER
                      type: string
                    - const: FASTER_PAYMENTS
                      type: string
                    - const: BACS
                      type: string
                    - const: BECS
                      type: string
                    - const: ACH
                      type: string
            clientEvidence:
              additionalProperties: false
              type: object
              properties:
                fingerprint:
                  type: string
                timezone:
                  type: string
                checkout_page_version:
                  type: string
                payment_terms_agreement_id:
                  format: uuid
                  description: >-
                    The Agreement.id of the ACH Authorization (Payment Terms)
                    that the checkout page showed the customer. Server validates
                    it resolves to a kind=ach_authorization agreement.
                  type: string
                payment_page_url:
                  type: string
                authorization_language:
                  maxLength: 4096
                  description: >-
                    Exact click-wrap text rendered next to Pay at the moment of
                    acceptance. Stored verbatim on the EvidenceRecord so the
                    stored evidence matches what the customer saw.
                  type: string
    paymentInitiation_Response:
      type: object
      required:
        - success
        - data
      properties:
        success:
          description: Indicates if the request was successful
          examples:
            - true
          type: boolean
        data:
          title: Payment Initiation Data
          description: Payment initiation response data
          additionalProperties: false
          type: object
          properties:
            order_id:
              description: The unique identifier of the order of the payment request
              examples:
                - '123'
              type: string
    shared_Error400:
      title: Bad Request Error
      description: 400 Bad Request Error Response
      type: object
      required:
        - success
        - error
      properties:
        success:
          description: Always false for error responses
          examples:
            - false
          const: false
          type: boolean
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              allOf:
                - description: Error code for the specific error type
                  examples:
                    - INVALID_INPUT
                  type: string
                - description: Error code for the specific error type
                  examples:
                    - VALIDATION_ERROR
                  type: string
            message:
              description: Human-readable error message
              examples:
                - Invalid input provided
              type: string
            metadata:
              additionalProperties: true
              description: >-
                Additional error context. For VALIDATION_ERROR, includes a
                per-field `errors` array.
              type: object
              properties:
                errors:
                  type: array
                  items:
                    type: object
                    required:
                      - field
                      - message
                    properties:
                      field:
                        type: string
                      message:
                        type: string
    shared_Error401:
      title: Unauthorized Error
      description: 401 Unauthorized Error Response
      type: object
      required:
        - success
        - error
      properties:
        success:
          description: Always false for error responses
          examples:
            - false
          const: false
          type: boolean
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              allOf:
                - description: Error code for the specific error type
                  examples:
                    - INVALID_INPUT
                  type: string
                - const: UNAUTHORIZED
                  type: string
            message:
              description: Human-readable error message
              examples:
                - Invalid input provided
              type: string
    shared_Error404:
      title: Not Found Error
      description: 404 Not Found Error Response
      type: object
      required:
        - success
        - error
      properties:
        success:
          description: Always false for error responses
          examples:
            - false
          const: false
          type: boolean
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              allOf:
                - description: Error code for the specific error type
                  examples:
                    - INVALID_INPUT
                  type: string
                - description: Error code for resource not found
                  examples:
                    - MERCHANT_NOT_FOUND
                    - BANK_NOT_FOUND
                  type: string
            message:
              description: Human-readable error message
              examples:
                - Invalid input provided
              type: string

````