openapi: 3.0.0
info:
  title: PSP API
  contact:
    name: API Integration Support
    email: integration@dintero.com
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
  description: |
    # Changelog

    All notable changes to the API.

    ## 2026-09-09

    > Rename P2P payment system to Transfer. Add endpoint to finalize/authorize a Transfer after strong customer authentication has completed.
    >
    > - [POST /transfer/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/transfer/transferPost_Transfer_Transaction)
    > - [POST /transfer/v1/{account_id}/payments/{payment_id}/transactions/{transaction_id}/authorization](/psp-api/transaction/transferPost_Transfer_Authorization)

    ## 2026-09-07

    > Add new payment system for P2P payments. Update P2P transaction endpoint to support passing Dintero token ID.
    >
    > - [POST /payments/v1/{account_id}](/psp-api/payment/paymentPost_Payment)
    > - [POST /p2p/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/transfer/transferPost_Transfer_Transaction)

    ## 2026-09-03

    > Add new schemas for encrypted card data payloads.
    > Add new endpoint to perform P2P transaction via Visa Direct or Mastercard Send.
    >
    > Update payment endpoint to accept recipient information. Will be required for P2P payments.
    >
    > Update authorization endpoint to support returning P2P result.
    >
    > - [POST /p2p/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/transfer/transferPost_Transfer_Transaction)
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)
    > - [POST /payments/v1/{account_id}](/psp-api/payment/paymentPost_Payment)

    ## 2026-09-01

    > Add support for card brand Maestro on `mastercard_token_service` and `sandbox_token_service` token provisioning
    >
    > - [POST /payments/v1/{account_id}](/psp-api/payment/paymentPost_Payment)

    ## 2026-08-31

    > Add support for card brand Maestro on `dintero_psp.applepay` payment
    >
    > - [POST /payments/v1/{account_id}](/psp-api/payment/paymentPost_Payment)

    ## 2026-06-15

    > Add `payment_account_reference` to authorization, pre-authorization and sale response `operation_data`.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)

    ## 2026-06-10

    > Deprecate `expiry_year` and `expiry_month`. Replace with `pan_expiry_month`, `pan_expiry_year`, `token_expiry_month` and `token_expiry_month`.
    > `token_expiry_month` and `token_expiry_month` will only be set for token transactions. `pan_expiry_month` and `pan_expiry_year` will be
    > set for card transactions and token transactions where we have the card expiration date.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)

    ## 2026-04-28

    > Add support for `message_version` as query parameter and in returned value.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/3d-secure-method-complete](/psp-api/3-d-secure/3D-securePost_3D_Secure_Method)
    > - [POST /transactions/v1/{account_id}/{transaction_id}/3d-secure-challenge-complete](/psp-api/3-d-secure/3D-securePost_3D_Secure_Challenge)
    > - [POST /transactions/v1/{account_id}/{transaction_id}/3d-secure-notification-url](/psp-api/3-d-secure/3D-secureNotificationUrl)
    > - [POST /transactions/v1/{account_id}/{transaction_id}/3d-secure-init](/psp-api/3-d-secure/3D-securePost_3D_Secure_Init)


    ## 2026-04-20

    > Add optional field, `urls`, to payment configuration. Contains `authorization`, which is a URL for where to perform
    > authorization via Checkout.
    >
    > - [POST /payments/v1/{account_id}](/psp-api/payment/paymentPost_Payment)

    ## 2026-04-15

    > Add `authorization` operation for Google Pay. Add `operations` for SCA to authorization error result data.
    >
    > - [POST /google-pay/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/google-pay/googlePayPost_Google_Pay_Transaction)
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)

    ## 2026-03-02

    > Add `SECURE_3D_FAILED` error response to 3D Secure method complete.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/3d-secure-method-complete](/psp-api/3-d-secure/3D-securePost_3D_Secure_Method)
    >
    > Add `generate_payment_token_config` to token settings
    >
    > - [POST /payments/v1/{account_id}](/psp-api/payment/paymentPost_Payment)

    ## 2026-02-10

    > Add `network_settlement_ref` to sale operation data
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)
    > - [GET /transactions/v1/{account_id}/{transaction_id}](/psp-api/transaction/transactionGet_Transaction)
    >
    > Add `charge` and `deferred-debit` as possible values for `card_type`.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)
    > - [GET /transactions/v1/{account_id}/{transaction_id}](/psp-api/transaction/transactionGet_Transaction)
    > - [POST /tokens/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/transaction/cardPost_Token_Transaction)
    >
    > Add optional field `condition` in the request body for void. If set to true the void should fail if
    > there are authorization operations.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/void](/psp-api/transaction/transactionPost_Void)

    ## 2026-01-30

    > Add optional field `authorization_expiration` and `extended_authorization` to transaction operation data for authorizations.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)

    ## 2026-01-15

    > Add optional fields `network_result_code` and `network_approved` to transaction operation result for void transaction.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/void](/psp-api/transaction/transactionPost_Void)

    ## 2025-12-20

    > Add `error_code` and `network_code` to transaction operation result for failures.
    > `error_code` is a standardized error code, while `network_code` will be the response code
    > from the card network. Reason will start containing a more human readable reason that should
    > be used along with the error code.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)
    > - [POST /tokens/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/transaction/cardPost_Token_Transaction)

    ## 2025-11-31

    > Add support for card brand Maestro on `dintero_psp.creditcard` payment
    >
    > - [POST /payments/v1/{account_id}](/psp-api/payment/paymentPost_Payment)

    ## 2025-11-05

    > Add support for passing `test_processor` to override processor for a specific payment system
    > for a T-account, to enable using the payment systems own test environment for a T-account.
    >
    > - [POST /payments/v1/{account_id}](/psp-api/payment/paymentPost_Payment)

    ## 2025-10-10

    > Change to expect JWS string as `payment_data`
    >
    > - [POST /visa-click-to-pay/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/visaclicktopay/visaClickToPayPost_Visa_C2P_Transaction)

    > Add response schema 409 Conflict
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)
    > - [POST /transactions/v1/{account_id}/{transaction_id}/capture](/psp-api/transaction/transactionPost_Capture)
    > - [POST /transactions/v1/{account_id}/{transaction_id}/refund](/psp-api/transaction/transactionPost_Refund)
    > - [POST /transactions/v1/{account_id}/{transaction_id}/void](/psp-api/transaction/transactionPost_Void)
    > - [POST /tokens/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/transaction/cardPost_Token_Transaction)

    > Add support for pre-authorization on MIT, by setting new property `configuration.pre_authorization = true` when creating the payment.
    >
    > - [POST /payments/v1/{account_id}](/psp-api/payment/paymentPost_Payment)
    > - [POST /tokens/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/transaction/cardPost_Token_Transaction)

    ## 2025-10-02

    > Move `/token/v1` to `/tokens/v1` to align with other endpoints.
    >
    > - [POST /tokens/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/transaction/cardPost_Token_Transaction)

    ## 2025-09-20

    > Add support for pre-authorization.
    > Initiate a pre-authorization on [Post Token Transaction](/psp-api/transaction/cardPost_Token_Transaction).
    > Initiate, update, or complete a pre-authorization on [Post Authorization](/psp-api/transaction/transactionPost_Authorization).
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization)
    > - [POST /token/v1/{account_id}/payments/{payment_id}/transactions](/psp-api/transaction/cardPost_Token_Transaction)

    ## 2025-09-12

    > Change to accept both `cres` and `threeDSMethodData`  in the same request. If both
    > are provided, `cres` takes precedence. Removed specific typing for `threeDSSessionData`
    > as we don't use it.
    >
    > - [POST /transactions/v1/{account_id}/{transaction_id}/3d-secure-notification-url](/psp-api/3-d-secure/3D-secureNotificationUrl)

    ## 2025-09-11

    > Remove x-pay-token header and apiKey query parameter.
    > Add required authorization header.
    > Add support for new field in body: `messageType`. The new field will be present for
    > notification type `provisionedToken`.
    > Update incorrect success return type from 200 to 204
    >
    > - [POST /visa-tokenization/v1/notifications/{notification_type}](/psp-api/visa-tokenization/tokenPost_Notification)

    ## 2025-09-10

    > Add API spec for PSP API to public APIs

    ## 2023-01-01

    > Initial version
servers:
  - url: https://payments.psp-test.dintero.com
    description: test server
  - url: https://payments.psp.dintero.com
    description: production server
security: []
tags:
  - name: card
    x-displayName: Card
    description: Start Card Payment
  - name: encryption
    x-displayName: Encryption
    description: Public keys for card encryption
  - name: payment
    x-displayName: Payment
    description: Manage payments
  - name: transaction
    x-displayName: Transaction
    description: Manage transactions
  - name: token
    x-displayName: Token
    description: Manage tokens
  - name: visaClickToPay
    x-displayName: VISA Click to Pay
    description: Start VISA Click to Pay payment
  - name: vipps
    x-displayName: Vipps
    description: Start Vipps payment
  - name: vipps-ext
    x-displayName: Vipps
    description: Receive callbacks from Vipps
  - name: visa tokenization
    x-displayName: VISA tokenization
    description: Receive callbacks from VISA tokenization
  - name: mastercard tokenization
    x-displayName: Mastercard tokenization
    description: Receive callbacks from Mastercard tokenization (ABU)
  - name: apple pay tokenization
    x-displayName: Apple Pay tokenization
    description: Recieve notifiecations on Apple Pay merchant token updates
  - name: merchant-certificates
    x-displayName: Merchant Certificates
    description: Manage merchant payment certificates (e.g. Apple Pay)
  - name: transfer
    x-displayName: Transfer
    description: Start a person-to-person push payment via Visa Direct or Mastercard Send
  - name: encrypted-payload-models
    x-displayName: Encrypted payload models
    description: Data models for encrypted payloads, e.g. encrypted card data.
paths:
  /keys/v1:
    get:
      operationId: encryptionGet_public_keys
      summary: encryptionGet_public_keys
      description: Keys used for encrypted sensitive card data
      tags:
        - encryption
      parameters: []
      responses:
        '200':
          description: Public keys
          content:
            application/json:
              schema:
                type: object
                description: Public keys
                required:
                  - card
                additionalProperties: false
                properties:
                  card:
                    type: object
                    description: Public key in jwk form. Use JWE compact encrypt to encrypt card payload.
                    required:
                      - type
                      - public_key
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - jwk
                      public_key:
                        type: string
                        description: A JSON-stringified JWK
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Get public keys
          sidebarTitle: Get public keys
  /payments/v1/{account_id}:
    post:
      operationId: paymentPost_Payment
      summary: paymentPost_Payment
      tags:
        - payment
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - reference
                - amount
                - currency
                - configuration
              additionalProperties: false
              properties:
                reference:
                  type: string
                  description: Reference for this payment
                  maxLength: 40
                amount:
                  type: integer
                  description: Monetary amount in minor units of currency with all punctuation removed
                  example: 12.34 NOK is denoted as 1234
                currency:
                  type: string
                  example: NOK
                  pattern: ^[A-Z]{3}
                customer:
                  $ref: '#/components/schemas/Customer'
                recipient:
                  $ref: '#/components/schemas/RecipientIdentifier'
                card_tokens:
                  type: array
                  items:
                    type: object
                    required:
                      - token_id
                    properties:
                      token_id:
                        type: string
                        format: uuid
                        description: |
                          Preload the store payment data related to the payment token and let the customer make a purchase without having to enter all card data.
                          When supplying a token_id in this field, the field `configuration.token_settings.recurring_model` is required.

                          Use `configuration.token_settings.generate_payment_token` option to generate the token, and fetch the token when fetching the payment in `payment.token_info.token_id`.
                configuration:
                  $ref: '#/components/schemas/PaymentConfiguration'
                transaction:
                  $ref: '#/components/schemas/PaymentTransaction'
      responses:
        '200':
          description: Created payment
          content:
            application/json:
              schema:
                type: object
                description: Created payment
                required:
                  - payment_id
                  - access_token
                  - operations
                additionalProperties: false
                properties:
                  payment_id:
                    type: string
                  access_token:
                    type: object
                    description: Access token used to authorize with public payment api endpoints
                    required:
                      - token
                      - expires_at
                    additionalProperties: false
                    properties:
                      token:
                        type: string
                      expires_at:
                        type: string
                        format: date-time
                  operations:
                    type: array
                    items:
                      type: object
                      required:
                        - href
                        - rel
                        - method
                        - content_type
                      additionalProperties: false
                      properties:
                        rel:
                          type: string
                          enum:
                            - pay-card
                            - get-card-gui
                            - pay-apple-pay
                            - validate-merchant-apple-pay
                            - pay-visa-click-to-pay
                            - pay-vipps
                            - pay-token
                            - pay-google-pay
                            - pay-transfer
                        method:
                          type: string
                          enum:
                            - POST
                            - GET
                        href:
                          type: string
                          example: https://https://payments.psp-test.dintero.com/card/v1/{account_id}/payments/{payment_id}/transactions
                        content_type:
                          type: string
                          enum:
                            - application/json
                            - text/html
                  transaction:
                    $ref: '#/components/schemas/PaymentTransactionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Payment
          sidebarTitle: Post Payment
  /payments/v1/{account_id}/{payment_id}:
    get:
      operationId: paymentGet_Payment
      summary: paymentGet_Payment
      tags:
        - payment
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      responses:
        '200':
          description: Payment response
          content:
            application/json:
              schema:
                type: object
                description: Payment response
                required:
                  - payment
                  - transactions
                additionalProperties: false
                properties:
                  payment:
                    type: object
                    required:
                      - id
                      - account_id
                      - reference
                      - amount
                      - currency
                      - exponent
                      - status
                      - created_by
                      - created_at
                      - updated_at
                    additionalProperties: false
                    properties:
                      id:
                        type: string
                      account_id:
                        type: string
                      reference:
                        type: string
                        description: Unique reference for this payment
                        minLength: 8
                        maxLength: 40
                      amount:
                        type: integer
                        description: Monetary amount in minor units of currency with all punctuation removed
                        example: 12.34 NOK is denoted as 1234
                      currency:
                        type: string
                        example: NOK
                        pattern: ^[A-Z]{3}
                      exponent:
                        type: integer
                        description: The number of decimals used for the base unit of the currency. E.g. Amount=1000, Currency=USD, Exponent=2, True amount = 10.00 USD
                        example: '2'
                      status:
                        type: string
                        enum:
                          - initiated
                          - cancelled
                      token_info:
                        type: array
                        items:
                          type: object
                          required:
                            - token_id
                            - card_metadata
                          properties:
                            token_id:
                              type: string
                            card_metadata:
                              type: object
                              required:
                                - status
                              properties:
                                status:
                                  type: string
                                  enum:
                                    - ACTIVE
                                    - INACTIVE
                                    - SUSPENDED
                                    - DELETED
                                card_last_4:
                                  type: string
                                expiration_date:
                                  type: object
                                  required:
                                    - month
                                    - year
                                  properties:
                                    month:
                                      type: string
                                      example: 12
                                      pattern: ^[0-9]{2}
                                    year:
                                      type: string
                                      example: 2023
                                      pattern: ^[0-9]{4}
                                card_art:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      url:
                                        type: string
                                        description: Url to fetch card art
                                      content_type:
                                        type: string
                                        enum:
                                          - digitalCardArt
                                          - digitalCardArtBackground
                                          - cardSymbol
                                          - termsAndConditions
                                      mime_type:
                                        type: string
                                        enum:
                                          - image/png
                                          - image/pdf
                      created_by:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                  transactions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Transaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Get Payment
          sidebarTitle: Get Payment
  /transactions/v1/{account_id}/{transaction_id}:
    get:
      operationId: transactionGet_Transaction
      summary: transactionGet_Transaction
      tags:
        - transaction
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      responses:
        '200':
          description: Transaction response
          content:
            application/json:
              schema:
                type: object
                description: Transaction response
                required:
                  - transaction
                  - operations
                  - operation_status
                additionalProperties: false
                properties:
                  transaction:
                    $ref: '#/components/schemas/Transaction'
                  operations:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - account_id
                        - payment_id
                        - transaction_id
                        - operation_ref
                        - type
                        - data
                        - result
                        - created_at
                        - updated_at
                      additionalProperties: false
                      properties:
                        id:
                          type: string
                        account_id:
                          type: string
                        payment_id:
                          type: string
                        transaction_id:
                          type: string
                        operation_ref:
                          type: string
                        type:
                          type: string
                          enum:
                            - preAuthorization
                            - preAuthorizationReversal
                            - authorization
                            - authorizationReversal
                            - capture
                            - captureReversal
                            - sale
                            - saleReversal
                            - refund
                            - refundReversal
                            - cancel
                        data:
                          type: object
                          oneOf:
                            - $ref: '#/components/schemas/PreAuthorization'
                            - $ref: '#/components/schemas/PreAuthorizationReversal'
                            - $ref: '#/components/schemas/Authorization'
                            - $ref: '#/components/schemas/AuthorizationReversal'
                            - $ref: '#/components/schemas/Sale'
                            - $ref: '#/components/schemas/SaleReversal'
                            - $ref: '#/components/schemas/Capture'
                            - $ref: '#/components/schemas/CaptureReversal'
                            - $ref: '#/components/schemas/Refund'
                            - $ref: '#/components/schemas/RefundReversal'
                            - $ref: '#/components/schemas/Cancel'
                        result:
                          type: string
                          enum:
                            - success
                            - failure
                        result_data:
                          $ref: '#/components/schemas/TransactionOperationResult'
                        created_at:
                          type: string
                        updated_at:
                          type: string
                  operation_status:
                    type: object
                    required:
                      - transaction_amount
                      - cancelled_amount
                      - pre_authorized_amount
                      - authorization
                      - capture
                      - refund
                    additionalProperties: false
                    properties:
                      transaction_amount:
                        type: number
                      cancelled_amount:
                        type: number
                      pre_authorized_amount:
                        type: number
                      authorization:
                        type: object
                        required:
                          - amount
                          - remaining
                        additionalProperties: false
                        properties:
                          amount:
                            type: number
                          remaining:
                            type: number
                      capture:
                        type: object
                        required:
                          - amount
                          - remaining
                        additionalProperties: false
                        properties:
                          amount:
                            type: number
                          remaining:
                            type: number
                      refund:
                        type: object
                        required:
                          - amount
                          - remaining
                        additionalProperties: false
                        properties:
                          amount:
                            type: number
                          remaining:
                            type: number
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Get Transaction
          sidebarTitle: Get Transaction
  /payments/v1/{account_id}/{payment_id}/cancel:
    post:
      operationId: paymentCancel_Payment
      summary: paymentCancel_Payment
      description: Cancel the payment. This prevents new transactions from being added to the payment.
      tags:
        - payment
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      responses:
        '200':
          description: Cancel payment response
          content:
            application/json:
              schema:
                type: object
                description: Cancel payment response
                required:
                  - payment
                additionalProperties: false
                properties:
                  payment:
                    type: object
                    required:
                      - id
                      - account_id
                      - reference
                      - amount
                      - currency
                      - exponent
                      - status
                      - created_by
                      - created_at
                      - updated_at
                    additionalProperties: false
                    properties:
                      id:
                        type: string
                      account_id:
                        type: string
                      reference:
                        type: string
                        description: Unique reference for this payment
                        minLength: 8
                        maxLength: 40
                      amount:
                        type: integer
                        description: Monetary amount in minor units of currency with all punctuation removed
                        example: 12.34 NOK is denoted as 1234
                      currency:
                        type: string
                        example: NOK
                        pattern: ^[A-Z]{3}
                      exponent:
                        type: integer
                        description: The number of decimals used for the base unit of the currency. E.g. Amount=1000, Currency=USD, Exponent=2, True amount = 10.00 USD
                        example: '2'
                      status:
                        type: string
                        enum:
                          - initiated
                          - cancelled
                      created_by:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Cancel Payment
          sidebarTitle: Cancel Payment
  /transactions/v1/{account_id}/{transaction_id}/3d-secure-init:
    post:
      operationId: 3D-securePost_3D_Secure_Init
      summary: 3D-securePost_3D_Secure_Init
      description: |-
        This endpoint is used to initiate a 3-D Secure transaction. Note that this endpoint is a form post and not a JSON post. The reason being that we need to send the request Accept headers to 3Dsecure.io. The response will be a 302 redirect to our postback page. (The postback page will also be used in the redirect from the notificationURL used in the method and challenge flows).

        The SDK form posts to the psp-service, the psp-service then does a preuaht request towards the 3D Secure server. The 3D Secure server then responds with a redirect to the notificationURL that redirects to the postback page so the SDK can retive the 3D Secure pre-auth result.

        If the result is a `SECURE_3D_METHOD_REQUIRED` response the SDK will do a form post to the ACS with the 3D Secure method data. The ACS will then respond with a redirect to the notificationURL that redirects to the postback page so the SDK can retrieve the 3D Secure method result. The SDK will then do a form post to the psp-service with the [3D Secure method result](/psp-api/3-d-secure/3D-securePost_3D_Secure_Method).

        If the result is a `SECURE_3D_CHALLENGE_REQUIRED` response the SDK will do a form post to the ACS with the 3D Secure challenge data. The ACS will then respond with a redirect to the notificationURL that redirects to the postback page so the SDK can retrieve the 3D Secure challenge result. The SDK will then do a form post to the psp-service with the [3D Secure challenge result](/psp-api/3-d-secure/3D-securePost_3D_Secure_Challenge).

        If the result is with a `SECURE_3D_COMPLETE` response the SDK will notify the checkout-frontend of the result and the checkout-frontend will then make the payment request to the checkout-service. The checkout-service in turn checks the transaction status with the psp-service and update the transaction status in the checkout-service.
      tags:
        - 3-D Secure
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - name: access_token
          in: query
          required: true
          schema:
            type: string
            description: Payment access token received when creating payment
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - customer.email
                - customer.billing_address.city
                - customer.billing_address.country_code
                - customer.billing_address.line_1
                - customer.billing_address.line_2
                - customer.billing_address.line_3
                - customer.billing_address.post_code
                - customer.billing_address.state
                - browser.screen_height
                - browser.screen_width
                - browser.tz
                - browser.color_depth
              additionalProperties: false
              properties:
                customer.email:
                  type: string
                  maxLength: 254
                customer.billing_address.city:
                  type: string
                  maxLength: 50
                customer.billing_address.country_code:
                  type: string
                  example: 'NO'
                  maxLength: 2
                customer.billing_address.line_1:
                  type: string
                  maxLength: 50
                customer.billing_address.line_2:
                  type: string
                  maxLength: 50
                customer.billing_address.line_3:
                  type: string
                  maxLength: 50
                customer.billing_address.post_code:
                  type: string
                  maxLength: 16
                customer.billing_address.state:
                  type: string
                  description: Use ISO 3166-2, or leave blank
                  maxLength: 3
                browser.screen_height:
                  type: string
                  pattern: ^[0-9]{1,6}
                browser.screen_width:
                  type: string
                  pattern: ^[0-9]{1,6}
                browser.tz:
                  type: string
                  description: Timezone offset in minutes
                  pattern: ^[+-]?[0-9]{1,4}
                browser.color_depth:
                  type: string
                  enum:
                    - '1'
                    - '4'
                    - '8'
                    - '15'
                    - '16'
                    - '24'
                    - '32'
                    - '48'
                hosted_3ds_session:
                  type: string
                  enum:
                    - 'true'
                    - 'false'
                  description: Indicates if the 3DS is in the hosted frontend app or managed by the SDK.  If true PSP will return a URL for a session in the hosted frontend app. If this is not set it will default to false.
      responses:
        '302':
          description: Redirect to postback page the response object documented here will be added as GET parameters in the redirect to the postback page. The postback page will then post the response object as a window.parent.postMessage to the parent window.
          content:
            application/json:
              schema:
                type: object
                description: 3-D Secure instructions or result
                oneOf:
                  - type: object
                    description: See https://docs.3dsecure.io/3dsv2/3dsmethod.html
                    required:
                      - type
                      - payment_id
                      - transaction_id
                      - three_ds_server_trans_id
                      - three_ds_method_url
                      - three_ds_method_data
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_METHOD_REQUIRED
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                      three_ds_server_trans_id:
                        type: string
                        description: Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction
                        format: uuid
                      three_ds_method_url:
                        type: string
                        description: The ACS URL that will be used by the 3DS Method. See https://docs.3dsecure.io/3dsv2/3dsmethod.html
                        format: uri
                      three_ds_method_data:
                        type: string
                        description: The 3DS Method Data that will be used by the 3DS Method. See https://docs.3dsecure.io/3dsv2/3dsmethod.html
                      message_version:
                        type: string
                        enum:
                          - 2.2.0
                          - 2.3.1
                        description: The 3DS message version negotiated for this transaction
                  - type: object
                    description: See https://docs.3dsecure.io/3dsv2/challenge_flow.html
                    required:
                      - type
                      - payment_id
                      - transaction_id
                      - three_ds_server_trans_id
                      - ds_trans_id
                      - acs_url
                      - acs_trans_id
                      - creq
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_CHALLENGE_REQUIRED
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                      three_ds_server_trans_id:
                        type: string
                        description: Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction
                        format: uuid
                      ds_trans_id:
                        type: string
                        description: Universally unique transaction identifier assigned by the directory server (DS) to identify a single transaction
                        format: uuid
                      acs_url:
                        type: string
                        description: Fully qualified URL of the ACS to be used for the challenge. Post the challenge request (CReq) to this URL via the challenge window. See https://docs.3dsecure.io/3dsv2/challenge_flow.html
                        format: uri
                      acs_trans_id:
                        type: string
                        description: Universally unique transaction identifier assigned by the ACS to identify a single transaction
                        format: uuid
                      creq:
                        type: string
                        description: The CReq that will be used by the challenge window. See https://docs.3dsecure.io/3dsv2/challenge_flow.html
                      message_version:
                        type: string
                        enum:
                          - 2.2.0
                          - 2.3.1
                        description: The 3DS message version negotiated for this transaction
                  - type: object
                    required:
                      - type
                      - payment_id
                      - transaction_id
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_COMPLETE
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                  - type: object
                    required:
                      - type
                      - payment_id
                      - transaction_id
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_FAILED
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post 3-D Secure Init
          sidebarTitle: Post 3-D Secure Init
  /transactions/v1/{account_id}/{transaction_id}/3d-secure-method-complete:
    post:
      operationId: 3D-securePost_3D_Secure_Method
      summary: 3D-securePost_3D_Secure_Method
      tags:
        - 3-D Secure
      description: |-

        This endpoint is used to complete method fingerprinting of the 3-D Secure transaction. Note that this endpoint is a form post and not a JSON post. The reason being that we need to send the request Accept headers to 3Dsecure.io. The response will be a 302 redirect to our postback page. (The postback page will also be used in the redirect from the notification_url used in the method and challenge flows).

        This endpoint is called after the ACS has form posted to the notification url with the threeDSMethodData (method result). The notification url will redirect to the postback page where the SDK will retrieve the method result and post the values encoded in the threeDSMethodData to the psp-service (this endpoint).

        If the result is a `SECURE_3D_CHALLENGE_REQUIRED` response the SDK will do a form post to the ACS with the 3D Secure challenge data. The ACS will then respond with a redirect to the notificationURL that redirects to the postback page so the SDK can retrieve the 3D Secure challenge result. The SDK will then do a form post to the psp-service with the [3D Secure challenge result](/psp-api/3-d-secure/3D-securePost_3D_Secure_Challenge).

        If the result is with a `SECURE_3D_COMPLETE` response the SDK will notify the checkout-frontend of the result and the checkout-frontend will then make the payment request to the checkout-service. The checkout-service in turn checks the transaction status with the psp-service and update the transaction status in the checkout-service.
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - name: access_token
          in: query
          required: true
          schema:
            type: string
            description: Payment access token received when creating payment
        - name: message_version
          in: query
          description: Version of 3DS that is used.
          schema:
            type: string
            enum:
              - 2.2.0
              - 2.3.1
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - customer.email
                - customer.billing_address.city
                - customer.billing_address.country_code
                - customer.billing_address.line_1
                - customer.billing_address.line_2
                - customer.billing_address.line_3
                - customer.billing_address.post_code
                - customer.billing_address.state
                - three_ds_server_trans_id
                - three_ds_comp_ind
                - browser.screen_height
                - browser.screen_width
                - browser.tz
                - browser.color_depth
              additionalProperties: false
              properties:
                three_ds_server_trans_id:
                  type: string
                  description: Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction
                  format: uuid
                three_ds_comp_ind:
                  type: string
                  description: 'Indicates the outcome of the 3DS Method. Possible values are: - `Y` Successfully completed - `N` Did not successfully complete'
                  enum:
                    - 'Y'
                    - 'N'
                customer.email:
                  type: string
                  maxLength: 254
                customer.billing_address.city:
                  type: string
                  maxLength: 50
                customer.billing_address.country_code:
                  type: string
                  example: 'NO'
                  maxLength: 2
                customer.billing_address.line_1:
                  type: string
                  maxLength: 50
                customer.billing_address.line_2:
                  type: string
                  maxLength: 50
                customer.billing_address.line_3:
                  type: string
                  maxLength: 50
                customer.billing_address.post_code:
                  type: string
                  maxLength: 16
                customer.billing_address.state:
                  type: string
                  description: Use ISO 3166-2, or leave blank
                  maxLength: 3
                browser.screen_height:
                  type: string
                  pattern: ^[0-9]{1,6}
                browser.screen_width:
                  type: string
                  pattern: ^[0-9]{1,6}
                browser.tz:
                  type: string
                  description: Timezone offset in minutes
                  pattern: ^[+-]?[0-9]{1,4}
                browser.color_depth:
                  type: string
                  enum:
                    - '1'
                    - '4'
                    - '8'
                    - '15'
                    - '16'
                    - '24'
                    - '32'
                    - '48'
      responses:
        '302':
          description: Redirect to postback page the response object documented here will be added as GET parameters in the redirect to the postback page. The postback page will then post the response object as a window.parent.postMessage to the parent window.
          content:
            application/json:
              schema:
                type: object
                description: 3-D Secure instructions or result
                oneOf:
                  - type: object
                    description: See https://docs.3dsecure.io/3dsv2/challenge_flow.html
                    required:
                      - type
                      - payment_id
                      - transaction_id
                      - three_ds_server_trans_id
                      - ds_trans_id
                      - acs_url
                      - acs_trans_id
                      - creq
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_CHALLENGE_REQUIRED
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                      three_ds_server_trans_id:
                        type: string
                        description: Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction
                        format: uuid
                      ds_trans_id:
                        type: string
                        description: Universally unique transaction identifier assigned by the directory server (DS) to identify a single transaction
                        format: uuid
                      acs_url:
                        type: string
                        description: Fully qualified URL of the ACS to be used for the challenge. Post the challenge request (CReq) to this URL via the challenge window. See https://docs.3dsecure.io/3dsv2/challenge_flow.html
                        format: uri
                      acs_trans_id:
                        type: string
                        description: Universally unique transaction identifier assigned by the ACS to identify a single transaction
                        format: uuid
                      creq:
                        type: string
                        description: The CReq that will be used by the challenge window. See https://docs.3dsecure.io/3dsv2/challenge_flow.html
                      message_version:
                        type: string
                        enum:
                          - 2.2.0
                          - 2.3.1
                        description: The 3DS message version negotiated for this transaction
                  - type: object
                    required:
                      - type
                      - payment_id
                      - transaction_id
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_COMPLETE
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                  - type: object
                    required:
                      - type
                      - payment_id
                      - transaction_id
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_FAILED
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post 3-D Secure Method
          sidebarTitle: Post 3-D Secure Method
  /transactions/v1/{account_id}/{transaction_id}/3d-secure-challenge-complete:
    post:
      operationId: 3D-securePost_3D_Secure_Challenge
      summary: 3D-securePost_3D_Secure_Challenge
      tags:
        - 3-D Secure
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
        - name: message_version
          in: query
          description: Version of 3DS that is used.
          schema:
            type: string
            enum:
              - 2.2.0
              - 2.3.1
      description: |-
        This endpoint is called after the ACS has form posted to the notification url with the Cres (challenge result). The notification url will redirect to the postback page where the SDK will retrieve the challenge result and post the values encoded in the Cres to the psp-service (this endpoint).

        If the psp-service response is of the type `SECURE_3D_COMPLETE` the SDK will notify the checkout-frontend of the result and the checkout-frontend will then make the payment request to the checkout-service. The checkout-service in turn checks the transaction status with the psp-service and updated the transaction status in the checkout-service.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - three_ds_server_trans_id
              additionalProperties: false
              properties:
                three_ds_server_trans_id:
                  type: string
                  description: Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction
                  format: uuid
                ds_trans_id:
                  type: string
                  description: Universally unique transaction identifier assigned by the directory server (DS) to identify a single transaction
                  format: uuid
      responses:
        '200':
          description: 3-D Secure result
          content:
            application/json:
              schema:
                type: object
                description: 3-D Secure result
                required:
                  - type
                  - payment_id
                  - transaction_id
                additionalProperties: false
                properties:
                  type:
                    type: string
                    description: |-
                      Outcome of the post-challenge step.

                      * `SECURE_3D_COMPLETE` — challenge processed; the SDK should proceed with the payment request.
                      * `SECURE_3D_CHALLENGE_RETRY` — the 3-D Secure server has not yet received the result message (RReq) from the ACS. The SDK should retry this endpoint after a short backoff until it receives a non-retry response.
                      * `SECURE_3D_CHALLENGE_FAILED` — the challenge failed and the SDK should not proceed with the payment.
                    enum:
                      - SECURE_3D_COMPLETE
                      - SECURE_3D_CHALLENGE_RETRY
                      - SECURE_3D_CHALLENGE_FAILED
                  payment_id:
                    type: string
                  transaction_id:
                    type: string
                  redirect_url:
                    type: string
                    format: uri
                    description: The URL to redirect the customer to after the 3-D Secure challenge is completed. If present the redirect URL should be followed.
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post 3-D Secure Challenge
          sidebarTitle: Post 3-D Secure Challenge
  /transactions/v1/{account_id}/{transaction_id}/3d-secure-notification-url:
    post:
      operationId: 3D-secureNotificationUrl
      summary: 3D-secureNotificationUrl
      tags:
        - 3-D Secure
      description: This endpoint is used to as the notificationURL after the method or challenge has been completed in the iframe. The ACS will form post to this endpoint with the threeDSMethodData or Cres. The sever will read the body. Decode the base64url encoded data and redirect to the postback page with the decoded data as query parameters.
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            description: The Dintero merchant account id
            example: P12345678
            pattern: ^[PTpt]\d{8}
        - $ref: '#/components/parameters/TransactionIdParam'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              description: |
                3-D Secure method complete redirect data.
                At least one of `threeDSMethodData` or `cres` must be provided.
                If both are provided, `cres` takes precedence.
              additionalProperties: true
              properties:
                threeDSMethodData:
                  type: string
                  description: |-
                    The value is Base64-URL encoded and decodes to:
                    ```
                      {"threeDSServerTransID": "{uuid}"}
                    ```
                    See https://docs.3dsecure.io/3dsv2/3dsmethod.html
                cres:
                  type: string
                  description: |-
                    The value is Base64-URL encoded and decodes to a valid Cres, eg:
                    ```
                      {
                        "acsTransID": "{uuid}",
                        "challengeCompletionInd": "Y",
                        "messageType": "CRes",
                        "messageVersion": "2.2.0",
                        "threeDSServerTransID": "{uuid}",
                        "transStatus": "Y"
                      }
                    ```
                    See https://docs.3dsecure.io/3dsv2/challenge_flow.html
      responses:
        '302':
          description: Redirect to postback page the response object documented here will be added as GET parameters in the redirect to the postback page. The postback page will then post the response object as a window.parent.postMessage to the parent window.
          content:
            application/json:
              schema:
                type: object
                oneOf:
                  - type: object
                    description: 3-D Secure method complete redirect object
                    required:
                      - three_ds_method_data
                    additionalProperties: false
                    properties:
                      three_ds_method_data:
                        type: string
                        description: |-
                          The value is Base64-URL encoded and decodes to:
                          ```
                            {"threeDSServerTransID": "{uuid}"}
                          ```
                          See https://docs.3dsecure.io/3dsv2/3dsmethod.html
                  - type: object
                    description: 3-D Secure challenge complete redirect object
                    required:
                      - cres
                    additionalProperties: false
                    properties:
                      cres:
                        type: string
                        description: |-
                          The value is Base64-URL encoded and decodes to a valid Cres, eg:
                          ```
                            {
                              "acsTransID": "{uuid}",
                              "challengeCompletionInd": "Y",
                              "messageType": "CRes",
                              "messageVersion": "2.2.0",
                              "threeDSServerTransID": "{uuid}",
                              "transStatus": "Y"
                            }
                          ```
                          See https://docs.3dsecure.io/3dsv2/challenge_flow.html                  threeDSServerTransID: type: string format: uuid
                  - type: object
                    description: Error response
                    required:
                      - error
                      - message
                    additionalProperties: false
                    properties:
                      error:
                        type: string
                        enum:
                          - 'true'
                      message:
                        type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: NotificationURL for 3-D Secure
          sidebarTitle: NotificationURL for 3-D Secure
  /transactions/v1/3dsn/{id}:
    post:
      operationId: 3D-secureNotificationUrlShort
      summary: 3D-secureNotificationUrlShort
      tags:
        - 3-D Secure
      description: Shorthand alternative to the [notificationURL](/psp-api/3-d-secure/3D-secureNotificationUrl) for 3-D Secure, addressed by an opaque, strictly alphanumeric `id` instead of `account_id` and `transaction_id`. Used where the ACS or 3DS server enforces a maximum notification URL length. Behaves identically to the full notificationURL endpoint.
      parameters:
        - $ref: '#/components/parameters/NotificationIdParam'
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              description: |
                3-D Secure method complete redirect data.
                At least one of `threeDSMethodData` or `cres` must be provided.
                If both are provided, `cres` takes precedence.
              additionalProperties: true
              properties:
                threeDSMethodData:
                  type: string
                  description: |-
                    The value is Base64-URL encoded and decodes to:
                    ```
                      {"threeDSServerTransID": "{uuid}"}
                    ```
                    See https://docs.3dsecure.io/3dsv2/3dsmethod.html
                cres:
                  type: string
                  description: |-
                    The value is Base64-URL encoded and decodes to a valid Cres, eg:
                    ```
                      {
                        "acsTransID": "{uuid}",
                        "challengeCompletionInd": "Y",
                        "messageType": "CRes",
                        "messageVersion": "2.2.0",
                        "threeDSServerTransID": "{uuid}",
                        "transStatus": "Y"
                      }
                    ```
                    See https://docs.3dsecure.io/3dsv2/challenge_flow.html
      responses:
        '302':
          description: Redirect to postback page the response object documented here will be added as GET parameters in the redirect to the postback page. The postback page will then post the response object as a window.parent.postMessage to the parent window.
          content:
            application/json:
              schema:
                type: object
                oneOf:
                  - type: object
                    description: 3-D Secure method complete redirect object
                    required:
                      - three_ds_method_data
                    additionalProperties: false
                    properties:
                      three_ds_method_data:
                        type: string
                        description: |-
                          The value is Base64-URL encoded and decodes to:
                          ```
                            {"threeDSServerTransID": "{uuid}"}
                          ```
                          See https://docs.3dsecure.io/3dsv2/3dsmethod.html
                  - type: object
                    description: 3-D Secure challenge complete redirect object
                    required:
                      - cres
                    additionalProperties: false
                    properties:
                      cres:
                        type: string
                        description: |-
                          The value is Base64-URL encoded and decodes to a valid Cres, eg:
                          ```
                            {
                              "acsTransID": "{uuid}",
                              "challengeCompletionInd": "Y",
                              "messageType": "CRes",
                              "messageVersion": "2.2.0",
                              "threeDSServerTransID": "{uuid}",
                              "transStatus": "Y"
                            }
                          ```
                          See https://docs.3dsecure.io/3dsv2/challenge_flow.html
                  - type: object
                    description: Error response
                    required:
                      - error
                      - message
                    additionalProperties: false
                    properties:
                      error:
                        type: string
                        enum:
                          - 'true'
                      message:
                        type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: NotificationURL for 3-D Secure (shorthand)
          sidebarTitle: NotificationURL for 3-D Secure (shorthand)
  /transactions/v1/{account_id}/{transaction_id}/mastercard-taf-challenge-complete:
    post:
      operationId: MastercardTAFPost_Mastercard_TAF_Challenge_Complete
      summary: MastercardTAFPost_Mastercard_TAF_Challenge_Complete
      tags:
        - Mastercard TAF
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
      description: |-
        This endpoint is called with the authentication result from the Mastercard Token Authentication Framework (TAF) initiated in the SDK.

        If the psp-service response is of the type `MASTERCARD_TAF_COMPLETE` the SDK will notify the checkout-frontend of the result and the checkout-frontend will then make the payment request to the checkout-service. The checkout-service in turn checks the transaction status with the psp-service and updated the transaction status in the checkout-service.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - result
              properties:
                result:
                  type: object
                  description: Authentication result returned from Mastercard TAF's `authenticate()` method
                  required:
                    - authenticationStatus
                    - authenticationResult
                  properties:
                    authenticationResult:
                      type: string
                      enum:
                        - AUTHENTICATED
                        - NOT_AUTHENTICATED
                    authenticationStatus:
                      type: string
                      enum:
                        - COMPLETE
                        - PENDING
                        - PENDING_CHALLENGE
                        - CANCELLED
                        - EXPIRED
                        - NOT_SUPPORTED
                    srcCorrelationId:
                      type: string
                    srciTransactionId:
                      type: string
                    traceId:
                      type: string
                    assuranceData:
                      type: object
                      required:
                        - verificationData
                      properties:
                        verificationData:
                          type: array
                          items:
                            type: object
                            required:
                              - verificationType
                              - verificationEntity
                              - verificationMethod
                              - verificationResults
                            properties:
                              verificationType:
                                type: string
                                enum:
                                  - CARDHOLDER
                              verificationEntity:
                                type: string
                                enum:
                                  - '01'
                                  - '02'
                                  - '03'
                              verificationMethod:
                                type: string
                                enum:
                                  - '01'
                                  - '06'
                                  - '07'
                                  - '24'
                              verificationResults:
                                type: string
                                enum:
                                  - '01'
                                  - '02'
                                  - '03'
                              verificationTimestamp:
                                type: string
                              verificationEvents:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - '01'
                                    - '02'
                                    - '04'
                              additionalData:
                                type: string
                        eci:
                          type: string
                          enum:
                            - '01'
                            - '02'
                            - '06'
                    methodAttributes:
                      type: object
                      properties:
                        threeDsData:
                          type: object
                          properties:
                            threeDsOutputData:
                              type: object
                              additionalProperties: true
      responses:
        '200':
          description: Mastercard TAF authentication result
          content:
            application/json:
              schema:
                type: object
                description: Mastercard TAF authentication result
                oneOf:
                  - type: object
                    required:
                      - type
                      - payment_id
                      - transaction_id
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - MASTERCARD_TAF_CHALLENGE_FAILED
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                  - type: object
                    required:
                      - type
                      - payment_id
                      - transaction_id
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - MASTERCARD_TAF_COMPLETE
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Mastercard TAF Challenge Completed Result
          sidebarTitle: Post Mastercard TAF Challenge Completed Result
  /transactions/v1/{account_id}/{transaction_id}/authorization:
    post:
      operationId: transactionPost_Authorization
      summary: transactionPost_Authorization
      description: Authorize the full transaction amount. Not supported for Vipps transactions.
      tags:
        - transaction
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      requestBody:
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/PostAuthorization'
                - $ref: '#/components/schemas/PostPreAuthorization'
      responses:
        '200':
          description: Authorization result
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                description: Transaction results
                required:
                  - results
                properties:
                  results:
                    type: array
                    minLength: 1
                    description: Array of performed operations and results
                    items:
                      type: object
                      required:
                        - result
                        - operation_data
                      additionalProperties: false
                      properties:
                        result:
                          $ref: '#/components/schemas/TransactionOperationResult'
                        operation_data:
                          type: object
                          oneOf:
                            - $ref: '#/components/schemas/Authorization'
                            - $ref: '#/components/schemas/Sale'
                            - $ref: '#/components/schemas/PreAuthorization'
                            - $ref: '#/components/schemas/PreAuthorizationReversal'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Authorization
          sidebarTitle: Post Authorization
  /transactions/v1/{account_id}/{transaction_id}/void:
    post:
      operationId: transactionPost_Void
      summary: transactionPost_Void
      description: Reverses any open authorizations, and cancels the transaction (prevents new authorizations). If the transaction is already captured, void has no effect except to prevent new authorizations (if applicable).
      tags:
        - transaction
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - operation_ref
              additionalProperties: false
              properties:
                operation_ref:
                  type: string
                  description: Unique reference for this operation
                condition:
                  type: string
                  enum:
                    - none
                    - no_authorizations
                  description: |
                    Condition for performing the void operation. If the condition is not met the transaction will not be voided and a 409 Conflict response will be returned. If condition is not set it will be the same as setting `none`.
      responses:
        '200':
          description: Void result
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                description: Transaction results
                required:
                  - results
                properties:
                  results:
                    type: array
                    minLength: 1
                    description: Array of performed operations and results
                    items:
                      type: object
                      required:
                        - result
                        - operation_data
                      additionalProperties: false
                      properties:
                        result:
                          $ref: '#/components/schemas/TransactionOperationResult'
                        operation_data:
                          type: object
                          $ref: '#/components/schemas/Cancel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Void
          sidebarTitle: Post Void
  /transactions/v1/{account_id}/{transaction_id}/capture:
    post:
      operationId: transactionPost_Capture
      summary: transactionPost_Capture
      description: Captures the specified amount. If there were multiple authorizations on this transaction, the capture may be split across those.
      tags:
        - transaction
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - operation_ref
                - amount
              additionalProperties: false
              properties:
                operation_ref:
                  type: string
                  description: Unique reference for this operation
                amount:
                  type: integer
                  description: Monetary amount in minor units of currency with all punctuation removed
                  example: 12.34 NOK is denoted as 1234
                final_capture:
                  type: boolean
                  default: false
                  description: Indicates whether the capture is final
      responses:
        '200':
          description: Capture result
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                description: Transaction results
                required:
                  - results
                properties:
                  results:
                    type: array
                    minLength: 1
                    description: Array of performed operations and results
                    items:
                      type: object
                      required:
                        - result
                        - operation_data
                      additionalProperties: false
                      properties:
                        result:
                          $ref: '#/components/schemas/TransactionOperationResult'
                        operation_data:
                          $ref: '#/components/schemas/Capture'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Capture
          sidebarTitle: Post Capture
  /transactions/v1/{account_id}/{transaction_id}/refund:
    post:
      operationId: transactionPost_Refund
      summary: transactionPost_Refund
      description: Refunds the specified amount. If there exists multiple captures, the refund may be split across those.
      tags:
        - transaction
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - operation_ref
                - amount
              additionalProperties: false
              properties:
                operation_ref:
                  type: string
                  description: Unique reference for this operation
                amount:
                  type: integer
                  description: Monetary amount in minor units of currency with all punctuation removed
                  example: 12.34 NOK is denoted as 1234
                condition:
                  type: string
                  enum:
                    - none
                    - reversal_if_sale
                  description: |
                    If set to `reversal_if_sale`, reverses the sale instead of refunding it. Falls back to a normal refund if the sale can no longer be reversed. If not set, defaults to `none`.
      responses:
        '200':
          description: Refund result
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                description: Refund result
                required:
                  - results
                properties:
                  results:
                    type: array
                    minLength: 1
                    description: Array of performed operations and results
                    items:
                      type: object
                      required:
                        - result
                        - operation_data
                      additionalProperties: false
                      properties:
                        result:
                          $ref: '#/components/schemas/TransactionOperationResult'
                        operation_data:
                          type: object
                          oneOf:
                            - $ref: '#/components/schemas/Refund'
                            - $ref: '#/components/schemas/CaptureReversal'
                            - $ref: '#/components/schemas/SaleReversal'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Refund
          sidebarTitle: Post Refund
  /tokens/v1/{account_id}/{token_id}:
    delete:
      operationId: tokenDelete_token
      summary: tokenDelete_token
      tags:
        - token
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - name: token_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Id of the token to delete
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      responses:
        '200':
          description: Token successfully deleted
          content:
            application/json:
              schema:
                type: object
                required:
                  - tokenId
                properties:
                  account_id:
                    type: string
                  id:
                    type: string
                    description: token id
                  status:
                    type: string
                    enum:
                      - DELETED
                  tokenizer:
                    type: string
                    enum:
                      - visa
                      - mastercard
                  tokenizer_id:
                    type: string
                    description: Token id provided by tokenizer
                  vpan_enrollment_id:
                    type: string
                  relationship_id:
                    type: string
                  client_app_id:
                    type: string
                  created_by:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_by:
                    type: string
                  updated_at:
                    type: string
                    format: date-time
                  deleted_by:
                    type: string
                  deleted_at:
                    type: string
                    format: date-time
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Delete card token
          sidebarTitle: Delete card token
  /card/v1/{account_id}/payments/{payment_id}/transactions:
    post:
      operationId: cardPost_Card_Transaction
      summary: cardPost_Card_Transaction
      tags:
        - card
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
        - $ref: '#/components/parameters/Skip3DSQueryParam'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - reference
              additionalProperties: false
              properties:
                reference:
                  type: string
                  description: Unique reference for this transaction
                  minLength: 8
                  maxLength: 40
                payload:
                  type: string
                  description: |-
                    The card data encrypted using the public key (see /keys/v1).
                    Required if not using token.

                    [Payload content schema](#schema/CardPayload).
                save_card:
                  type: boolean
                  description: |
                    The cardholder has opted in to the card being stored.
                token_id:
                  type: string
                  description: |-
                    `token_id` of the card token to process the transaction.
                    Required if not sending card data in payload
                customer:
                  $ref: '#/components/schemas/Customer'
      responses:
        '200':
          description: Created and transaction and auth instructions
          content:
            application/json:
              schema:
                type: object
                description: Created and transaction and auth instructions
                required:
                  - auth_method
                  - operations
                  - payment_id
                  - transaction_id
                additionalProperties: false
                properties:
                  payment_id:
                    type: string
                  transaction_id:
                    type: string
                  auth_method:
                    type: object
                    description: Authentication instructions
                    required:
                      - type
                      - payment_id
                      - transaction_id
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_AUTHENTICATION
                          - MASTERCARD_TAF
                          - NONE
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                  operations:
                    type: array
                    items:
                      type: object
                      properties:
                        href:
                          type: string
                        method:
                          type: string
                          enum:
                            - POST
                        content_type:
                          type: string
                          enum:
                            - application/json
                        rel:
                          type: string
                          enum:
                            - 3d-secure-init
                            - 3d-secure-method-complete
                            - 3d-secure-challenge-complete
                            - 3d-secure-notification
                            - mastercard-taf-init-params
                            - mastercard-taf-challenge-complete
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Card Transaction
          sidebarTitle: Post Card Transaction
  /tokens/v1/{account_id}/payments/{payment_id}/transactions:
    post:
      operationId: cardPost_Token_Transaction
      summary: cardPost_Token_Transaction
      description: Create transaction for unscheduled or recurring payment. Will automatically try to authorize payment. <br> <br> If the payment was created with `configuration.pre_authorization = true`, the authorization will be an initial pre-authorization, which requires subsequent call(s) to [POST /transactions/v1/{account_id}/{transaction_id}/authorization](/psp-api/transaction/transactionPost_Authorization) to finalize the authorization before it can be captured.
      tags:
        - transaction
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - reference
                - token_id
              additionalProperties: false
              properties:
                reference:
                  type: string
                  description: Unique reference for this transaction
                  minLength: 8
                  maxLength: 40
                token_id:
                  type: string
                  format: uuid
                  description: ID of the token to process the payment
                customer:
                  $ref: '#/components/schemas/Customer'
      responses:
        '200':
          description: Transaction created
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    required:
                      - payment_id
                      - transaction_id
                    properties:
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                  - type: object
                    description: Transaction results
                    required:
                      - results
                    properties:
                      results:
                        type: array
                        minLength: 1
                        description: Array of performed operations and results
                        items:
                          type: object
                          required:
                            - result
                            - operation_data
                          additionalProperties: false
                          properties:
                            result:
                              $ref: '#/components/schemas/TransactionOperationResult'
                            operation_data:
                              type: object
                              oneOf:
                                - $ref: '#/components/schemas/Authorization'
                                - $ref: '#/components/schemas/Sale'
                                - $ref: '#/components/schemas/PreAuthorization'
                                - $ref: '#/components/schemas/PreAuthorizationReversal'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Token Transaction
          sidebarTitle: Post Token Transaction
  /visa-click-to-pay/v1/{account_id}/payments/{payment_id}/transactions:
    post:
      operationId: visaClickToPayPost_Visa_C2P_Transaction
      summary: visaClickToPayPost_Visa_C2P_Transaction
      tags:
        - visaClickToPay
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - reference
                - payment_data
              additionalProperties: false
              properties:
                reference:
                  type: string
                  description: Unique reference for this transaction
                  minLength: 8
                  maxLength: 40
                payment_data:
                  type: string
                  description: |
                    Visa Click-to-pay checkout returns an object with a JWS string in `checkoutResponse` that should be passed here to PSP
                    as `payment_data`.
      responses:
        '200':
          description: Created and transaction and auth instructions
          content:
            application/json:
              schema:
                type: object
                description: Created and transaction and auth instructions
                required:
                  - auth_method
                  - payment_id
                  - transaction_id
                additionalProperties: false
                properties:
                  auth_method:
                    type: object
                    description: Authentication instructions
                    oneOf:
                      - type: object
                        required:
                          - type
                          - payment_id
                          - transaction_id
                        additionalProperties: false
                        properties:
                          type:
                            type: string
                            enum:
                              - NONE
                          payment_id:
                            type: string
                          transaction_id:
                            type: string
                  payment_id:
                    type: string
                  transaction_id:
                    type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Visa C2P Transaction
          sidebarTitle: Post Visa C2P Transaction
  /vipps/v1/{account_id}/payments/{payment_id}/transactions:
    post:
      operationId: vippsPost_Vipps_Transaction
      summary: vippsPost_Vipps_Transaction
      tags:
        - vipps
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - reference
                - redirect_url
              additionalProperties: false
              properties:
                reference:
                  type: string
                  description: Unique reference for this transaction
                  minLength: 8
                  maxLength: 40
                redirect_url:
                  type: string
                  format: uri
                  description: Url user will be redirected to after completing payment in Vipps app
                customer_mobile_number:
                  type: string
                  description: Norwegian mobile number including +47 of the user who pays for the transaction
                  pattern: ^\+47\d{8}
                  example: '+4798765432'
                payment_text:
                  type: string
                  description: Text displayed to end user
                is_app:
                  type: boolean
                  description: Indicates whether payment request is triggered from a mobile app or a web browser. Default `false`
      responses:
        '200':
          description: Created transaction
          content:
            application/json:
              schema:
                type: object
                description: Created transaction
                required:
                  - payment_id
                  - transaction_id
                  - vipps_redirect_url
                additionalProperties: false
                properties:
                  payment_id:
                    type: string
                  transaction_id:
                    type: string
                  vipps_redirect_url:
                    type: string
                    description: Vipps Url to redirect customer
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Vipps Transaction
          sidebarTitle: Post Vipps Transaction
  /vipps/v1/{account_id}/payments/{payment_id}/transactions/{transaction_id}:
    post:
      operationId: vippsPost_Service
      summary: vippsPost_Service
      tags:
        - vipps-ext
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: Service token
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - pspTransactionId
                - merchantSerialNumber
                - paymentState
                - binNumber
                - operations
                - paymentInstrument
                - networkToken
              additionalProperties: true
              properties:
                pspTransactionId:
                  type: string
                  description: A globally unique PSP transaction reference for the PSP systems
                merchantSerialNumber:
                  type: string
                  description: Vipps merchant number (MSN) for sales unit
                  maxLength: 10
                  minLength: 6
                  pattern: ^\d{6,10}
                paymentState:
                  type: string
                  description: Credit Card Details Encryption Status
                  enum:
                    - ACCEPTED
                    - TIMEOUT
                    - USER_CANCEL
                userToken:
                  type: string
                  description: JWT-TOKEN
                  x-nullable: true
                binNumber:
                  type: string
                  description: BIN number for the card
                  x-nullable: true
                operations:
                  type: array
                  description: 3-D Secure operations
                  x-nullable: true
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: Redirect url for operation
                      operation:
                        type: string
                        description: 3DS result status
                        enum:
                          - 3dssuccess
                          - 3dscancel
                          - 3dsfailure
                paymentInstrument:
                  type: string
                  enum:
                    - TOKEN
                  x-nullable: true
                networkToken:
                  type: object
                  x-nullable: true
                  properties:
                    number:
                      type: string
                      maxLength: 19
                      description: Network token of card
                    cryptogram:
                      type: string
                      description: Cryptogram for processing token
                    expiryMonth:
                      type: string
                    expiryYear:
                      type: string
                    tokenType:
                      type: string
                      enum:
                        - VISA
                        - MASTERCARD
                    eci:
                      type: string
                      description: ECI value
      responses:
        '200':
          description: Request received and processed
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  errorMessage:
                    type: object
                    properties:
                      errorId:
                        type: string
                      errorText:
                        type: string
                  paymentInfo:
                    type: object
                    properties:
                      pspTransactionId:
                        type: string
                      status:
                        type: string
                        enum:
                          - OK
                          - FAIL
                          - SOFT_DECLINE
                        description: default `OK`
                      url3dSecure:
                        type: string
                        description: Set if end user needs to go through 3DS
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Receive service callback from Vipps to complete payment
          sidebarTitle: Receive service callback from Vipps to complete payment
  /apple-pay/v1/{account_id}/payments/{payment_id}/validate-merchant:
    post:
      operationId: applepayPost_Apple_Pay_Validate_Merchant
      summary: applepayPost_Apple_Pay_Validate_Merchant
      description: Completes the merchant validation and returns a valid Apple Pay payment session.
      tags:
        - Apple Pay
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - validate_merchant_data
              additionalProperties: false
              properties:
                validate_merchant_data:
                  type: string
                  maxLength: 500
                  description: Should be JSON stringified object of the event from the `onvalidatemerchant` callback from apple pay. See https://developer.apple.com/documentation/applepayontheweb/applepaysession/onvalidatemerchant
      responses:
        '200':
          description: Merchant Validation Complete
          content:
            application/json:
              schema:
                type: object
                description: Merchant Validation Complete
                required:
                  - payment_id
                  - merchant_session
                additionalProperties: false
                properties:
                  payment_id:
                    type: string
                  merchant_session:
                    type: object
                    description: An opaque message session object, received from the Apple Pay server.
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Apple Pay Validate Merchant
          sidebarTitle: Post Apple Pay Validate Merchant
  /apple-pay/v1/{account_id}/payments/{payment_id}/transactions:
    post:
      operationId: applepayPost_Apple_Pay_Transaction
      summary: applepayPost_Apple_Pay_Transaction
      description: Post an Apple Pay transaction to the PSP.
      tags:
        - Apple Pay
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - payment_data
                - reference
              additionalProperties: false
              properties:
                reference:
                  type: string
                  description: Unique reference for this transaction
                  minLength: 8
                  maxLength: 40
                payment_data:
                  type: string
                  maxLength: 10000
                  description: Should be JSON stringified object of the event from the `onpaymentauthorized` callback from apple pay. See https://developer.apple.com/documentation/applepayontheweb/applepaysession/onpaymentauthorized
      responses:
        '200':
          description: Created transaction
          content:
            application/json:
              schema:
                type: object
                description: Created transaction
                required:
                  - payment_id
                  - transaction_id
                  - type
                additionalProperties: false
                properties:
                  payment_id:
                    type: string
                  transaction_id:
                    type: string
                  type:
                    type: string
                    enum:
                      - APPLE_PAY_AUTHENTICATION
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Apple Pay Transaction
          sidebarTitle: Post Apple Pay Transaction
  /apple-pay/v1/merchant-token-event:
    post:
      operationId: applePayTokenEventPost_Notification
      summary: applePayTokenEventPost_Notification
      description: |
        Endpoint used for receiving Apple Pay token event notifications received through checkout service.
      tags:
        - apple pay tokenization
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - merchant_id
              properties:
                event_id:
                  type: string
                  description: Unique identifier of event.
                merchant_id:
                  type: string
                  description: Apple Pay merchant identifier.
      responses:
        '204':
          description: |
            No content, the service completed successfully and there is no content to be returned.
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Apple Pay Token Event Notifications
          sidebarTitle: Apple Pay Token Event Notifications
  /google-pay/v1/{account_id}/payments/{payment_id}/transactions:
    post:
      operationId: googlePayPost_Google_Pay_Transaction
      summary: googlePayPost_Google_Pay_Transaction
      description: Post a Google Pay transaction to the PSP.
      tags:
        - Google Pay
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - reference
                - payment_data
              additionalProperties: false
              properties:
                reference:
                  type: string
                  example: 01249a0e-18d9-4b8e-8834-2319b3f32bb5
                  description: Unique reference for this transaction
                  minLength: 8
                  maxLength: 40
                payment_data:
                  type: string
                  description: Should be a JSON stringified version of the PaymentData response from Google Pay API, see https://developers.google.com/pay/api/web/reference/response-objects#PaymentData
      responses:
        '200':
          description: Created transaction and auth instructions.
          content:
            application/json:
              schema:
                type: object
                required:
                  - auth_method
                  - operations
                  - payment_id
                  - transaction_id
                additionalProperties: false
                properties:
                  payment_id:
                    type: string
                  transaction_id:
                    type: string
                  auth_method:
                    type: object
                    description: Authentication instructions. If the Google Pay transaction was not verified, 3D-Secure authentication might be required.
                    required:
                      - type
                      - payment_id
                      - transaction_id
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_AUTHENTICATION
                          - MASTERCARD_TAF
                          - NONE
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                  operations:
                    type: array
                    items:
                      type: object
                      properties:
                        href:
                          type: string
                        method:
                          type: string
                          enum:
                            - POST
                        content_type:
                          type: string
                          enum:
                            - application/json
                        rel:
                          type: string
                          enum:
                            - 3d-secure-init-hosted
                            - 3d-secure-init
                            - 3d-secure-method-complete
                            - 3d-secure-challenge-complete
                            - 3d-secure-notification
                            - mastercard-taf-init-params
                            - mastercard-taf-challenge-complete
                            - authorization
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Google Pay Transaction
          sidebarTitle: Post Google Pay Transaction
  /transfer/v1/{account_id}/payments/{payment_id}/transactions:
    post:
      operationId: transferPost_Transfer_Transaction
      summary: transferPost_Transfer_Transaction
      description: |
        Push funds from a sender's card to a recipient identified by email or
        phone number, as a person-to-person transfer. The recipient's identifier
        is resolved to a card internally, and the transfer is routed to Visa
        Direct (OCT) or Mastercard Send depending on the resolved card's scheme.
      tags:
        - transfer
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/PostTransferCardBody'
                - $ref: '#/components/schemas/PostTransferTokenBody'
      responses:
        '200':
          description: Created transaction and auth instructions
          content:
            application/json:
              schema:
                type: object
                description: Created transaction and auth instructions
                required:
                  - auth_method
                  - operations
                  - payment_id
                  - transaction_id
                additionalProperties: false
                properties:
                  payment_id:
                    type: string
                  transaction_id:
                    type: string
                  auth_method:
                    type: object
                    description: Authentication instructions
                    required:
                      - type
                      - payment_id
                      - transaction_id
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        enum:
                          - SECURE_3D_AUTHENTICATION
                          - MASTERCARD_TAF
                          - NONE
                      payment_id:
                        type: string
                      transaction_id:
                        type: string
                  operations:
                    type: array
                    items:
                      type: object
                      properties:
                        href:
                          type: string
                        method:
                          type: string
                          enum:
                            - POST
                        content_type:
                          type: string
                          enum:
                            - application/json
                        rel:
                          type: string
                          enum:
                            - 3d-secure-init
                            - 3d-secure-method-complete
                            - 3d-secure-challenge-complete
                            - 3d-secure-notification
                            - mastercard-taf-init-params
                            - mastercard-taf-challenge-complete
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Transfer
          sidebarTitle: Post Transfer
  /transfer/v1/{account_id}/payments/{payment_id}/transactions/{transaction_id}/authorization:
    post:
      operationId: transferPost_Transfer_Authorization
      summary: transferPost_Transfer_Authorization
      description: |
        Finalize a transfer, pushing the funds to the recipient. Must be
        called after any required strong customer authentication (3-D Secure
        or Mastercard TAF) has completed.
      tags:
        - transaction
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - $ref: '#/components/parameters/PaymentIdParam'
        - $ref: '#/components/parameters/TransactionIdParam'
        - $ref: '#/components/parameters/AccessTokenAuth'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostTransferAuthorization'
      responses:
        '200':
          description: Authorization result
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                description: Transaction results
                required:
                  - results
                properties:
                  results:
                    type: array
                    minItems: 1
                    description: Array of performed operations and results
                    items:
                      type: object
                      required:
                        - result
                        - operation_data
                      additionalProperties: false
                      properties:
                        result:
                          $ref: '#/components/schemas/TransactionOperationResult'
                        operation_data:
                          $ref: '#/components/schemas/Transfer'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Post Transfer Authorization
          sidebarTitle: Post Transfer Authorization
  /visa-tokenization/v1/notifications/{notification_type}:
    post:
      operationId: tokenPost_Notification
      summary: tokenPost_Notification
      description: Endpoint used by VTS for token notifications
      tags:
        - visa tokenization
      parameters:
        - name: notification_type
          in: path
          required: true
          schema:
            type: string
            description: The type of the notification
            enum:
              - bulkProvisionedToken
              - taskStatus
              - tokenPushProvisioning
              - paymentTxns
              - provisionedToken
              - panMetadata
        - name: eventType
          in: query
          description: 'Included in following notifications: task status event, token status updated, and bulk provisioning job completed'
          schema:
            type: string
        - name: taskType
          in: query
          description: 'Included in following notifications: task status event and bulk provisioning job completed'
          schema:
            type: string
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type: number
                  description: event creation timestamp in epoch format
                vTaskID:
                  type: string
                  description: populated in case of async job
                relationshipID:
                  type: string
                  description: representing relationship between TR and TR-TSP
                api:
                  type: string
                vProvisionedTokenID:
                  type: string
                  description: Unique ID for token
                vNotificationID:
                  type: string
                  description: Reperso Notification ID
                clientReferenceID:
                  type: string
                deviceBindingInfo:
                  type: object
                vPanEnrollmentID:
                  type: string
                  description: Unique ID for enrolled PAN
                paymentInstrumentReference:
                  type: string
                enrollments:
                  type: array
                  items:
                    type: object
                    properties:
                      TSP:
                        type: string
                        description: Visa or Mastercard
                        enum:
                          - V
                          - MC
                      ref:
                        type: string
                        description: Payment instrument reference
                expireTimestamp:
                  type: string
                  description: timestamp when `paymentInstrumentReference` will expire in epoch format
                isPassCodeRequired:
                  type: string
                  description: whether OTP is required
                  enum:
                    - 'Y'
                    - 'N'
                clientInformation:
                  type: string
                  description: encrypted client information
                passCodeConversationID:
                  type: string
                  description: Used to enroll PAN when OTP is requred
                jobID:
                  type: string
                  description: Job ID assigned by VTS
                status:
                  type: string
                  description: bulk notification status
                messageType:
                  type: string
                  description: |
                    Token update status. Used for notification type `provisionedToken` when eventType is TOKEN_STATUS_UPDATED
      responses:
        '204':
          description: Notification received
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Token Notifications
          sidebarTitle: Token Notifications
  /mastercard-tokenization/v1/notifications/card:
    post:
      operationId: mastercardTokenPost_Notification
      summary: mastercardTokenPost_Notification
      description: Endpoint used by Mastercard for token notifications. The outbound CardNotification from Mastercard allows Integrators to keep credentials up-to-date with the latest status and underlying card information, including PAN details, card art, and token info.
      tags:
        - mastercard tokenization
      parameters:
        - name: X-Src-Response-Host
          in: header
          schema:
            type: string
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                digitalCardUpdateNotifications:
                  - eventTimeStamp: '1585741817000'
                    maskedCard:
                      dateOfCardCreated: '2020-02-24T11:32:32.060Z'
                      dateOfCardLastUsed: '2020-02-24T11:32:32.060Z'
                      dcf: null
                      digitalCardData:
                        artUri: https://assets.mastercard.com/card-art/combined-image-asset/9d42df54-c5fd-438b-a886-ff0bd1e8f7ec.png
                        descriptorName: Citi Bank Product Configuration
                        presentationName: null
                        status: CANCELLED
                        pendingEvents: null
                        artHeight: null
                        artWidth: null
                      digitalCardFeatures: null
                      maskedBillingAddress: null
                      panBin: '5455032'
                      panExpirationMonth: '04'
                      panExpirationYear: '2023'
                      panLastFour: '6828'
                      paymentAccountReference: 500150F5DE22SND132Y6PR32AR5HB
                      paymentCardDescriptor: Mastercard
                      paymentCardType: CREDIT
                      serviceId: COF_CP_GOO_1
                      srcDigitalCardId: e6016322-ac86-4ac7-8567-e7b8a424c70b
                      srcPaymentCardId: null
                      tokenBinRange: '123456'
                      tokenExpirationMonth: '02'
                      tokenExpirationYear: '2023'
                      tokenLastFour: '01234'
                      tokenUniqueReference: null
                    reason: ACCOUNT_CLOSED
                encryptedDigitalCardUpdateNotifications: s53feyJraWiOiIxc3RnLXNyYy1mcGFuLWVuY3J5$ÃƒÂ¢Ã¢â€š3Â¬Ã‚Â¦s232.
              properties:
                digitalCardUpdateNotifications:
                  type: array
                  description: An array of notifications sent when the card is updated.
                  items:
                    type: object
                    required:
                      - eventTimeStamp
                      - maskedCard
                    additionalProperties: true
                    properties:
                      eventTimeStamp:
                        type: string
                        example: '1585741817000'
                        description: Time stamp of the event, UTC time in Unix epoch format.
                      maskedCard:
                        type: object
                        description: Object for information related to a card enrolled in Mastercard Checkout Solutions (MCS). Details include card art, masked PAN information, and token data.
                        required:
                          - digitalCardData
                          - panExpirationMonth
                          - panExpirationYear
                          - srcDigitalCardId
                        additionalProperties: true
                        properties:
                          dateOfCardCreated:
                            type: string
                            description: Date (in UTC) when the card was enrolled into the Mastercard Checkout Solutions (MCS) system.
                            example: '2020-02-24T11:32:32.060Z'
                          dateOfCardLastUsed:
                            type: string
                            x-nullable: true
                            description: Date (in UTC) when the card was last used for a Mastercard Checkout Solutions (MCS) transaction.
                            example: '2020-02-24T11:32:32.060Z'
                          dcf:
                            type: string
                            x-nullable: true
                          delegatedAuthenticationModels:
                            type: array
                            x-nullable: true
                            description: Delegated authentication models for authenticating the consumer. For Mastercard Checkout Solutions (MCS), this will only be available for enroll and get card responses.
                            items:
                              type: object
                              properties:
                                isSupported:
                                  type: boolean
                                  example: true
                                  description: Flag indicating whether Token Authentication Framework (TAF) is supported for the PAN. TAF enables Cardholder authentication on tokenized transactions for Mastercard Checkout Solutions (MCS).
                                modelType:
                                  type: string
                                  description: |-
                                    Supported Token Authentication Framework (TAF) implementation. TAF enables Cardholder authentication on tokenized transactions for Mastercard Checkout Solutions (MCS). Mastercard currently offers version AE_TYPE_3 and AE_TYPE_4.
                                    AE_TYPE_3 indicates that the card is eligible for authentication in the Acquirer domain without Merchant liability protection.
                                    AE_TYPE_4 indicates that the card is eligible for authentication in the Acquirer domain with Merchant liability protection.
                                  example: AE_TYPE_3
                                  enum:
                                    - AE_TYPE_3
                                    - AE_TYPE_4
                          digitalCardData:
                            properties:
                              artUri:
                                example: https://stage.assets.mastercard.com/card-art/combined-image-asset/MyBank-mastercard.png
                                type: string
                                description: URI that digitally represents the physical look of a card. This card art image can be used for presentation purposes in user experiences and is provided by Issuers.
                                x-nullable: true
                              artHeight:
                                type: string
                                x-nullable: true
                              artWidth:
                                type: string
                                x-nullable: true
                              coBrandedName:
                                maxLength: 128
                                example: Very Nice Hotels
                                type: string
                                description: Name of the company partnering with an Issuer for a co-branded card.
                                x-nullable: true
                              descriptorName:
                                example: mastercard
                                maxLength: 64
                                type: string
                                description: Issuers name their card portfolios, and they will create both long descriptions and short descriptions to market their cards to Cardholders. This is the short description for a card.
                                x-nullable: true
                              pendingEvents:
                                type: array
                                x-nullable: true
                                items:
                                  type: string
                              presentationName:
                                type: string
                                x-nullable: true
                              isCoBranded:
                                example: true
                                type: boolean
                                description: Indicates whether the card is co-branded.
                                x-nullable: true
                              status:
                                enum:
                                  - ACTIVE
                                  - CANCELLED
                                  - SUSPENDED
                                example: ACTIVE
                                type: string
                                description: |
                                  State of the digital card at any given time in the Mastercard Checkout Solutions (MCS) system.

                                    * ACTIVE - Token is active and able to transact.
                                    * SUSPENDED - Token is suspended by the Issuer and unable to transact.
                                    * CANCELLED - Token is deleted by the Issuer and unable to transact.
                              issuerName:
                                minLength: 1
                                maxLength: 64
                                example: My Bank
                                type: string
                                description: Name of the issuing bank.
                                x-nullable: true
                              longDescription:
                                minLength: 1
                                maxLength: 256
                                example: Bank Double Cash Back Rewards Mastercard
                                type: string
                                description: Banks name their card portfolios, and they will create both long descriptions and short descriptions to market their cards to Cardholders. This is the long description for a card.
                                x-nullable: true
                              foregroundColor:
                                minLength: 0
                                maxLength: 6
                                example: FF5733
                                type: string
                                description: Foreground color used to overlay text on top of the card image. This is always returned in the product configuration object.
                                x-nullable: true
                            required:
                              - status
                            additionalProperties: true
                            type: object
                            description: |
                              Object for card data including token info, status, card art, and card descriptors.
                          digitalCardFeatures:
                            type: object
                            x-nullable: true
                          maskedBillingAddress:
                            type: string
                            x-nullable: true
                          panBin:
                            example: '545503'
                            format: numeric
                            type: string
                            description: The first six digits of a PAN, typically the Issuer BIN, in an unmasked form.
                            x-nullable: true
                          panExpirationMonth:
                            example: '04'
                            format: numeric
                            type: string
                            description: Expiration month of the Payment Card expressed as a two-digit calendar month used for presentation purposes.
                          panExpirationYear:
                            example: '2023'
                            format: numeric
                            type: string
                            description: Expiration year of the Payment Card expressed as four-digit calendar year, used for presentation purposes.
                          panLastFour:
                            example: '6828'
                            format: numeric
                            type: string
                            description: Attribute of the card that represents the last four digits of the PAN in an unmasked form.
                          paymentAccountReference:
                            example: 34510HLHA68IX5I33N71011MWLDW
                            maxLength: 29
                            type: string
                            description: |
                              A non-financial reference assigned to each unique PAN that's used to link the payment account of that PAN to affiliated payment tokens.
                          paymentCardDescriptor:
                            example: mastercard
                            type: string
                            description: |
                              Indicates the card payment network. This will be set to 'mastercard' or 'maestro'.
                          paymentCardType:
                            enum:
                              - CREDIT
                              - DEBIT
                              - PREPAID
                              - COMBO
                              - FLEX
                            example: DEBIT
                            type: string
                            description: Conveys the card type. Note that COMBO and FLEX are for applicable regions, only.
                          serviceId:
                            example: SECURE_COF_MERCHANT_OBO#SRC4M-OBO-ALL4PETS#01
                            type: string
                            description: A unique identifier assigned by Mastercard for which tokens are created uniquely for the entity onboarded.
                          srcDigitalCardId:
                            example: 68bf50ec-0e8b-414f-8cfc-63e9c3fb9d48
                            type: string
                            description: A unique identifier that represents the token associated with a card enrolled into Mastercard Checkout Solutions (MCS). Use this srcDigitalCardId in subsequent checkout requests to retrieve a DSRP payload containing the associated token and cryptogram for payment authorization. Alternatively, use the srcDigitalCardId in a get card request to retrieve the maskedCard details.
                          srcPaymentCardId:
                            type: string
                            x-nullable: true
                          tokenBinRange:
                            maxLength: 10
                            example: '5234'
                            type: string
                            x-nullable: true
                            description: Specific BIN range or subset of a BIN range that has been designated only for the purpose of issuing payment tokens, included in an unmasked form.
                          tokenExpirationMonth:
                            format: numeric
                            example: '11'
                            type: string
                            description: Expiration month of the token expressed as a two-digit calendar month.
                          tokenExpirationYear:
                            minLength: 4
                            maxLength: 4
                            example: '2022'
                            format: numeric
                            type: string
                            description: Expiration year of the token expressed as four-digit calendar year.
                          tokenLastFour:
                            example: '1234'
                            format: numeric
                            type: string
                            description: Last four digits of the payment token in an unmasked form.
                          tokenUniqueReference:
                            example: MS4NHG0000123450f2f3d2009897da0831ce1234ab12345
                            type: string
                            description: The value of a unique identifier for a token provided by Mastercard Digital Enablement Services (MDES).
                            x-nullable: true
                      reason:
                        type: string
                        description: Provides directional guidance as to why a notification has been received.
                        x-nullable: true
                        enum:
                          - ACCOUNT_CLOSED
                          - ACCOUNT_UPDATED
                          - CARD_ART_UPDATE
                          - DEVICE_FOUND
                          - DEVICE_LOST
                          - DEVICE_STOLEN
                          - FRAUD_MITIGATED
                          - OTHER
                          - SUSPECTED_FRAUD
                          - TOKEN_ACTIVATED
                          - TOKEN_REFRESH
                      encryptedPaymentData:
                        type: string
                        description: |
                          Encrypted payment data object which includes the payment token and expiration date.
                          This object will be populated when token number is changed and client haven't opted for full encrypted notification.
                encryptedDigitalCardUpdateNotifications:
                  type: string
                  description: Object for encrypted digitalCardUpdateNotifications. Refer to digitalCardUpdateNotifications for more info. If the client is set up for encrypted outbound notifications, when a card is updated - the payload (JWE) will be encrypted using the clients public key (encryption key), and the key alias will be included in the JWE header.
                  example: s53feyJraWiOiIxc3RnLXNyYy1mcGFuLWVuY3J5$ÃƒÂ¢Ã¢â€š3Â¬Ã‚Â¦s232.
      responses:
        '204':
          description: No content, the service completed successfully and there is no content to be returned. If this response code is not given we will attempt a single retry.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Token Notifications
          sidebarTitle: Token Notifications
  /mastercard-tokenization/v1/notifications/batch/enrollmentrecord:
    post:
      operationId: mastercardTokenBatchPost_Notification
      summary: mastercardTokenBatchPost_Notification
      description: Endpoint used by Mastercard for notifications for batch enrollment of cards.
      tags:
        - mastercard tokenization
      parameters:
        - name: X-Src-Response-Host
          in: header
          schema:
            type: string
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - batchId
                - externalBatchId
                - enrollmentRecordNotifications
              properties:
                batchId:
                  type: string
                  example: a6016322-ac86-4ac7-8567-e7b8a424c78c
                  maxLength: 36
                externalBatchId:
                  type: string
                  example: 6ecbf087-f159-4d69-b31d-00bec75c0478
                  maxLength: 100
                eventTimeStamp:
                  type: string
                  example: '1585741817000'
                enrollmentRecordNotifications:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    properties:
                      cardRecords:
                        type: array
                        minItems: 1
                        items:
                          $ref: '#/components/schemas/CardRecord'
      responses:
        '204':
          description: No content, the service completed successfully and there is no content to be returned. If this response code is not given we will attempt a single retry.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Batch token notifications
          sidebarTitle: Batch token notifications
  /admin/block-rules/v1/{account_id}:
    post:
      operationId: adminPost_BlockRule
      summary: adminPost_BlockRule
      description: |
        Create block rules for blocking payments based on certain criteria.
      tags:
        - block-rules
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
        - name: account_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - value
                - type
                - blocked_by
              additionalProperties: false
              properties:
                description:
                  type: string
                  description: Describe the purpose of the block rule
                type:
                  type: string
                  enum:
                    - name
                    - country
                    - email
                    - phone_number
                    - ip_cidr_block
                    - bin
                value:
                  type: object
                  oneOf:
                    - $ref: '#/components/schemas/BlockRuleValueName'
                    - $ref: '#/components/schemas/BlockRuleValueCountry'
                    - $ref: '#/components/schemas/BlockRuleValueEmail'
                    - $ref: '#/components/schemas/BlockRuleValuePhone'
                    - $ref: '#/components/schemas/BlockRuleValueIP'
                    - $ref: '#/components/schemas/BlockRuleValueBIN'
                expires_at:
                  type: string
                  format: date-time
                  description: Use to set a time limited rule
                blocked_by:
                  type: string
                  description: Human readable version of the system that created the block rule, eg. 'backoffice' or 'fraud-service'
      responses:
        '200':
          description: Created block rule
          content:
            application/json:
              schema:
                type: object
                description: Created block rule
                required:
                  - block_rule
                additionalProperties: false
                properties:
                  block_rule:
                    $ref: '#/components/schemas/BlockRule'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Create a block rule
          sidebarTitle: Create a block rule
    get:
      operationId: adminGetByType_BlockRule
      summary: adminGetByType_BlockRule
      description: Get all block rules or a list a particular type of block rules
      tags:
        - block-rules
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
        - name: account_id
          in: path
          required: true
          schema:
            type: string
        - name: type
          in: query
          schema:
            type: string
            enum:
              - ip_cidr_block
              - bin
              - email
              - phone_number
              - name
              - country
            description: parameter to filter the block rules by type. Return all types by default.
        - name: limit
          in: query
          schema:
            type: integer
            description: A limit on the number of objects to be returned. Default is all.
        - name: starting_after
          in: query
          schema:
            format: block_rule_id
            description: |
              cursor for use in pagination. starting_after is an object ID
              that defines your place in the list. For instance, if you make
              a list request and receive 100 objects, ending with `obj_foo`,
              your subsequent call can include `starting_after=obj_foo`
              in order to fetch the next page of the list.
            type: string
        - name: deleted
          in: query
          schema:
            type: boolean
            description: parameter to filter deleted object in the list. Default is false and will return only non deleted objects.
      responses:
        '200':
          description: Block rules get by type
          content:
            application/json:
              schema:
                type: object
                description: Block rule response
                required:
                  - block_rules
                additionalProperties: false
                properties:
                  block_rules:
                    type: array
                    items:
                      $ref: '#/components/schemas/BlockRule'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Get block rules
          sidebarTitle: Get block rules
  /admin/block-rules/v1/{account_id}/{block_rule_id}:
    get:
      operationId: adminGet_BlockRule
      summary: adminGet_BlockRule
      description: Get block rule by id
      tags:
        - block-rules
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
        - name: account_id
          in: path
          required: true
          schema:
            type: string
        - name: block_rule_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Block rule get by id
          content:
            application/json:
              schema:
                type: object
                description: Block rule response
                required:
                  - block_rule
                additionalProperties: false
                properties:
                  block_rule:
                    $ref: '#/components/schemas/BlockRule'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Get block rule
          sidebarTitle: Get block rule
    patch:
      operationId: adminPatch_BlockRule
      summary: adminPatch_BlockRule
      description: Update block rule by id
      tags:
        - block-rules
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
        - name: account_id
          in: path
          required: true
          schema:
            type: string
        - name: block_rule_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                description:
                  type: string
                  description: Describe the purpose of the block rule
                type:
                  type: string
                  description: To change the type, value must also be provided.
                  enum:
                    - ip_cidr_block
                    - bin
                value:
                  type: object
                  description: To change the value, type must also be provided.
                  oneOf:
                    - $ref: '#/components/schemas/BlockRuleValueIP'
                    - $ref: '#/components/schemas/BlockRuleValueBIN'
                expires_at:
                  type: string
                  format: date-time
                  description: Use to set a time limited rule
      responses:
        '200':
          description: Updated block rule
          content:
            application/json:
              schema:
                type: object
                description: Updated block rule response
                required:
                  - block_rule
                additionalProperties: false
                properties:
                  block_rule:
                    $ref: '#/components/schemas/BlockRule'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Patch block rule
          sidebarTitle: Patch block rule
    delete:
      operationId: adminDelete_BlockRule
      summary: adminDelete_BlockRule
      description: Delete block rule by id
      tags:
        - block-rules
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
        - name: account_id
          in: path
          required: true
          schema:
            type: string
        - name: block_rule_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Deleted block rule
          content:
            application/json:
              schema:
                type: object
                description: deleted block rule response
                required:
                  - block_rule
                additionalProperties: false
                properties:
                  block_rule:
                    $ref: '#/components/schemas/BlockRule'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Delete block rule
          sidebarTitle: Delete block rule
  /merchant-certificates/v1/{account_id}:
    post:
      operationId: adminPost_MerchantCertificate
      summary: adminPost_MerchantCertificate
      description: |
        Generates an ECC P-256 key pair for a merchant payment certificate (e.g.
        for native Apple Pay), stores the encrypted private key, and returns a
        CSR for the merchant to submit to the certificate provider.
      tags:
        - merchant-certificates
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
        - name: dintero-user
          in: header
          required: true
          schema:
            type: string
            description: Identity of the authenticated user on whose behalf the caller is acting, for audit tracking
        - name: account_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - type
              additionalProperties: false
              properties:
                type:
                  type: string
                  enum:
                    - apple_pay
                  description: The merchant certificate type/provider
      responses:
        '201':
          description: Merchant certificate key generated
          content:
            application/json:
              schema:
                type: object
                description: Generated merchant certificate key and CSR
                required:
                  - id
                  - type
                  - status
                  - fingerprint
                  - csr
                  - created_by
                  - created_at
                  - expires_at
                additionalProperties: false
                properties:
                  id:
                    type: string
                  type:
                    type: string
                    enum:
                      - apple_pay
                  status:
                    type: string
                    enum:
                      - pending
                  fingerprint:
                    type: string
                    description: SHA-256 hex of the generated public key
                  csr:
                    type: string
                    description: base64-encoded DER PKCS#10 certificate signing request
                  created_by:
                    type: string
                    description: Identity of the authenticated user who requested this key (echoed back)
                  created_at:
                    type: string
                    format: date-time
                  expires_at:
                    type: string
                    format: date-time
                    description: Deadline to upload a signed certificate before this pending key expires
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: Maximum number of active or pending certificates already reached for this type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Generate a merchant certificate key pair and CSR
          sidebarTitle: Generate a merchant certificate key pair and CSR
    get:
      operationId: adminGet_MerchantCertificates
      summary: adminGet_MerchantCertificates
      description: |
        Lists merchant certificates for the account (pending, active, and
        expired). Revoked certificates are excluded by default; pass
        include_deleted=true to see them too.
      tags:
        - merchant-certificates
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
        - name: account_id
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: string
            description: A limit on the number of objects to be returned. Default is 10.
        - name: starting_after
          in: query
          schema:
            type: string
            description: |
              Cursor for pagination. starting_after is a certificate id that
              defines your place in the list. For instance, if you make a list
              request and receive 10 objects, ending with id `mcert_foo`, your
              subsequent call can include `starting_after=mcert_foo` to fetch
              the next page.
        - name: include_deleted
          in: query
          schema:
            type: string
            description: Set to "true" to include revoked certificates in the results. Default is false and will return only non-revoked certificates.
      responses:
        '200':
          description: Merchant certificates for the account
          content:
            application/json:
              schema:
                type: object
                description: List of merchant certificates
                required:
                  - items
                additionalProperties: false
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - type
                        - status
                        - fingerprint
                        - created_at
                        - expires_at
                      additionalProperties: false
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                          enum:
                            - apple_pay
                        status:
                          type: string
                          enum:
                            - pending
                            - active
                            - expired
                            - revoked
                        fingerprint:
                          type: string
                          description: SHA-256 hex of the public key
                        created_by:
                          type: string
                          nullable: true
                          description: Identity of the user who requested this key
                        created_at:
                          type: string
                          format: date-time
                        expires_at:
                          type: string
                          format: date-time
                          nullable: true
                          description: Pending-upload deadline or certificate expiry; null if not set
                        deleted_by:
                          type: string
                          nullable: true
                          description: Identity of the user who revoked this key; null unless status is revoked
                        deleted_at:
                          type: string
                          format: date-time
                          nullable: true
                          description: When this key was revoked; null unless status is revoked
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: List merchant certificates
          sidebarTitle: List merchant certificates
  /merchant-certificates/v1/{account_id}/{merchant_certificate_id}/certificate:
    put:
      operationId: adminPut_MerchantCertificateCertificate
      summary: adminPut_MerchantCertificateCertificate
      description: |
        Uploads an Apple-signed certificate for a pending merchant certificate key,
        activating it.
      tags:
        - merchant-certificates
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
        - name: account_id
          in: path
          required: true
          schema:
            type: string
        - name: merchant_certificate_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - certificate
              additionalProperties: false
              properties:
                certificate:
                  type: string
                  description: base64-encoded DER X.509 certificate
      responses:
        '200':
          description: Certificate uploaded and merchant certificate activated
          content:
            application/json:
              schema:
                type: object
                description: Activated merchant certificate
                required:
                  - id
                  - type
                  - status
                  - fingerprint
                  - created_at
                  - expires_at
                additionalProperties: false
                properties:
                  id:
                    type: string
                  type:
                    type: string
                    enum:
                      - apple_pay
                  status:
                    type: string
                    enum:
                      - active
                  fingerprint:
                    type: string
                    description: SHA-256 hex of the certificate's public key
                  created_at:
                    type: string
                    format: date-time
                  expires_at:
                    type: string
                    format: date-time
                    description: The uploaded certificate's own expiry
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Merchant certificate is not in pending state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Upload a signed merchant certificate
          sidebarTitle: Upload a signed merchant certificate
  /merchant-certificates/v1/{account_id}/{merchant_certificate_id}:
    delete:
      operationId: adminDelete_MerchantCertificate
      summary: adminDelete_MerchantCertificate
      description: |
        Revokes (deactivates) a merchant certificate. Revocation is final; a
        revoked certificate cannot be reactivated.
      tags:
        - merchant-certificates
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            description: API Client
        - name: dintero-user
          in: header
          required: true
          schema:
            type: string
            description: Identity of the authenticated user on whose behalf the caller is acting, for audit tracking
        - name: account_id
          in: path
          required: true
          schema:
            type: string
        - name: merchant_certificate_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Merchant certificate revoked
          content:
            application/json:
              schema:
                type: object
                description: Revoked merchant certificate
                required:
                  - id
                  - type
                  - status
                  - fingerprint
                  - created_at
                  - expires_at
                  - deleted_by
                  - deleted_at
                additionalProperties: false
                properties:
                  id:
                    type: string
                  type:
                    type: string
                    enum:
                      - apple_pay
                  status:
                    type: string
                    enum:
                      - revoked
                  fingerprint:
                    type: string
                    description: SHA-256 hex of the public key
                  created_by:
                    type: string
                    nullable: true
                    description: Identity of the user who requested this key
                  created_at:
                    type: string
                    format: date-time
                  expires_at:
                    type: string
                    format: date-time
                    nullable: true
                    description: Pending-upload deadline or certificate expiry; null if not set
                  deleted_by:
                    type: string
                    description: Identity of the user who revoked this key (echoed back)
                  deleted_at:
                    type: string
                    format: date-time
                    description: When this key was revoked
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Merchant certificate is already revoked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Revoke a merchant certificate
          sidebarTitle: Revoke a merchant certificate
components:
  schemas:
    CardPayload:
      x-tags:
        - encrypted-payload-models
      $ref: '#/components/schemas/cardPayload'
    CardPayloadTransfer:
      x-tags:
        - encrypted-payload-models
      $ref: '#/components/schemas/cardPayloadTransfer'
    Error:
      type: object
      description: An error occurred
      required:
        - error
      additionalProperties: false
      properties:
        error:
          type: string
    Customer:
      type: object
      description: Information about the end customer / cardholder
      additionalProperties: false
      properties:
        name:
          type: string
          description: Name of customer / cardholder. Must be ascii only
          minLength: 2
          maxLength: 45
          format: ascii
        email:
          type: string
          maxLength: 254
          format: email
          description: Required to provision card token
        phone_number:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          description: A phone number in E.164 format
        locale:
          type: string
          pattern: ^[a-z]{2}_[A-Z]{2}$
          description: Language and country code based on ISO639-1 and  ISO3166-1 alpha-2 separated by an underscore. Required  to provision card token.
          example: en_US
        billing_address:
          type: object
          required:
            - city
            - country_code
            - line_1
            - post_code
          additionalProperties: false
          properties:
            city:
              type: string
              maxLength: 50
            country_code:
              type: string
              example: 'NO'
              pattern: ^[A-Z]{2}
            line_1:
              type: string
              maxLength: 50
            line_2:
              type: string
              maxLength: 50
            line_3:
              type: string
              maxLength: 50
            post_code:
              type: string
              maxLength: 16
            state:
              type: string
              description: Use ISO 3166-2, or leave blank
              maxLength: 3
    RecipientIdentifier:
      type: object
      description: Identifier used to resolve a Transfer recipient's card. Required in payment when creating a payment for a Transfer transaction.
      oneOf:
        - type: object
          required:
            - type
            - value
          additionalProperties: false
          properties:
            type:
              type: string
              enum:
                - email
            value:
              type: string
              format: email
              maxLength: 254
        - type: object
          required:
            - type
            - value
          additionalProperties: false
          properties:
            type:
              type: string
              enum:
                - phone
            value:
              type: string
              format: E.164
              pattern: ^\+[1-9]\d{1,14}$
              example: '+4799999999'
              description: Phone number in E.164 format
    IssuerCountryCondition:
      type: object
      description: |
        Condition based on the issuer country of the payment card.
        If the issuer country of the payment card is not in the defined list other rules do not apply.
      required:
        - type
        - values
      additionalProperties: false
      properties:
        type:
          type: string
          description: |
            Condition based on the issuer country of the payment card.
          enum:
            - issuer_country
        values:
          type: array
          maxItems: 250
          items:
            type: string
            pattern: ^([A-Z]{2}|\*)$
          description: |
            List of ISO 3166-1 alpha-2 country codes or wildcard (`*`).
            The issuer country of the payment card has to be in this list to allow skipping SCA.
            Add a wildcard (`*`) to a allow all countries. Leaving it empty will not allow skipping SCA.
          uniqueItems: true
    AmountLTERule:
      type: object
      description: |
        Condition based on the merchant defined transaction limit and issuer country of the payment card.
        If the transaction amount is less than or equal to the defined limit and the issuer country of the payment card is in the defined list, SCA can be skipped.
      required:
        - limit
        - issuer_countries
      additionalProperties: false
      properties:
        limit:
          type: object
          description: |
            Condition based on the transaction amount.
            If the transaction amount is less than or equal to the defined limit, SCA can be skipped.
          required:
            - type
            - value
          additionalProperties: false
          properties:
            type:
              type: string
              enum:
                - amount_lte
              description: |
                Needs to be present. Defines the maximum amount a transaction can be to allow skipping SCA.
            value:
              type: integer
              description: |
                The maximum amount for which the SCA exemption can be applied.
                The amount is defined in the smallest unit of the currency (e.g. cents for EUR).
                The currency is the currency of the transaction.
              minimum: 0
        issuer_countries:
          $ref: '#/components/schemas/IssuerCountryCondition'
    SCARules:
      type: object
      description: |
        SCA rules for the payment method.
      additionalProperties: false
      properties:
        network_exemptions:
          type: object
          additionalProperties: false
          properties:
            low_value:
              type: boolean
              description: |
                If true we should set the low value exemption flag.
            low_risk:
              type: boolean
              description: |
                If true we should set the low risk exemption flag.
        liability_rules:
          type: object
          description: |
            Rules that define if SCA can be skipped for a transaction.
          additionalProperties: false
          properties:
            amount_lte:
              $ref: '#/components/schemas/AmountLTERule'
    SCAPolicy:
      type: object
      additionalProperties: false
      description: |
        Strong Customer Authentication (SCA) policies to apply to this payment.
        If omitted, the default behavior is to always require SCA and not submit any exemption flags.
      properties:
        card:
          $ref: '#/components/schemas/SCARules'
        vipps:
          $ref: '#/components/schemas/SCARules'
        applepay:
          $ref: '#/components/schemas/SCARules'
        googlepay:
          $ref: '#/components/schemas/SCARules'
        visa_click_to_pay:
          $ref: '#/components/schemas/SCARules'
    PaymentConfiguration:
      type: object
      description: Payment configuration
      additionalProperties: false
      required:
        - merchant
        - processor
        - processor_configuration
        - payment_systems
      properties:
        merchant:
          type: object
          additionalProperties: false
          required:
            - merchant_name
            - merchant_website
            - merchant_category_code
            - merchant_address
          properties:
            merchant_name:
              type: string
              minLength: 1
              maxLength: 150
            merchant_website:
              type: string
              format: uri
            merchant_category_code:
              type: string
              pattern: ^\d{1,4}
            merchant_email:
              type: string
            merchant_phone_number:
              type: string
            merchant_address:
              type: object
              required:
                - country_code
              additionalProperties: false
              properties:
                city:
                  type: string
                  maxLength: 50
                country_code:
                  type: string
                  example: 'NO'
                  pattern: ^[A-Z]{2}
                line_1:
                  type: string
                  maxLength: 50
                line_2:
                  type: string
                  maxLength: 50
                post_code:
                  type: string
                  maxLength: 16
                state:
                  type: string
                  description: State, province or other country subdivision
        processor:
          type: string
          enum:
            - dintero
            - sandbox
        processor_configuration:
          type: object
          additionalProperties: false
          properties:
            dintero:
              type: object
              required:
                - type
              additionalProperties: false
              properties:
                type:
                  type: string
                  enum:
                    - dintero
                visa_net_connect_client_id:
                  type: string
                  description: The merchant id with Visa
                acquirer_merchant_id:
                  description: Acquirer-assigned Merchant identifier as sent to 3dsecure.io. See https://docs.3dsecure.io/3dsv2/specification_220.html#attr-AReq-acquirerMerchantID
                  type: string
            sandbox:
              type: object
              required:
                - type
              additionalProperties: false
              properties:
                type:
                  type: string
                  enum:
                    - sandbox
                acquirer_merchant_id:
                  description: Acquirer-assigned Merchant identifier as sent to 3dsecure.io. See https://docs.3dsecure.io/3dsv2/specification_220.html#attr-AReq-acquirerMerchantID
                  type: string
        payment_systems:
          type: object
          additionalProperties: false
          properties:
            visa_click_to_pay:
              type: object
              required:
                - type
                - enabled
                - card_brands
              additionalProperties: false
              properties:
                type:
                  type: string
                  enum:
                    - visaClickToPay
                enabled:
                  type: boolean
                card_brands:
                  type: array
                  description: A list of supported card brands
                  items:
                    type: string
                    enum:
                      - visa
                      - mastercard
            card:
              type: object
              required:
                - type
                - enabled
                - card_brands
              additionalProperties: false
              properties:
                type:
                  type: string
                  enum:
                    - card
                enabled:
                  type: boolean
                card_brands:
                  type: array
                  description: A list of supported card brands
                  items:
                    type: string
                    enum:
                      - visa
                      - mastercard
                      - maestro
            vipps:
              type: object
              required:
                - type
                - enabled
                - card_brands
                - logo
                - display_name
                - merchant_serial_number
              additionalProperties: false
              properties:
                type:
                  type: string
                  enum:
                    - vipps
                enabled:
                  type: boolean
                card_brands:
                  type: array
                  description: A list of supported card brands
                  items:
                    type: string
                    enum:
                      - visa
                      - mastercard
                logo:
                  type: string
                  description: Base64 encoded string of merchant's logo in PNG format. Displayed in         Vipps app and on receipts. Square images recommended. Minimum size is         100x100 pixels. Maximum size is 1000 pixels on longest side.
                display_name:
                  type: string
                  description: Merchant name shown to customer in Vipps app. Can be different from legal name
                  maxLength: 255
                contact_email:
                  type: string
                  description: Contact email for merchant. Uses company email as fallback
                  maxLength: 255
                merchant_serial_number:
                  type: string
                  description: The merchant serial number configured in Vipps
                test_processor:
                  type: string
                  enum:
                    - dintero
                  description: |
                    Should only be used for a T-account, will be ignored for a P-account.
                    If set, overrides the payment system to be dintero. This results
                    in using the Vipps test environment instead of the Dintero Vipps sandbox.
            applepay:
              type: object
              required:
                - type
                - enabled
                - card_brands
                - apple_merchant_id
                - display_name
                - initiative
                - initiative_context
              additionalProperties: false
              properties:
                type:
                  type: string
                  enum:
                    - applepay
                enabled:
                  type: boolean
                card_brands:
                  type: array
                  description: A list of supported card brands
                  items:
                    type: string
                    enum:
                      - visa
                      - mastercard
                      - maestro
                apple_merchant_id:
                  type: string
                  description: Apple merchant ID. For payment platforms registering merchants through the Apple Pay Web Merchant Registration API, this should be the partnerInternalMerchantIdentifier defined for each registered merchant.
                  maxLength: 255
                display_name:
                  type: string
                  description: A string of 64 or fewer UTF-8 characters containing the canonical name for your store, suitable for display. This needs to remain a consistent value for the store and shouldn’t contain dynamic values such as incrementing order numbers. Don’t localize the name. Use only characters from the supported character sets in the fonts listed in the table below.
                  maxLength: 64
                initiative:
                  type: string
                  description: A predefined value that identifies the e-commerce application making the request.
                  enum:
                    - web
                initiative_context:
                  type: string
                  description: A value you provide based on the initiative. For “web” initiative provide your fully qualified domain name associated with your Apple Pay Merchant Identity Certificate.
            visa_token_service:
              type: object
              additionalProperties: false
              required:
                - type
                - card_brands
                - enabled
                - relationship_id
                - client_app_id
              properties:
                type:
                  type: string
                  enum:
                    - visaTokenService
                enabled:
                  type: boolean
                card_brands:
                  type: array
                  items:
                    type: string
                    enum:
                      - visa
                client_app_id:
                  type: string
                  description: Identifier for client application. Merchant specific.
                  example: Dintero001
                relationship_id:
                  type: string
                  description: Identifying relationship between merchant and Dintero psp.
                  example: 12345678-80000000000
            mastercard_token_service:
              type: object
              additionalProperties: false
              required:
                - type
                - card_brands
                - enabled
                - src_dpa_id
                - service_id
              properties:
                type:
                  type: string
                  enum:
                    - mastercardTokenService
                enabled:
                  type: boolean
                card_brands:
                  type: array
                  items:
                    type: string
                    enum:
                      - mastercard
                      - maestro
                src_dpa_id:
                  type: string
                  description: Digital Payment Application (DPA) ID. Identifier for client application. Merchant specific.
                  example: f0589e4f-10f3-4e2e-bab6-d22a3de576c0_ef6399d7-98d5-46aa-a50c-bbcf7a7fa846
                service_id:
                  type: string
                  description: A unique identifier assigned by Mastercard for which tokens are created uniquely for the entity onboarded.
                  example: SECURE_COF_MERCHANT_OBO#SRC4M-OBO-ALL4PETS#01
            sandbox_token_service:
              type: object
              additionalProperties: false
              required:
                - type
                - card_brands
                - enabled
              properties:
                type:
                  type: string
                  enum:
                    - sandboxTokenService
                enabled:
                  type: boolean
                card_brands:
                  type: array
                  items:
                    type: string
                    enum:
                      - visa
                      - mastercard
                      - maestro
            google_pay:
              type: object
              additionalProperties: false
              required:
                - type
                - card_brands
                - enabled
              properties:
                type:
                  type: string
                  enum:
                    - googlePay
                enabled:
                  type: boolean
                card_brands:
                  type: array
                  items:
                    type: string
                    enum:
                      - visa
                      - mastercard
                return_url:
                  type: string
                  description: The return URL for the application. 3DS will redirect here after completion with a query parameters to indicate the result of the authentication. The query parameter `status_3ds` will be set to either 3DS_SUCCESS, 3DS_FAILURE or 3DS_CANCEL.
            transfer:
              type: object
              additionalProperties: false
              required:
                - type
                - card_brands
                - enabled
              properties:
                type:
                  type: string
                  enum:
                    - transfer
                enabled:
                  type: boolean
                card_brands:
                  type: array
                  items:
                    type: string
                    enum:
                      - visa
                      - mastercard
        token_settings:
          type: object
          additionalProperties: false
          description: |
            Settings for card tokenization
          properties:
            generate_payment_token:
              description: |-
                Generate payment token to use for future payments.
                The generated payment token will be made available from the payment details.
              type: boolean
            generate_payment_token_config:
              type: object
              additionalProperties: false
              description: |
                Configuration for generating payment token. If `generate_payment_token` is true and 
                configuration is omitted, the card will be tokenized.
              properties:
                save_card_checkbox:
                  type: string
                  enum:
                    - opt_in
                    - opt_out
                  description: |
                    `opt_in` - Cardholder needs to opt-in to saving card, so the checkbox should not be checked by default.
                    `opt_out` - Cardholder needs to opt-out of saving card, so the checkbox should be checked by default.

                    `generate_payment_token` must be true for this to have any effect. If `generate_payment_token` is true
                    and `save_card_checkbox` is omitted, the card will be tokenized.
            recurring_model:
              description: |
                Indicates the type of the current token transaction.
                This field is required when supplying a token_id in `card_tokens.token_id`.

                <br>`cit` - A CIT (cardholder-initiated transaction) enables one-click payment journeys.
                <br>`subscription` - A transaction for a fixed or variable amount, which follows a fixed schedule.
                <br>`unscheduled` - A transaction that occurs on a non-fixed schedule and/or have variable amounts.
              type: string
              enum:
                - cit
                - subscription
                - unscheduled
            supported_auth_methods:
              type: array
              description: |
                Indicates which authentication methods to support during token authentication flows.
                The list order determines which method is preferred.
                Methods are subject to card and device support.

                - `3DS`: Carholder authentication through 3D-Secure.
                - `PASSKEY`: Cardholder is prompted to create and authenticate with a device-bound Passkey.
              example:
                - PASSKEY
                - 3DS
              items:
                type: string
                enum:
                  - 3DS
                  - PASSKEY
        capture_type:
          type: string
          description: |
            Controls when the funds will be captured from the payers’s account.
            <br>`manual` - capture is done in a separate transaction.
            <br>`automatic` - captures the funds with the authorization.
          enum:
            - manual
            - automatic
          default: manual
        pre_authorization:
          type: boolean
          default: false
          description: Set to `true` to post the first authorization as a pre-authorization.
        sca_policy:
          $ref: '#/components/schemas/SCAPolicy'
        urls:
          type: object
          description: Object containing URLs for the payment. <br> `authorization` - URL used to perform authorization for the payment.
          additionalProperties: false
          required:
            - authorization
          properties:
            authorization:
              type: string
              format: uri
              description: URL for performing authorization via Checkout. This should always be a URL to Checkout, never directly to PSP.
    Vipps:
      type: object
      additionalProperties: false
      required:
        - payment_system
        - redirect_url
      properties:
        payment_system:
          type: string
          enum:
            - vipps
          description: Which payment system to create a transaction for
        redirect_url:
          type: string
          format: uri
          description: Url user will be redirected to after completing payment in Vipps app
        payment_text:
          type: string
          description: Text displayed to end user
        is_app:
          type: boolean
          description: Indicates whether payment request is triggered from a mobile app or a web browser. Default `false`
    PaymentTransaction:
      type: object
      description: If defined, a transaction will be created for the given payment system
      additionalProperties: false
      oneOf:
        - $ref: '#/components/schemas/Vipps'
      discriminator:
        propertyName: payment_system
    VippsTransaction:
      type: object
      required:
        - transaction_id
      additionalProperties: false
      properties:
        transaction_id:
          type: string
    PaymentTransactionResponse:
      type: object
      description: Created transaction
      oneOf:
        - $ref: '#/components/schemas/VippsTransaction'
    Transaction:
      type: object
      description: Transaction
      required:
        - id
        - account_id
        - payment_id
        - payment_system
        - processor
        - status
        - reference
        - amount
        - exponent
        - created_by
        - created_at
        - updated_at
      additionalProperties: false
      properties:
        id:
          type: string
        account_id:
          type: string
        payment_id:
          type: string
        payment_system:
          type: string
          description: Type of payment system used
          example: card
          enum:
            - card
            - visaClickToPay
            - vipps
            - applepay
            - transfer
        processor:
          type: string
          description: Type of backend processor/acquirer used
          example: dintero
          enum:
            - valitor
            - dintero
        status:
          type: string
          enum:
            - initiated
            - cancelled
        reference:
          type: string
          description: Client provided reference
        amount:
          type: integer
          description: Monetary amount in minor units of currency with all punctuation removed
          example: 12.34 NOK is denoted as 1234
        exponent:
          type: integer
          description: The number of decimals used for the base unit of the currency. E.g. Amount=1000, Currency=USD, Exponent=2, True amount = 10.00 USD
          example: '2'
        created_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        token_info:
          type: object
          description: Set if token is related to this transaction.
          required:
            - token_id
            - client_app_id
            - relationship_id
          properties:
            token_id:
              type: string
            client_app_id:
              type: string
            relationship_id:
              type: string
            recurring_model:
              type: string
              description: Set if token is stored for recurring use
              enum:
                - cit
                - unscheduled
                - subscription
    VerificationMethodType:
      type: string
      enum:
        - SECURE_3D
        - MASTERCARD_TAF
        - VISA_PASSKEY
    CardType:
      type: string
      enum:
        - charge
        - credit
        - debit
        - deferred-debit
        - prepaid
    PreAuthorization:
      type: object
      required:
        - type
        - pre_auth_type
        - amount
        - increment_amount
        - operation_ref
        - final_authorization
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - preAuthorization
        pre_auth_type:
          type: string
          enum:
            - initial
            - subsequent
        amount:
          type: number
        increment_amount:
          type: number
          description: |
            The incremental amount authorized on top of the previous authorization(s)
        operation_ref:
          type: string
        card_last_4:
          type: string
          pattern: ^[0-9]{4}$
        card_bin:
          type: string
          pattern: ^[0-9]{6}$
        expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          deprecated: true
        expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          deprecated: true
        pan_expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          description: PAN expiry year. Not always present for token transactions
        pan_expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          description: PAN expiry month. Not always present for token transactions
        token_expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          description: Token expiry year, only present for token transactions
        token_expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          description: Token expiry month, only present for token transactions
        card_brand:
          type: string
        payment_account_reference:
          type: string
          description: |
            Payment Account Reference (PAR) is a unique value associated with a
            single PAN and attributed to all tokens associated with that PAN.
        verification_method:
          $ref: '#/components/schemas/VerificationMethodType'
        verification_sub_method:
          type: string
          description: |
            Provides a more detailed description of the verification method used.
          example: FIDO2 Authentication
        three_ds_version:
          type: string
          enum:
            - '1'
            - '2'
        three_ds_server_trans_id:
          type: string
          description: Also called xid. Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction.
        eci:
          type: string
          description: Indicating authentication result
        card_product_platform:
          type: string
          enum:
            - consumer
            - commercial
        card_type:
          $ref: '#/components/schemas/CardType'
        card_country:
          type: string
        card_region:
          type: string
          enum:
            - domestic
            - intra-eea
            - intra-eea-uk
            - interregional
        card_product_code:
          type: string
          example: MCS
        payment_system_type:
          type: string
          enum:
            - card
            - wallet
        network_correlation_id:
          type: string
          description: Reference to the operation, assigned by the card network.
          example: b95b6fa05f68dd9d031ef0c96c225e8e
        network_acquirer_stan:
          type: string
          description: System Trace Audit Number (STAN) is a number Dintero assigns to uniquely identify a transaction on the card network. Present on Mastercard transactions only.
          example: '123456'
        network_lifecycle_trace_id:
          type: string
          description: Reference to the original authorization. The value is assigned to the original authorization, and is present on subsequent incremental authorizations, captures, and reversals. Present on Mastercard transactions only.
          example: MCS8WVSXJ
        network_authorization_approval_code:
          type: string
          description: The code sent by the Issuer indicating that the authorization was approved or that the message was successfully processed.
          example: 564643
        network_authorization_result_code:
          type: string
          description: The code identifying if the transaction was approved, or if it was declined, the reason for the rejection or the action required of the Acceptor.
          example: '00'
        network_authorization_sca_exemptions:
          type: array
          description: 'Mastercard: Array of low risk merchant indicators used in authorization. Visa: Array of exemptions applied to authorization.'
          items:
            type: string
            example: '05'
        network_security_level_indicator:
          type: string
          description: The security level indicator used in a Mastercard authorization.
          example: '210'
        network_security_level_indicator_downgraded:
          type: boolean
          description: '`true` if the security level indicator used in a Mastercard authorization was downgraded by Mastercard due to insufficient verification.'
        network_original_security_level_indicator:
          type: string
          description: The original security level indicator subject sent to Mastercard in an authorization that was subject to a downgrade.
          example: '212'
        token_id:
          type: string
          description: Reference to the payment token related to the transaction. For a transaction whose payment is initiated with the `generate_payment_token` option, this references the created payment token. For a transaction payed with an existing payment token, this references the existing payment token used to pay the transaction.
        token_source:
          type: string
          description: |-
            Which payment system was used to generate the token. Payment systems that can generate a token are:
              - card
              - visaClickToPay
              - applepay
              - googlePay
        tokenizer_correlation_id:
          type: string
          description: Tokenizer's reference for the token operation.
        tokenizer_trace_id:
          type: string
          description: Tokenizer's reference for the token operation.
        final_authorization:
          type: boolean
          description: Indicates whether the authorization is final.
        pre_authorization_operation_ref:
          type: string
          description: Present on subsequent pre-authorizations, references previous pre-authorization operation.
        authorization_expiration:
          type: string
          format: date-time
          example: '2025-12-01T00:00:00.000Z'
          description: The expiration date and time of the authorization. After this date and time it might not be possible to perform captures against the authorization. For Visa the authorization can be voided until the day after it expires.
        extended_authorization:
          type: boolean
          example: true
          description: Indicates whether the authorization is an extended authorization.
    PreAuthorizationReversal:
      type: object
      required:
        - type
        - operation_ref
        - amount
        - pre_authorization_operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - preAuthorizationReversal
        operation_ref:
          type: string
        amount:
          type: number
        pre_authorization_operation_ref:
          type: string
    Authorization:
      type: object
      required:
        - type
        - amount
        - operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - authorization
        amount:
          type: number
        operation_ref:
          type: string
        card_last_4:
          type: string
          pattern: ^[0-9]{4}$
        card_bin:
          type: string
          pattern: ^[0-9]{6}$
        expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          deprecated: true
        expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          deprecated: true
        pan_expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          description: PAN expiry year. Not always present for token transactions
        pan_expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          description: PAN expiry month. Not always present for token transactions
        token_expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          description: Token expiry year, only present for token transactions
        token_expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          description: Token expiry month, only present for token transactions
        card_brand:
          type: string
        payment_account_reference:
          type: string
          description: |
            Payment Account Reference (PAR) is a unique value associated with a
            single PAN and attributed to all tokens associated with that PAN.
        verification_method:
          $ref: '#/components/schemas/VerificationMethodType'
        verification_sub_method:
          type: string
          description: |
            Provides a more detailed description of the verification method used.
          example: FIDO2 Authentication
        three_ds_version:
          type: string
          enum:
            - '1'
            - '2'
        three_ds_server_trans_id:
          type: string
          description: Also called xid. Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction.
        eci:
          type: string
          description: Indicating authentication result
        card_product_platform:
          type: string
          enum:
            - consumer
            - commercial
        card_type:
          $ref: '#/components/schemas/CardType'
        card_country:
          type: string
        card_region:
          type: string
          enum:
            - domestic
            - intra-eea
            - intra-eea-uk
            - interregional
        card_product_code:
          type: string
          example: MCS
        payment_system_type:
          type: string
          enum:
            - card
            - wallet
        network_correlation_id:
          type: string
          description: Reference to the operation, assigned by the card network.
          example: b95b6fa05f68dd9d031ef0c96c225e8e
        network_acquirer_stan:
          type: string
          description: System Trace Audit Number (STAN) is a number Dintero assigns to uniquely identify a transaction on the card network. Present on Mastercard transactions only.
          example: '123456'
        network_lifecycle_trace_id:
          type: string
          description: Reference to the original authorization. The value is assigned to the original authorization, and is present on subsequent incremental authorizations, captures, and reversals. Present on Mastercard transactions only.
          example: MCS8WVSXJ
        network_transaction_link_id:
          type: string
          description: The Transaction Link ID (TLID) is globally unique and can be used as a single unique reference for deterministic matching and linking of all message activity. Present on Mastercard transactions only.
          example: 9jUD6aWxRPS9rdgyCVLBWA
        network_authorization_approval_code:
          type: string
          description: The code sent by the Issuer indicating that the authorization was approved or that the message was successfully processed.
          example: 564643
        network_authorization_result_code:
          type: string
          description: The code identifying if the transaction was approved, or if it was declined, the reason for the rejection or the action required of the Acceptor.
          example: '00'
        network_authorization_sca_exemptions:
          type: array
          description: 'Mastercard: Array of low risk merchant indicators used in authorization. Visa: Array of exemptions applied to authorization.'
          items:
            type: string
            example: '05'
        network_security_level_indicator:
          type: string
          description: The security level indicator used in a Mastercard authorization.
          example: '210'
        network_security_level_indicator_downgraded:
          type: boolean
          description: '`true` if the security level indicator used in a Mastercard authorization was downgraded by Mastercard due to insufficient verification.'
        network_original_security_level_indicator:
          type: string
          description: The original security level indicator subject sent to Mastercard in an authorization that was subject to a downgrade.
          example: '212'
        token_id:
          type: string
          description: Reference to the payment token related to the transaction. For a transaction whose payment is initiated with the `generate_payment_token` option, this references the created payment token. For a transaction payed with an existing payment token, this references the existing payment token used to pay the transaction.
        token_source:
          type: string
          description: |-
            Which payment system was used to generate the token. Payment systems that can generate a token are:
              - card
              - visaClickToPay
              - applepay
              - googlePay
        tokenizer_correlation_id:
          type: string
          description: Tokenizer's reference for the token operation.
        tokenizer_trace_id:
          type: string
          description: Tokenizer's reference for the token operation.
        pre_authorization_operation_ref:
          type: string
          description: Present on the synthetic authorization following a final pre-authorization, referencing the final pre-authorization.
        authorization_expiration:
          type: string
          format: date-time
          example: '2025-12-01T00:00:00.000Z'
          description: The expiration date and time of the authorization. After this date and time it might not be possible to perform captures against the authorization. For Visa the authorization can be voided until the day after it expires.
        extended_authorization:
          type: boolean
          example: true
          description: Indicates whether the authorization is an extended authorization.
    AuthorizationReversal:
      type: object
      required:
        - type
        - operation_ref
        - amount
        - authorization_operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - authorizationReversal
        operation_ref:
          type: string
        amount:
          type: number
        authorization_operation_ref:
          type: string
    Sale:
      type: object
      required:
        - type
        - amount
        - operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - sale
        amount:
          type: number
        operation_ref:
          type: string
        card_last_4:
          type: string
          pattern: ^[0-9]{4}$
        card_bin:
          type: string
          pattern: ^[0-9]{6}$
        expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          deprecated: true
        expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          deprecated: true
        pan_expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          description: PAN expiry year. Not always present for token transactions
        pan_expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          description: PAN expiry month. Not always present for token transactions
        token_expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          description: Token expiry year, only present for token transactions
        token_expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          description: Token expiry month, only present for token transactions
        card_brand:
          type: string
        payment_account_reference:
          type: string
          description: |
            Payment Account Reference (PAR) is a unique value associated with a
            single PAN and attributed to all tokens associated with that PAN.
        verification_method:
          $ref: '#/components/schemas/VerificationMethodType'
        verification_sub_method:
          type: string
          description: |
            Provides a more detailed description of the verification method used.
          example: FIDO2 Authentication
        three_ds_version:
          type: string
          enum:
            - '1'
            - '2'
        three_ds_server_trans_id:
          type: string
          description: Also called xid. Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction.
        eci:
          type: string
          description: Indicating authentication result
        card_product_platform:
          type: string
          enum:
            - consumer
            - commercial
        card_type:
          $ref: '#/components/schemas/CardType'
        card_country:
          type: string
        card_region:
          type: string
          enum:
            - domestic
            - intra-eea
            - intra-eea-uk
            - interregional
        card_product_code:
          type: string
          example: MCS
        payment_system_type:
          type: string
          enum:
            - card
            - wallet
        network_correlation_id:
          type: string
          description: Reference to the operation, assigned by the card network.
          example: b95b6fa05f68dd9d031ef0c96c225e8e
        network_acquirer_stan:
          type: string
          description: System Trace Audit Number (STAN) is a number Dintero assigns to uniquely identify a transaction on the card network. Present on Mastercard transactions only.
          example: '123456'
        network_lifecycle_trace_id:
          type: string
          description: Reference to the original authorization. The value is assigned to the original authorization, and is present on subsequent incremental authorizations, captures, and reversals. Present on Mastercard transactions only.
          example: MCS8WVSXJ
        network_interchange_rate_designator:
          type: string
          example: '75'
        network_authorization_approval_code:
          type: string
          description: The code sent by the Issuer indicating that the authorization was approved or that the message was successfully processed.
          example: 564643
        network_authorization_result_code:
          type: string
          description: The code identifying if the transaction was approved, or if it was declined, the reason for the rejection or the action required of the Acceptor.
          example: '00'
        network_authorization_sca_exemptions:
          type: array
          description: 'Mastercard: Array of low risk merchant indicators used in authorization. Visa: Array of exemptions applied to authorization.'
          items:
            type: string
            example: '05'
        network_security_level_indicator:
          type: string
          description: The security level indicator used in a Mastercard authorization.
          example: '210'
        network_security_level_indicator_downgraded:
          type: boolean
          description: '`true` if the security level indicator used in a Mastercard authorization was downgraded by Mastercard due to insufficient verification.'
        network_original_security_level_indicator:
          type: string
          description: The original security level indicator subject sent to Mastercard in an authorization that was subject to a downgrade.
          example: '212'
        token_id:
          type: string
          description: Reference to the payment token related to the transaction. For a transaction whose payment is initiated with the `generate_payment_token` option, this references the created payment token. For a transaction payed with an existing payment token, this references the existing payment token used to pay the transaction.
        token_source:
          type: string
          description: |-
            Which payment system was used to generate the token. Payment systems that can generate a token are:
              - card
              - visaClickToPay
              - applepay
              - googlePay
        tokenizer_correlation_id:
          type: string
          description: Tokenizer's reference for the token operation.
        tokenizer_trace_id:
          type: string
          description: Tokenizer's reference for the token operation.
        final_authorization:
          type: boolean
          description: Indicates whether the authorization is final. Always `true` for sale operations.
        network_settlement_ref:
          type: string
          description: ID generated from transaction ID, transaction time (HHMMSS), and the capture sequence number. Used to match captures in settlement. Present on Visa transactions only.
          example: 305099389232274:3012101549:1
    SaleReversal:
      type: object
      required:
        - type
        - amount
        - operation_ref
        - sale_operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - saleReversal
        amount:
          type: number
        operation_ref:
          type: string
        sale_operation_ref:
          type: string
    Capture:
      type: object
      required:
        - type
        - amount
        - operation_ref
        - authorization_operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - capture
        amount:
          type: number
        operation_ref:
          type: string
        authorization_operation_ref:
          type: string
        network_correlation_id:
          type: string
          description: Reference to the operation, assigned by the card network.
          example: b95b6fa05f68dd9d031ef0c96c225e8e
        network_acquirer_stan:
          type: string
          description: System Trace Audit Number (STAN) is a number Dintero assigns to uniquely identify a transaction on the card network. Present on Mastercard transactions only.
          example: '123456'
        network_lifecycle_trace_id:
          type: string
          description: Reference to the original authorization. The value is assigned to the original authorization, and is present on subsequent incremental authorizations, captures, and reversals. Present on Mastercard transactions only.
          example: MCS8WVSXJ
        network_acquirer_reference_number:
          type: string
          description: Acquirer Reference Number (ARN) is a composite reference assigned by Dintero, containing acquirer reference data. Present on Mastercard transactions only.
          example: '55400973173000000036797'
        network_settlement_ref:
          type: string
          description: ID generated from transaction ID, transaction time (HHMMSS), and the capture sequence number. Used to match captures in settlement. Present on Visa transactions only.
          example: 305099389232274:3012101549:1
        network_interchange_rate_designator:
          type: string
          example: '75'
        final_capture:
          type: boolean
          description: Indicates whether the capture is final.
    CaptureReversal:
      type: object
      description: A capture reversal may in some cases be done instead of a refund
      required:
        - type
        - amount
        - operation_ref
        - capture_operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - captureReversal
        amount:
          type: number
        operation_ref:
          type: string
        capture_operation_ref:
          type: string
        network_settlement_ref:
          type: string
          description: ID generated from transaction ID, transaction time (HHMMSS), and the capture sequence number. Used to match capture reversals in settlement. Present on Visa transactions only.
          example: 305099389232274:3012101549:1
        soft_reversal:
          type: boolean
        reason:
          type: string
    Refund:
      type: object
      required:
        - type
        - amount
        - operation_ref
        - authorization_operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - refund
        amount:
          type: number
        operation_ref:
          type: string
        authorization_operation_ref:
          type: string
        refund_authorization_operation_ref:
          type: string
        network_correlation_id:
          type: string
          description: Reference to the operation, assigned by the card network.
          example: b95b6fa05f68dd9d031ef0c96c225e8e
        network_acquirer_stan:
          type: string
          description: System Trace Audit Number (STAN) is a number Dintero assigns to uniquely identify a transaction on the card network. Present on Mastercard transactions only.
          example: '123456'
        network_lifecycle_trace_id:
          type: string
          description: Reference to the original refund authorization. The value is assigned to the original refund authorization, and is present on subsequent incremental authorizations, captures, and reversals. Present on Mastercard transactions only.
          example: MCS8WVSXJ
        network_acquirer_reference_number:
          type: string
          description: Acquirer Reference Number (ARN) is a composite reference assigned by Dintero, containing acquirer reference data. Present on Mastercard transactions only.
          example: '55400973173000000036797'
        network_settlement_ref:
          type: string
          description: ID generated from transaction ID, transaction time (HHMMSS), and the capture sequence number. As refunds don't have a capture sequence number, we just default to 0. Used to match refunds in settlement. Present on Visa transactions only.
          example: 305099389232274:3012101549:1
    RefundReversal:
      type: object
      required:
        - type
        - amount
        - operation_ref
        - refund_operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - refundReversal
        amount:
          type: number
        operation_ref:
          type: string
        refund_operation_ref:
          type: string
    Cancel:
      type: object
      required:
        - type
        - operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - cancel
        operation_ref:
          type: string
        amount:
          type: number
        authorization_operation_ref:
          type: string
        network_result_code:
          type: string
        network_approved:
          type: boolean
    TransactionOperationResult:
      type: object
      oneOf:
        - type: object
          description: Operation success
          required:
            - type
          additionalProperties: false
          properties:
            type:
              type: string
              enum:
                - success
        - type: object
          description: Operation failure
          required:
            - type
            - reason
            - code
            - can_retry
          additionalProperties: false
          properties:
            type:
              type: string
              enum:
                - failure
            reason:
              type: string
            code:
              type: string
            can_retry:
              type: boolean
            error_codes:
              type: array
              minItems: 1
              description: |
                Standardized error codes. Might contain multiple error codes to support updates without breaking
                existing integrations
              items:
                type: string
            retry_policy:
              type: object
              description: |
                Provides additional information on how to handle retries
              required:
                - retry_codes
              properties:
                retry_codes:
                  type: array
                  minItems: 1
                  description: |
                    Retry codes describing whether or not an operation can be retried. Might contain multiple codes to support updates without breaking
                    existing integrations.
                  items:
                    type: string
                    enum:
                      - DO_NOT_RETRY
                      - RETRY_IMMEDIATELY
                      - RETRY_AFTER_DELAY
                retry_after:
                  type: string
                  format: date-time
                  description: |
                    ISO datetime after which the operation can be retried. Might be provided when retry_codes contains RETRY_AFTER_DELAY
            network_code:
              type: string
              description: |
                Network response code
            operations:
              type: array
              description: SCA operations for when an authorization is declined with error code ADDITIONAL_VERIFICATION_REQUIRED. Allows performing SCA after having attempted without.
              items:
                type: object
                properties:
                  href:
                    type: string
                  method:
                    type: string
                    enum:
                      - POST
                  content_type:
                    type: string
                    enum:
                      - application/json
                  rel:
                    type: string
                    enum:
                      - 3d-secure-init-hosted
                      - 3d-secure-init
                      - 3d-secure-method-complete
                      - 3d-secure-challenge-complete
                      - 3d-secure-notification
                      - mastercard-taf-init-params
                      - mastercard-taf-challenge-complete
    PostAuthorization:
      type: object
      required:
        - operation_ref
      properties:
        operation_ref:
          type: string
          description: Unique reference for this operation
      additionalProperties: false
    PostPreAuthorization:
      type: object
      required:
        - operation_ref
        - final_authorization
        - amount
      properties:
        operation_ref:
          type: string
          description: Unique reference for this operation
        final_authorization:
          type: boolean
          description: |-
            Indicates if this is the final pre-authorization for the transaction. If true, no further changes to the amount will be allowed, and the  amount becomes available for capture.

            The initial PreAuthorization must contain `final_authorization = true`
          example: true
        amount:
          type: integer
          description: |-
            On the initial PreAuthorization, amount must equal `transaction.amount`.

            On all subsequent PreAuthorizations, the amount represents the **total updated amount** for the transaction.
          example: 1234
      additionalProperties: false
    PostTransferCardBody:
      type: object
      required:
        - reference
        - payload
      additionalProperties: false
      properties:
        reference:
          type: string
          description: Unique reference for this transaction
          minLength: 8
          maxLength: 40
        payload:
          type: string
          description: |-
            The sender's card data encrypted using the public key (see /keys/v1).
            Decrypts to the cardPayloadTransfer schema: either full card data (PAN)
            or a tokenized card.

            [Payload content schema](#schema/CardPayloadTransfer)
    PostTransferTokenBody:
      type: object
      required:
        - reference
        - token_id
      additionalProperties: false
      properties:
        reference:
          type: string
          description: Unique reference for this transaction
          minLength: 8
          maxLength: 40
        token_id:
          type: string
          description: '`token_id` of the card token to process the transaction. Required if not sending card data in payload'
    PostTransferAuthorization:
      type: object
      required:
        - operation_ref
      properties:
        operation_ref:
          type: string
          description: Unique reference for this operation
      additionalProperties: false
    Transfer:
      type: object
      required:
        - type
        - amount
        - operation_ref
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - transfer
        amount:
          type: number
        operation_ref:
          type: string
        card_last_4:
          type: string
          pattern: ^[0-9]{4}$
        card_bin:
          type: string
          pattern: ^[0-9]{6}$
        pan_expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          description: PAN expiry year. Not always present for token transactions
        pan_expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          description: PAN expiry month. Not always present for token transactions
        token_expiry_year:
          type: string
          example: 2024
          pattern: ^[0-9]{4}$
          description: Token expiry year, only present for token transactions
        token_expiry_month:
          type: string
          example: '01'
          pattern: ^[0-9]{2}$
          description: Token expiry month, only present for token transactions
        card_brand:
          type: string
          description: Brand of the sender's card.
        payment_account_reference:
          type: string
          description: |
            Payment Account Reference (PAR) is a unique value associated with a
            single PAN and attributed to all tokens associated with that PAN.
        verification_method:
          $ref: '#/components/schemas/VerificationMethodType'
        verification_sub_method:
          type: string
          description: |
            Provides a more detailed description of the verification method used.
          example: FIDO2 Authentication
        three_ds_version:
          type: string
          enum:
            - '1'
            - '2'
        three_ds_server_trans_id:
          type: string
          description: Also called xid. Universally unique transaction identifier assigned by the 3DS Server to identify a single transaction.
        eci:
          type: string
          description: Indicating authentication result
        card_product_platform:
          type: string
          enum:
            - consumer
            - commercial
        card_type:
          $ref: '#/components/schemas/CardType'
        card_country:
          type: string
        card_region:
          type: string
          enum:
            - domestic
            - intra-eea
            - intra-eea-uk
            - interregional
        card_product_code:
          type: string
          example: MCS
        network_correlation_id:
          type: string
          description: Reference to the operation, assigned by the card network.
          example: b95b6fa05f68dd9d031ef0c96c225e8e
        network_acquirer_stan:
          type: string
          description: System Trace Audit Number (STAN) is a number Dintero assigns to uniquely identify a transaction on the card network. Present on Mastercard transactions only.
          example: '123456'
        network_lifecycle_trace_id:
          type: string
          description: Reference to the original authorization. The value is assigned to the original authorization, and is present on subsequent incremental authorizations, captures, and reversals. Present on Mastercard transactions only.
          example: MCS8WVSXJ
        network_interchange_rate_designator:
          type: string
          example: '75'
        network_authorization_approval_code:
          type: string
          description: The code sent by the Issuer indicating that the authorization was approved or that the message was successfully processed.
          example: 564643
        network_authorization_result_code:
          type: string
          description: The code identifying if the transaction was approved, or if it was declined, the reason for the rejection or the action required of the Acceptor.
          example: '00'
        token_id:
          type: string
          description: Reference to the payment token related to the transaction. For a transaction whose payment is initiated with the `generate_payment_token` option, this references the created payment token. For a transaction payed with an existing payment token, this references the existing payment token used to pay the transaction.
        recipient_card_brand:
          type: string
          description: Brand of the recipient's card.
        recipient_identifier_type:
          type: string
          description: The identifier type used to resolve the recipient's card.
        recipient_identifier_value:
          type: string
          description: The identifier value used to resolve the recipient's card.
    DigitalCardData:
      type: object
      required:
        - artUri
        - descriptorName
        - status
      properties:
        artUri:
          type: string
          example: https://stage.assets.mastercard.com/card-art/combined-image-asset/MyBank-mastercard.png
        coBrandedName:
          type: string
          example: Very Nice Hotels
          maxLength: 128
        descriptorName:
          type: string
          example: mastercard
          maxLength: 64
        isCoBranded:
          type: boolean
          example: true
        status:
          type: string
          example: ACTIVE
          enum:
            - ACTIVE
            - CANCELLED
            - SUSPENDED
        issuerName:
          type: string
          example: My Bank
          minLength: 1
          maxLength: 64
        longDescription:
          type: string
          example: Bank Double Cash Back Rewards Mastercard
          minLength: 1
          maxLength: 256
        foregroundColor:
          type: string
          example: FF5733
          minLength: 3
          maxLength: 6
    ErrorDetail:
      type: object
      properties:
        message:
          type: string
          example: Card type validation message
        reason:
          type: string
          example: The request contains card type, but the card type does not correspond with the card number (e.g. card type = Visa; card number = MasterCard)
        source:
          type: string
          example: CARD
        sourceType:
          type: string
          enum:
            - BODY
            - HEADER
            - PATH
            - QUERY
    CardRecord:
      type: object
      properties:
        enrollmentReferenceType:
          type: string
          example: FPAN
          enum:
            - FPAN
            - EXISTING_TOKEN_UNIQUE_REFERENCE
        externalEnrollmentReferenceId:
          type: string
          example: ef016322-ac86-4ac7-8567-e7b8a424c79d
          maxLength: 100
        status:
          type: string
          example: SUCCESS
          pattern: ^(SUCCESS|FAILED)$
        maskedCard:
          type: object
          required:
            - dateOfCardCreated
            - digitalCardData
            - panExpirationMonth
            - panExpirationYear
            - panLastFour
            - srcDigitalCardId
          properties:
            dateOfCardCreated:
              type: string
              example: '2020-02-24T11:32:32.060Z'
            dateOfCardLastUsed:
              type: string
              example: '2020-02-24T11:32:32.060Z'
            delegatedAuthenticationModels:
              type: array
              items:
                type: object
                required:
                  - isSupported
                  - modelType
                properties:
                  isSupported:
                    type: boolean
                    example: true
                  modelType:
                    type: string
                    example: AE_TYPE_3
                    enum:
                      - AE_TYPE_3
                      - AE_TYPE_4
            digitalCardData:
              $ref: '#/components/schemas/DigitalCardData'
            panBin:
              type: string
              example: '545503'
              format: numeric
            panExpirationMonth:
              type: string
              example: '12'
              format: numeric
            panExpirationYear:
              type: string
              example: '2025'
              format: numeric
            panLastFour:
              type: string
              example: '1234'
              format: numeric
            paymentAccountReference:
              type: string
              example: 34510HLHA68IX5I33N71011MWLDW
              maxLength: 29
            paymentCardDescriptor:
              type: string
              example: mastercard
              description: Indicates the card payment network. This will be set to 'mastercard' or 'maestro'
            paymentCardType:
              type: string
              example: CREDIT
              enum:
                - CREDIT
                - DEBIT
                - PREPAID
                - COMBO
                - FLEX
            serviceId:
              type: string
              example: SECURE_COF_MERCHANT_OBO#SRC4M-OBO-ALL4PETS#01
            srcDigitalCardId:
              type: string
              example: 9ajNArkAR66zqYyHCn0rCA000000000000US
            tokenBinRange:
              type: string
              example: '513640'
              maxLength: 10
              format: numeric
            tokenExpirationMonth:
              type: string
              example: '12'
              format: numeric
            tokenExpirationYear:
              minLength: 4
              maxLength: 4
              type: string
              example: '2025'
              format: numeric
            tokenLastFour:
              type: string
              example: '5678'
              format: numeric
            tokenUniqueReference:
              type: string
              example: MS4NHG0000123450f2f3d2009897da0831ce1234ab12345
        errordetail:
          $ref: '#/components/schemas/ErrorDetail'
    BlockRuleValueNameResponse:
      type: object
      description: Block rule value for name
      additionalProperties: false
      required:
        - name
      properties:
        name:
          type: string
          additionalProperties: false
          description: masked customer name. Example Alb******
    BlockRuleValueCountry:
      type: object
      description: Block rule value for country
      additionalProperties: false
      required:
        - country
      properties:
        country:
          type: string
          pattern: ^[A-Z]{2}$
          additionalProperties: false
          description: uppercase two-letter country code
    BlockRuleValueEmailResponse:
      type: object
      description: Block rule value for email
      additionalProperties: false
      required:
        - email
      properties:
        email:
          type: string
          additionalProperties: false
          description: masked email. Example ******@gmail.com
    BlockRuleValuePhoneResponse:
      type: object
      description: Block rule value for phone number
      additionalProperties: false
      required:
        - phone_number
      properties:
        phone_number:
          type: string
          additionalProperties: false
          description: masked phone number. Example +507******
    BlockRuleValueIP:
      type: object
      description: Block rule value for IP
      additionalProperties: false
      required:
        - ip_cidr_block
      properties:
        ip_cidr_block:
          type: string
          additionalProperties: false
          description: |
            Block a specific IP address or a range of IP addresses.

            To block a specific IPv4 address, use the IP address followed by a slash and the number 32. For example, 127.0.0.1/32.
    BlockRuleValueBIN:
      type: object
      description: Block rule range value for BIN (the first six to eight digits of the Primary Account Number)
      additionalProperties: false
      required:
        - bin
      properties:
        bin:
          type: object
          required:
            - min
          properties:
            min:
              type: string
              description: The first six to eight digits of the Primary Account Number (PAN)
              format: bin
            max:
              type: string
              description: The first six to eight digits of PAN. max is exclusive and set to min+1 by default. min and max must have the same length
              format: bin
          additionalProperties: false
          description: |
            Block a payment card whose card number starts with number between min and max.
    BlockRule:
      type: object
      description: BlockRule
      required:
        - id
        - type
        - value
        - created_by
        - created_at
        - blocked_by
      additionalProperties: false
      properties:
        id:
          type: string
        description:
          type: string
          description: Describe the purpose of the block rule
        type:
          type: string
          enum:
            - name
            - country
            - email
            - phone_number
            - ip_cidr_block
            - bin
        value:
          type: object
          oneOf:
            - $ref: '#/components/schemas/BlockRuleValueNameResponse'
            - $ref: '#/components/schemas/BlockRuleValueCountry'
            - $ref: '#/components/schemas/BlockRuleValueEmailResponse'
            - $ref: '#/components/schemas/BlockRuleValuePhoneResponse'
            - $ref: '#/components/schemas/BlockRuleValueIP'
            - $ref: '#/components/schemas/BlockRuleValueBIN'
        created_by:
          type: string
        created_at:
          type: string
          format: date-time
        updated_by:
          type: string
        updated_at:
          type: string
          format: date-time
        deleted_by:
          type: string
        deleted_at:
          type: string
          format: date-time
        blocked_by:
          type: string
        expires_at:
          type: string
          format: date-time
        account_id:
          type: string
          description: Merchant account id if a block rule is at merchant level.
    BlockRuleValueName:
      type: object
      description: Block rule value for name
      additionalProperties: false
      required:
        - name
      properties:
        name:
          type: string
          additionalProperties: false
          description: customer name
    BlockRuleValueEmail:
      type: object
      description: Block rule value for email
      additionalProperties: false
      required:
        - email
      properties:
        email:
          type: string
          additionalProperties: false
          description: Block a specific email
    BlockRuleValuePhone:
      type: object
      description: Block rule value for phone number
      additionalProperties: false
      required:
        - phone_number
      properties:
        phone_number:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          additionalProperties: false
          description: A phone number in E.164 format
    cardPayload:
      type: object
      required:
        - account_number
        - security_code
        - name_on_card
        - expiration_date
      additionalProperties: false
      properties:
        account_number:
          type: string
          pattern: ^[0-9]{13,19}
        security_code:
          type: string
          pattern: ^[0-9]{3,4}
        name_on_card:
          type: string
          minLength: 2
          maxLength: 45
        expiration_date:
          type: object
          required:
            - month
            - year
          additionalProperties: false
          properties:
            month:
              type: string
              pattern: ^[0-9]{2}
            year:
              type: string
              pattern: ^[0-9]{4}
    cardPayloadTransferPAN:
      type: object
      additionalProperties: false
      required:
        - type
        - account_number
        - security_code
        - name_on_card
        - expiration_date
      properties:
        type:
          type: string
          enum:
            - PAN
          description: The type of card data.
        account_number:
          type: string
          pattern: ^[0-9]{13,19}
        security_code:
          type: string
          pattern: ^[0-9]{3,4}
        name_on_card:
          type: string
          minLength: 2
          maxLength: 45
        expiration_date:
          type: object
          required:
            - month
            - year
          additionalProperties: false
          properties:
            month:
              type: string
              pattern: ^[0-9]{2}
            year:
              type: string
              pattern: ^[0-9]{4}
        verification_data:
          type: object
          description: Verification data for a Transfer transaction with a card. 3DS will have to be performed if the verification data is not provided.
          required:
            - cryptogram
            - ds_trans_id
            - version
            - eci
          additionalProperties: false
          properties:
            ds_trans_id:
              type: string
              maxLength: 36
              format: uuid
              description: Directory Server Transaction ID from a 3-D Secure authentication already completed upstream of this call.
            cryptogram:
              type: string
              maxLength: 4000
              format: base64
              description: Cardholder Authentication Verification Value from a 3-D Secure authentication already completed upstream of this call.
            version:
              type: string
              enum:
                - 2.2.0
                - 2.3.1
              description: Version of the 3-D Secure protocol used in the authentication. For example, "2.2.0" or "2.3.1".
            three_ds_server_trans_id:
              type: string
              maxLength: 36
              format: uuid
              description: 3-D Secure Server Transaction ID from a 3-D Secure authentication already completed upstream of this call.
            eci:
              type: string
              maxLength: 2
              description: Electronic Commerce Indicator from a 3-D Secure authentication already completed upstream of this call.
    cardPayloadTransferToken:
      type: object
      additionalProperties: false
      required:
        - type
        - token
        - cryptogram
        - name_on_card
        - expiration_date
        - card_details
      properties:
        type:
          type: string
          enum:
            - TOKEN
          description: The type of card data.
        card_details:
          type: object
          description: Card details for a tokenized card.
          required:
            - bin_number
            - last_four_digits
          additionalProperties: false
          properties:
            bin_number:
              type: string
              description: The first 6 digits of the card number.
            last_four_digits:
              type: string
              description: The last 4 digits of the card number.
            expiration_date:
              type: object
              description: Expiration date of the card.
              required:
                - month
                - year
              additionalProperties: false
              properties:
                month:
                  type: string
                  pattern: ^[0-9]{2}
                year:
                  type: string
                  pattern: ^[0-9]{4}
        token:
          type: string
          pattern: ^[0-9]{13,19}
          description: The tokenized card number.
        cryptogram:
          type: string
          description: Token Authentication Verification Value (TAVV).
        name_on_card:
          type: string
          minLength: 2
          maxLength: 45
        expiration_date:
          type: object
          description: Expiration date of the token.
          required:
            - month
            - year
          additionalProperties: false
          properties:
            month:
              type: string
              pattern: ^[0-9]{2}
            year:
              type: string
              pattern: ^[0-9]{4}
        verification_data:
          type: object
          description: Verification data for a Transfer transaction.
          required:
            - cryptogram
            - ds_trans_id
            - version
            - eci
          additionalProperties: false
          properties:
            ds_trans_id:
              type: string
              maxLength: 36
              format: uuid
              description: Directory Server Transaction ID from a 3-D Secure authentication already completed upstream of this call.
            cryptogram:
              type: string
              maxLength: 4000
              format: base64
              description: Cardholder Authentication Verification Value from a 3-D Secure authentication already completed upstream of this call.
            version:
              type: string
              enum:
                - 2.2.0
                - 2.3.1
              description: Version of the 3-D Secure protocol used in the authentication. For example, "2.2.0" or "2.3.1".
            three_ds_server_trans_id:
              type: string
              maxLength: 36
              format: uuid
              description: 3-D Secure Server Transaction ID from a 3-D Secure authentication already completed upstream of this call.
            eci:
              type: string
              maxLength: 2
              description: Electronic Commerce Indicator from a 3-D Secure authentication already completed upstream of this call.
    cardPayloadTransfer:
      oneOf:
        - $ref: '#/components/schemas/cardPayloadTransferPAN'
        - $ref: '#/components/schemas/cardPayloadTransferToken'
      discriminator:
        propertyName: type
        mapping:
          PAN: '#/components/schemas/cardPayloadTransferPAN'
          TOKEN: '#/components/schemas/cardPayloadTransferToken'
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            type: object
            description: An error occurred
            required:
              - error
            additionalProperties: false
            properties:
              error:
                type: string
              code:
                type: string
                description: |
                  Error code.

                  - `TRANSACTION_LOCKED`: another request currently holds a lock on
                    this transaction.
                  - `TRANSACTION_PENDING_OPERATION`: the transaction has an
                    unresolved pending operation that must complete first.
                enum:
                  - TRANSACTION_LOCKED
                  - TRANSACTION_PENDING_OPERATION
              retry_after_ms:
                type: number
                description: |
                  If present, operation can be retried after the given number of milliseconds have passed.
                  Usually means the transaction is currently locked / accessed by another client.
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    AccountIdParam:
      name: account_id
      in: path
      required: true
      schema:
        type: string
        description: The Dintero merchant account id
        example: P12345678
        pattern: ^[PT]\d{8}
    PaymentIdParam:
      name: payment_id
      in: path
      required: true
      schema:
        type: string
    TransactionIdParam:
      name: transaction_id
      in: path
      required: true
      schema:
        type: string
    AccessTokenAuth:
      name: authorization
      in: header
      required: true
      schema:
        type: string
        description: Access token you received when creating the payment
    NotificationIdParam:
      name: id
      in: path
      required: true
      schema:
        type: string
        description: Opaque identifier used in the shorthand 3-D Secure notification URL.
        pattern: ^[A-Za-z0-9]+$
    Skip3DSQueryParam:
      name: skip3DS
      in: query
      required: false
      schema:
        type: string
        enum:
          - 'true'
        description: Flag to indicate if 3D secure should be skipped
x-tagGroups:
  - name: Checkout
    tags:
      - payment
      - transaction
      - token
  - name: External
    tags:
      - vipps-ext
      - visa tokenization
      - mastercard tokenization
      - apple pay tokenization
  - name: Client / SDK
    tags:
      - card
      - 3-D Secure
      - Mastercard TAF
      - Apple Pay
      - Google Pay
      - visaClickToPay
      - vipps
      - transfer
      - encryption
  - name: Admin
    tags:
      - block-rules
      - merchant-certificates
  - name: Data models
    tags:
      - encrypted-payload-models
