openapi: 3.1.1
info:
  title: Paytently API Reference
servers:
  - url: https://api.paytently.io
    description: Production
  - url: https://sandbox.api.paytently.io
    description: Sandbox
paths:
  /auth/token:
    post:
      tags:
        - Authentication
      operationId: Generate token request
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AccessTokenRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTokenResponse'
        '401':
          description: Unauthorized
  /payments:
    post:
      tags:
        - Payments
      operationId: Create payment request
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Commands.Create.Request
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.BasePaymentResponse
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.ResponseError
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /payments/{id}:
    get:
      tags:
        - Payments
      operationId: Get payment
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.PaymentResponse
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
        '429':
          description: Too Many Requests
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /payments/{id}/refunds:
    post:
      tags:
        - Payments
      operationId: Refund payment
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Commands.Refund.Request
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.RefundResponse
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.ResponseError
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /payments/{id}/refunds/{refund_id}:
    get:
      tags:
        - Payments
      operationId: Get refund
      parameters:
        - name: id
          in: path
          description: The id of the payment
          required: true
          schema:
            type: string
        - name: refund_id
          in: path
          description: The id of the refund
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.RefundResponse
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
        '429':
          description: Too Many Requests
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /payments/{id}/void:
    post:
      tags:
        - Payments
      operationId: Void payment
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Commands.Void.Request
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.VoidResponse
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.ResponseError
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /instruments:
    post:
      tags:
        - Vault
      operationId: Create instrument
      parameters:
        - name: x-api-version
          in: header
          schema:
            $ref: '#/components/schemas/System.String'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Paytently.Vault.Api.Features.Create.Models.Request
            example:
              type: card
              card:
                number: '4242424242424242'
                expiry_month: '12'
                expiry_year: '27'
                name_on_card: Mr Joe Bloggs
        required: true
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Vault.Api.Features.Create.Models.Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.BadRequestError
        '403':
          description: Forbidden
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.UnprocessableEntityError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
      security:
        - Bearer: []
  /instruments/{id}:
    patch:
      tags:
        - Vault
      operationId: Update instrument
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/System.String'
        - name: x-api-version
          in: header
          schema:
            $ref: '#/components/schemas/System.String'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Paytently.Vault.Api.Features.Update.Models.Request
            example:
              card:
                expiry_month: '12'
                expiry_year: '27'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.BadRequestError
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.NotFoundError
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.UnprocessableEntityError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
      security:
        - Bearer: []
    delete:
      tags:
        - Vault
      operationId: Delete instrument
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/System.String'
        - name: x-api-version
          in: header
          schema:
            $ref: '#/components/schemas/System.String'
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.NotFoundError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
      security:
        - Bearer: []
    get:
      tags:
        - Vault
      operationId: Get instrument
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/System.String'
        - name: x-api-version
          in: header
          schema:
            $ref: '#/components/schemas/System.String'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Vault.Api.Features.Get.Models.Instrument
              example:
                id: ins_4qz3nc8mfa4b8721zatgm910m1
                type: card
                status: active
                card:
                  number: '4242424242424242'
                  expiry_month: '12'
                  expiry_year: '27'
                  name_on_card: Mr Joe Bloggs
                created_at: '2026-03-20T13:32:28.4538927+00:00'
                updated_at: '2026-03-22T13:32:28.4538927+00:00'
                updated_by: kp_4vh46hvbmnh9w2q58kcqe06jc1
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.NotFoundError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
      security:
        - Bearer: []
  /instruments/{id}/suspend:
    post:
      tags:
        - Vault
      operationId: Suspend instrument
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/System.String'
        - name: x-api-version
          in: header
          schema:
            $ref: '#/components/schemas/System.String'
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.NotFoundError
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.UnprocessableEntityError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
      security:
        - Bearer: []
  /instruments/{id}/expire:
    post:
      tags:
        - Vault
      operationId: Expire instrument
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/System.String'
        - name: x-api-version
          in: header
          schema:
            $ref: '#/components/schemas/System.String'
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.NotFoundError
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.UnprocessableEntityError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
      security:
        - Bearer: []
  /instruments/{id}/reactivate:
    post:
      tags:
        - Vault
      operationId: Reactivate instrument
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/System.String'
        - name: x-api-version
          in: header
          schema:
            $ref: '#/components/schemas/System.String'
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.NotFoundError
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.UnprocessableEntityError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
      security:
        - Bearer: []
components:
  schemas:
    AccessTokenRequest:
      required:
        - audience
        - client_id
        - client_secret
        - grant_type
      type: object
      properties:
        client_id:
          type: string
          description: The client id provided
          nullable: true
        client_secret:
          type: string
          description: The client secret provided
          nullable: true
        grant_type:
          type: string
          description: The value must always be set to 'client_credentials'
          nullable: true
        audience:
          type: string
          description: >-
            The endpoint for the API you are integrating to. Refer to
            documentation for possible values.
          nullable: true
      additionalProperties: false
    AccessTokenResponse:
      required:
        - access_token
        - expires_in
      type: object
      properties:
        token_type:
          type: string
          description: >-
            The value is always 'Bearer' which indicates this response provides
            a 'Bearer' token in the form of an opaque AccessToken
          nullable: true
          readOnly: true
        access_token:
          type: string
          description: >-
            The opaque bearer token to send as part of the Authorization request
            header
          nullable: true
        expires_in:
          type: integer
          description: >-
            The number of seconds before the access token expires. Expressed in
            seconds
          format: int64
        scope:
          type: string
          description: >-
            Optional list of scopes separated by space.

            Refer to the Developer resources documentation for a comprehensive
            list
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Commands.Create.Request:
      required:
        - amount
        - currency
        - customer
        - device_ip_address
        - reference
        - urls
      type: object
      properties:
        amount:
          maximum: 100000000
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: The payment amount in minor units<br>Value must be greater than 0
          format: int32
          example: 120
        reference:
          maxLength: 64
          minLength: 1
          pattern: '[A-Za-z0-9_-]'
          type: string
          description: A reference to the payment<br>Usually your internal order identifier
          example: ord123
        currency:
          maxLength: 3
          minLength: 0
          type: string
          description: Three-letter currency code - ISO 4217
          example: EUR
        device_ip_address:
          maxLength: 39
          minLength: 1
          type: string
          description: >-
            The IP address from where the payment is originated (for customer
            initiated payments)
          example: 192.0.2.0
        route:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Commands.Create.Route
        customer:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Customer
        method:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Commands.Models.Method
        billing_address:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.BillingAddress
        urls:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.PaymentUrls
        metadata:
          type: object
          additionalProperties:
            type: string
          description: An object to store any metadata associated with this payment
          nullable: true
        aft:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Aft
        language:
          type: string
          description: The preferred language of the customer
          nullable: true
        credential_on_file:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.CredentialOnFile
        schedule:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Schedule
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Commands.Create.Route:
      title: Route
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: The route id
          nullable: true
          example: rou_4x3z3vjvv5ezfbxjntr5531rn8
      additionalProperties: false
      description: >-
        Route details to direct your traffic<br/>Required unless your
        application is set up with our routing engine.
    Paytently.Payments.Gateway.Api.Contracts.Commands.Models.Card:
      required:
        - cvv
        - expiry_month
        - expiry_year
        - name_on_card
        - number
      type: object
      properties:
        number:
          minLength: 1
          type: string
          description: The card number
          example: '5454545454545454'
        cvv:
          maxLength: 4
          minLength: 3
          type: string
          description: The card verification value
          example: '123'
        expiry_year:
          maxLength: 2
          minLength: 0
          type: string
          description: The expiry year of card - YY format
          example: '29'
        expiry_month:
          maxLength: 2
          minLength: 0
          type: string
          description: The expiry month of card - MM format
          example: '06'
        name_on_card:
          maxLength: 64
          minLength: 1
          pattern: ^[\p{Letter}.'- ]+$
          type: string
          description: The name of the cardholder
          example: Mr Joe Bloggs
        force_3ds_challenge:
          type: boolean
          description: Whether the cardholder should be forced to perform a 3DS challenge
          example: false
        preferred_scheme:
          enum:
            - visa
            - mastercard
            - carte_bancaire
          type: string
          description: >-
            The cardholder's choice of payment network when processing a
            co-badged card
          example: false
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Commands.Models.Method:
      title: Method
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.MethodType
        card:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Commands.Models.Card
        revolut_pay:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Commands.Models.RevolutPay
        create_vault_instrument:
          type: boolean
          description: >-
            Indication to save the provided payment method into the Vault for
            future use
          nullable: true
        vault_instrument_id:
          type: string
          description: >-
            The unique identifier for a previously created vault instrument.
            Required when the type is network_token
          nullable: true
      additionalProperties: false
      description: >-
        The method of the payment<br/>type is required unless making a Hosted
        Forms payment, where method is omitted or only contains
        create_vault_instrument
    Paytently.Payments.Gateway.Api.Contracts.Commands.Models.RevolutPay:
      type: object
      properties:
        force_3ds_challenge:
          type: boolean
          description: Whether the customer should be forced to perform a 3DS challenge
          example: false
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Commands.Refund.Request:
      type: object
      properties:
        amount:
          maximum: 100000000
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: >-
            The refund amount in minor units.<br>If not specified then the full
            amount will be refunded.
          format: int32
          nullable: true
          example: 15
        reference:
          maxLength: 32
          minLength: 1
          pattern: '[A-Za-z0-9_-]'
          type: string
          description: >-
            A reference for the refund<br>Usually your internal refund
            identifier
          example: refund123
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Commands.Void.Request:
      required:
        - reference
      type: object
      properties:
        reference:
          maxLength: 32
          minLength: 1
          pattern: '[A-Za-z0-9_-]'
          type: string
          description: A reference for the void<br>Usually your internal void identifier
          example: void123
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.Aft:
      title: Aft
      required:
        - number
      type: object
      properties:
        number:
          maxLength: 34
          minLength: 1
          type: string
          description: The AFT identifier of the payment
          example: '6548123789'
      additionalProperties: false
      description: The AFT information of the payment
    Paytently.Payments.Gateway.Api.Contracts.Common.AuthorizeRedirectionUrls:
      title: Authorize
      required:
        - failure
        - success
      type: object
      properties:
        success:
          minLength: 1
          type: string
          description: URL to redirect the user to after successful completion.
          example: https://example.com/webhook
        failure:
          minLength: 1
          type: string
          description: URL to redirect the user to after a failure.
          example: https://example.com/webhook
      additionalProperties: false
      description: URLs for redirecting the user after authorization has been completed.
    Paytently.Payments.Gateway.Api.Contracts.Common.BillingAddress:
      title: BillingAddress
      required:
        - city
        - country
        - line_one
        - postal_code
      type: object
      properties:
        line_one:
          maxLength: 64
          minLength: 1
          pattern: '[\p{Letter}0-9'',/- ]'
          type: string
          description: The first line of the address
          example: 123 Rye Lane
        postal_code:
          maxLength: 10
          minLength: 1
          pattern: '[A-Za-z0-9- ]'
          type: string
          description: The postal code of the address
          example: SE15 5ET
        city:
          maxLength: 64
          minLength: 1
          pattern: '[\p{Letter}0-9'',- ]'
          type: string
          description: The address city
          example: London
        country:
          minLength: 1
          type: string
          description: The three-letter country code for the address - ISO 3166
          example: GBR
        state:
          maxLength: 32
          minLength: 1
          type: string
          description: >-
            Optional state for the address<br>For USA this must be a valid USPS
            code<br>For Canada this must be a valid province/territory postal
            code<br>(e.g. CA for California, ON for Ontario)
          nullable: true
      additionalProperties: false
      description: The billing address associated to the card
    Paytently.Payments.Gateway.Api.Contracts.Common.Contact:
      required:
        - email
        - phone
      type: object
      properties:
        phone:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Phone
        email:
          maxLength: 52
          minLength: 1
          type: string
          description: The email address of the customer
          example: joe.bloggs@example.com
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.CredentialOnFile:
      required:
        - initiator
        - intent
        - stage
      type: object
      properties:
        initiator:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Initiator
        intent:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Intent
        stage:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Stage
        initial_payment_ids:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.PaymentIds
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.Customer:
      title: Customer
      required:
        - contact
        - first_name
        - id
        - last_name
      type: object
      properties:
        id:
          maxLength: 64
          minLength: 1
          type: string
          description: Your internal identifier for the customer
          example: ec3f8ed0-1568-4065-a35e-21cb6aad6965
        first_name:
          maxLength: 32
          minLength: 1
          pattern: ^[\p{Letter}.'- ]+$
          type: string
          description: The first name of the customer
          example: Joe
        last_name:
          maxLength: 32
          minLength: 1
          pattern: ^[\p{Letter}.'- ]+$
          type: string
          description: The last name of the customer
          example: Bloggs
        birth_date:
          type: string
          description: >-
            The date of birth of the customer.<br>Must be in the format
            YYYY-MM-DD<br>Required on some channels
          nullable: true
          example: '1990-07-25'
        nationality:
          type: string
          description: >-
            The nationality of the customer.<br>Must be in a three-letter
            country code ISO 3166 format<br>Required on some channels and
            payment methods<br>
          nullable: true
          example: FRA
        birth_country:
          type: string
          description: >-
            The birth country of the customer.<br>Must be in a three-letter
            country code ISO 3166 format<br>Required on some channels
          nullable: true
          example: GBR
        occupation:
          maxLength: 35
          minLength: 1
          type: string
          description: The occupation of the customer.<br>Required on some channels
          nullable: true
          example: Director
        contact:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Contact
        lifecycle:
          description: The lifecycle of the customer
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.CustomerLifecycle
      additionalProperties: false
      description: Customer details
    Paytently.Payments.Gateway.Api.Contracts.Common.CustomerLifecycle:
      enum:
        - first_time_depositor
        - trusted
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Common.Error:
      type: object
      properties:
        code:
          type: string
          description: The alphanumeric code representing this error.
          nullable: true
          example: reference_required
        reason:
          type: string
          description: A human readable reason message for the error
          nullable: true
          example: reference must only contain letters and numbers
        detail:
          type: string
          description: The details of error
          nullable: true
          example: 'Invalid characters: $@'
        docs:
          type: string
          description: A URL for the API specification schema
          nullable: true
          example: https://docs.paytently.io/api/reference
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.ExternalSchedule:
      required:
        - interval
      type: object
      properties:
        end_date:
          type: string
          description: The expected end date of the recurring or installment series.
          format: date
          nullable: true
        interval:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.ExternalScheduleInterval
        min_interval_days:
          type: integer
          description: >-
            The minimum number of days that must elapse between charges in the
            series.
          format: int32
        installment_count:
          type: integer
          description: >-
            The total number of payments in the installment series.<br>Required
            when intent is installment.
          format: int32
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.ExternalScheduleInterval:
      required:
        - amount
        - unit
      type: object
      properties:
        amount:
          type: integer
          description: The number of units between charges.
          format: int32
        unit:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.IntervalUnit
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.HostedFormsRedirectionUrls:
      title: HostedForms
      required:
        - failure
      type: object
      properties:
        success:
          minLength: 1
          type: string
          description: URL to redirect the user to after successful completion.
          nullable: true
          example: https://example.com/webhook
        failure:
          minLength: 1
          type: string
          description: URL to redirect the user to after a failure.
          example: https://example.com/webhook
      additionalProperties: false
      description: >-
        URLs for redirecting the user after a hosted forms submission has been
        completed.<br>Required if making a hosted forms payment.
    Paytently.Payments.Gateway.Api.Contracts.Common.Initiator:
      enum:
        - customer
        - merchant
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Common.Intent:
      enum:
        - scheduled
        - installment
        - unscheduled
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Common.IntervalUnit:
      enum:
        - day
        - week
        - month
        - year
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Common.MethodType:
      enum:
        - card
        - open_banking
        - google_pay
        - apple_pay
        - blik
        - multibanco
        - bancontact
        - p24
        - revolut_pay
        - eps
        - my_bank
        - pay_u
        - trustly
        - rillpay_cashier
        - ideal
        - mb_way
        - paysafe_card
        - safello_cashier
        - network_token
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Common.PaymentIds:
      type: object
      properties:
        paytently:
          type: string
          description: >-
            The Paytently transaction id of the initial payment. Required if the
            initial payment was processed by Paytently.
          nullable: true
        scheme:
          type: string
          description: >-
            The scheme transaction reference of the initial payment. Required if
            the initial payment was processed outside of Paytently.
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.PaymentUrls:
      title: PaymentUrls
      type: object
      properties:
        authorize:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.AuthorizeRedirectionUrls
        hosted_forms:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.HostedFormsRedirectionUrls
        webhook:
          type: string
          description: >-
            URL used to receive webhook notifications for events relating to
            this payment
          nullable: true
          example: https://example.com/webhook
        merchant_website:
          type: string
          description: The website of the merchant initiating the payment
          nullable: true
          example: https://example.com
        vault:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.VaultUrls
      additionalProperties: false
      description: URLs for the payment
    Paytently.Payments.Gateway.Api.Contracts.Common.Phone:
      required:
        - country_code
        - number
      type: object
      properties:
        country_code:
          maxLength: 3
          minLength: 1
          pattern: '[0-9]'
          type: string
          description: The international country calling code - ITU-T E.164 (without the +)
          example: '44'
        number:
          maxLength: 15
          minLength: 5
          pattern: '[0-9]'
          type: string
          description: The phone number
          example: '07812345678'
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.ResponseError:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Error
          description: A list of errors
          nullable: true
        trace_id:
          type: string
          description: A unique id to trace the request
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.Schedule:
      type: object
      properties:
        external:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.ExternalSchedule
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Common.Stage:
      enum:
        - initial
        - subsequent
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Common.VaultUrls:
      type: object
      properties:
        webhook:
          type: string
          description: >-
            URL used to receive webhook notifications for vault events relating
            to this payment
          nullable: true
          example: https://example.com/webhook
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Application:
      title: Application
      required:
        - entity_id
        - id
      type: object
      properties:
        id:
          type: string
          nullable: true
        entity_id:
          type: string
          nullable: true
      additionalProperties: false
      description: Application details
    Paytently.Payments.Gateway.Api.Contracts.Queries.AuthorizeLink:
      title: Authorize
      required:
        - href
        - method
      type: object
      properties:
        href:
          type: string
          description: The URL of the action
          nullable: true
        method:
          type: string
          description: The HTTP method of the request
          nullable: true
      additionalProperties: false
      description: URL to redirect the user to for completion of 3DS authorization
    Paytently.Payments.Gateway.Api.Contracts.Queries.BasePaymentResponse:
      required:
        - _links
        - id
        - status
      type: object
      properties:
        id:
          type: string
          description: The id of the payment
          nullable: true
          example: pay_12345
        status:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Status
        _links:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.PaymentLinks
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Channel:
      title: Channel
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
          description: The channel id
          nullable: true
          example: cha_4x3z3vjvv5ezfbxjntr5531rn8
        name:
          type: string
          description: The channel name
          nullable: true
      additionalProperties: false
      description: Channel details
    Paytently.Payments.Gateway.Api.Contracts.Queries.Chargeback:
      required:
        - requested_on
        - status
      type: object
      properties:
        status:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.ChargebackStatus
        requested_on:
          type: string
          description: The UTC timestamp when the chargeback request was received
          format: date-time
        completed_on:
          type: string
          description: The UTC timestamp when the chargeback was completed
          format: date-time
          nullable: true
        amount:
          type: integer
          description: The amount of the chargeback
          format: int32
        reason:
          type: string
          description: The reason for the chargeback
          nullable: true
        code:
          type: string
          description: The scheme code for the chargeback
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Condition:
      required:
        - operator
        - property
      type: object
      properties:
        property:
          type: string
          description: The property matched
          nullable: true
        operator:
          type: string
          description: The operator used
          nullable: true
        values:
          type: array
          items:
            type: string
          description: The values that matched
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.FraudCheck:
      required:
        - checks
      type: object
      properties:
        score:
          type: integer
          description: The fraud score of the payment. From 0 to 100
          format: int32
        checks:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.FraudChecks
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.FraudCheckEntry:
      type: object
      properties:
        match:
          type: boolean
          description: Whether there was a match in the check
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.FraudChecks:
      required:
        - crimelist
        - pep
        - sanctions
        - watchlist
      type: object
      properties:
        pep:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.FraudCheckEntry
        sanctions:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.FraudCheckEntry
        watchlist:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.FraudCheckEntry
        crimelist:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.FraudCheckEntry
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.HostedFormsLink:
      title: HostedForms
      required:
        - href
        - method
      type: object
      properties:
        href:
          type: string
          description: The URL of the action
          nullable: true
        method:
          type: string
          description: The HTTP method of the request
          nullable: true
      additionalProperties: false
      description: URL to redirect the user to for payment method collection
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.AmountDetails:
      title: AmountDetails
      type: object
      properties:
        total_authorized:
          type: integer
          description: Total amount authorized
          format: int32
        total_captured:
          type: integer
          description: Total amount captured
          format: int32
        total_refunded:
          type: integer
          description: Total amount refunded
          format: int32
        available_to_capture:
          type: integer
          description: Amount available to capture
          format: int32
        available_to_refund:
          type: integer
          description: Amount available to refund
          format: int32
      additionalProperties: false
      description: The amount details of the payment
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Bank:
      type: object
      properties:
        name:
          type: string
          description: The bank name
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.BankAccount:
      type: object
      properties:
        country:
          type: string
          description: The three-letter country code of the account - ISO 3166
          nullable: true
        number:
          type: string
          description: The account number
          nullable: true
        sort_code:
          type: string
          description: The sort code of the account - only used when Type is 'UKAccount'
          nullable: true
        type:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.BankAccountType
        bank:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Bank
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.BankAccountType:
      enum:
        - iban
        - bban
        - bank_giro
        - plus_giro
        - uk_account
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Card:
      required:
        - name_on_card
        - number
      type: object
      properties:
        number:
          type: string
          description: The last four digits of the card number
          nullable: true
        name_on_card:
          type: string
          nullable: true
        scheme:
          type: string
          nullable: true
        segment:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        issuer:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Issuer
        force_3ds_challenge:
          type: boolean
        preferred_scheme:
          enum:
            - visa
            - mastercard
            - carte_bancaire
          type: string
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.ChargebackStatus:
      enum:
        - pending
        - failed
        - completed
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Issuer:
      type: object
      properties:
        name:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Method:
      required:
        - type
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.MethodType
        card:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Card
        open_banking:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.OpenBanking
        revolut_pay:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.RevolutPay
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.OpenBanking:
      type: object
      properties:
        account:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.BankAccount
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.RefundStatus:
      enum:
        - pending
        - declined
        - failed
        - completed
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.RevolutPay:
      type: object
      properties:
        force_3ds_challenge:
          type: boolean
          description: Whether the customer should be forced to perform a 3DS challenge
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Status:
      enum:
        - pending
        - flagged_for_review
        - authorized
        - captured
        - abandoned
        - failed
        - declined
        - voided
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Queries.Models.VoidStatus:
      enum:
        - pending
        - declined
        - failed
        - completed
      type: string
    Paytently.Payments.Gateway.Api.Contracts.Queries.PaymentLinks:
      title: Links
      required:
        - self
      type: object
      properties:
        self:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.SelfLink
        refund:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.RefundLink
        authorize:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.AuthorizeLink
        hosted_forms:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.HostedFormsLink
      additionalProperties: false
      description: Links for actions that can be performed on this payment
    Paytently.Payments.Gateway.Api.Contracts.Queries.PaymentResponse:
      required:
        - _links
        - amount
        - amount_details
        - currency
        - customer
        - device_ip_address
        - id
        - reference
        - requested_on
        - status
        - urls
      type: object
      properties:
        id:
          type: string
          description: The id of the payment
          nullable: true
          example: pay_12345
        status:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Status
        _links:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.PaymentLinks
        reference:
          type: string
          description: Your reference for the payment
          nullable: true
        amount:
          type: integer
          description: The requested payment amount in minor units
          format: int32
        amount_details:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.AmountDetails
        currency:
          type: string
          description: Three-letter currency code - ISO 4217
          nullable: true
        customer:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Customer
        billing_address:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.BillingAddress
        device_ip_address:
          type: string
          description: >-
            The IP address from where the payment is originated (for customer
            initiated payments)
          nullable: true
        application:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Application
        method:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.Method
        urls:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.PaymentUrls
        metadata:
          type: object
          additionalProperties:
            type: string
          description: An object to store any metadata associated with this payment
          nullable: true
        requested_on:
          type: string
          description: The UTC timestamp when the payment request was received at Paytently
          format: date-time
        completed_on:
          type: string
          description: The UTC timestamp when the payment reached a final status
          format: date-time
          nullable: true
        errors:
          title: Errors
          type: array
          items:
            $ref: >-
              #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Error
          description: A list of errors associated with the payment
          nullable: true
        route:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Route
        refunds:
          title: Refunds
          type: array
          items:
            $ref: >-
              #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Refund
          description: Refunds associated with the payment
          nullable: true
        voids:
          title: Voids
          type: array
          items:
            $ref: >-
              #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Void
          description: Voids associated with the payment
          nullable: true
        risk_rules:
          title: RiskRules
          type: array
          items:
            $ref: >-
              #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Rule
          description: Risk rules associated with the payment
          nullable: true
        language:
          type: string
          description: The preferred language of the customer
          nullable: true
        fraud_check:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.FraudCheck
        chargeback:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Chargeback
        aft:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Aft
        credential_on_file:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.CredentialOnFile
        schedule:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Schedule
        external_scheme_id:
          type: string
          description: The external scheme ID associated with the payment
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Refund:
      required:
        - amount
        - id
        - requested_on
        - status
      type: object
      properties:
        id:
          type: string
          description: The id of the refund
          nullable: true
          example: ref_123
        amount:
          type: integer
          description: The amount to be refunded
          format: int32
          example: 15
        status:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.RefundStatus
        reference:
          type: string
          description: Your reference for the refund
          nullable: true
          example: refund123
        requested_on:
          type: string
          description: The UTC timestamp when the refund request was received at Paytently
          format: date-time
        external_transaction_id:
          type: string
          description: The external transaction id of the refund
          nullable: true
        external_error_code:
          type: string
          description: The external error code from the channel
          nullable: true
        external_error_message:
          type: string
          description: The external error message from the channel
          nullable: true
        errors:
          title: Errors
          type: array
          items:
            $ref: >-
              #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Error
          description: A list of errors associated with the refund
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.RefundLink:
      title: Refund
      required:
        - href
        - method
      type: object
      properties:
        href:
          type: string
          description: The URL of the action
          nullable: true
        method:
          type: string
          description: The HTTP method of the request
          nullable: true
      additionalProperties: false
      description: URL to perform a refund request
    Paytently.Payments.Gateway.Api.Contracts.Queries.RefundLinks:
      title: Refund
      required:
        - self
      type: object
      properties:
        self:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.SelfLink
      additionalProperties: false
      description: Links for actions that can be performed on this refund
    Paytently.Payments.Gateway.Api.Contracts.Queries.RefundResponse:
      required:
        - _links
        - amount
        - currency
        - id
        - requested_on
        - status
      type: object
      properties:
        id:
          type: string
          description: The id of the refund
          nullable: true
          example: ref_12345
        status:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.RefundStatus
        _links:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.RefundLinks
        amount:
          type: integer
          description: The refund amount in minor units
          format: int32
        currency:
          type: string
          description: The refund currency
          nullable: true
        requested_on:
          type: string
          description: The UTC timestamp when the refund request was received at Paytently
          format: date-time
        completed_on:
          type: string
          description: The UTC timestamp when the refund reached a final status
          format: date-time
          nullable: true
        external_transaction_id:
          type: string
          description: The external transaction id of the refund
          nullable: true
        external_error_code:
          type: string
          description: The external error code from the channel
          nullable: true
        external_error_message:
          type: string
          description: The external error message from the channel
          nullable: true
        errors:
          title: Errors
          type: array
          items:
            $ref: >-
              #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Common.Error
          description: A list of errors associated with the Refund
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.Route:
      title: Route
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: The route id
          nullable: true
          example: rou_4x3z3vjvv5ezfbxjntr5531rn8
        channel:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Channel
        external_transaction_id:
          type: string
          description: The external transaction id of the payment
          nullable: true
        external_error_code:
          type: string
          description: The external error code from the channel
          nullable: true
        external_error_message:
          type: string
          description: The external error message from the channel
          nullable: true
        reconciliation_id:
          type: string
          description: The reconciliation identifier from the channel
          nullable: true
      additionalProperties: false
      description: >-
        Route details to direct your traffic<br/>Required unless your
        application is set up with our routing engine.
    Paytently.Payments.Gateway.Api.Contracts.Queries.Rule:
      required:
        - id
        - type
      type: object
      properties:
        id:
          type: string
          description: The rule id
          nullable: true
        conditions:
          type: array
          items:
            $ref: >-
              #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Condition
          description: The matching conditions
          nullable: true
        type:
          type: string
          description: The rule type (block, allow, override)
          nullable: true
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.SelfLink:
      title: Self
      required:
        - href
        - method
      type: object
      properties:
        href:
          type: string
          description: The URL of the action
          nullable: true
        method:
          type: string
          description: The HTTP method of the request
          nullable: true
      additionalProperties: false
      description: URL to query this resource
    Paytently.Payments.Gateway.Api.Contracts.Queries.Void:
      required:
        - id
        - requested_on
        - status
      type: object
      properties:
        id:
          type: string
          description: The id of the void
          nullable: true
          example: voi_123
        status:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.VoidStatus
        reference:
          type: string
          description: Your reference to the void
          nullable: true
          example: voi123
        requested_on:
          type: string
          description: The UTC timestamp when the void request was received at Paytently
          format: date-time
      additionalProperties: false
    Paytently.Payments.Gateway.Api.Contracts.Queries.VoidLinks:
      title: Void
      required:
        - self
      type: object
      properties:
        self:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.SelfLink
      additionalProperties: false
      description: Links for actions that can be performed on this void
    Paytently.Payments.Gateway.Api.Contracts.Queries.VoidResponse:
      required:
        - _links
        - id
        - status
      type: object
      properties:
        id:
          type: string
          description: The id of the void
          nullable: true
          example: voi_123
        status:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.Models.VoidStatus
        _links:
          $ref: >-
            #/components/schemas/Paytently.Payments.Gateway.Api.Contracts.Queries.VoidLinks
      additionalProperties: false
    ProblemDetails:
      required:
        - title
        - trace_id
      type: object
      properties:
        title:
          type: string
          nullable: true
          example: Server error
        status:
          type: integer
          format: int32
          example: 500
        trace_id:
          type: string
          nullable: true
          example: 5caf78ae901749f3e04a287126399a35
      additionalProperties: false
    ListOfPaytently.Core.Api.Extensions.RequestHandling.Error:
      type: array
      items:
        $ref: >-
          #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.Error
    Microsoft.AspNetCore.Mvc.ProblemDetails:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/System.String'
          nullable: true
        title:
          $ref: '#/components/schemas/System.String'
          nullable: true
        status:
          $ref: '#/components/schemas/NullableOfSystem.Int32'
          nullable: true
        detail:
          $ref: '#/components/schemas/System.String'
          nullable: true
        instance:
          $ref: '#/components/schemas/System.String'
          nullable: true
    NullableOfSystem.DateTime:
      type: string
      format: date-time
    NullableOfSystem.Int32:
      pattern: ^-?(?:0|[1-9]\d*)$
      type:
        - integer
        - string
      format: int32
    Paytently.Core.Api.Extensions.RequestHandling.BadRequestError:
      required:
        - errors
      type: object
      properties:
        trace_id:
          $ref: '#/components/schemas/System.String'
        errors:
          $ref: >-
            #/components/schemas/ListOfPaytently.Core.Api.Extensions.RequestHandling.Error
    Paytently.Core.Api.Extensions.RequestHandling.Error:
      type: object
      anyOf:
        - $ref: >-
            #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.ErrorPaytently.Core.Api.Extensions.RequestHandling.PropertyError
        - $ref: >-
            #/components/schemas/Paytently.Core.Api.Extensions.RequestHandling.ErrorBase
    Paytently.Core.Api.Extensions.RequestHandling.ErrorBase:
      required:
        - code
        - reason
      properties:
        code:
          $ref: '#/components/schemas/System.String'
        reason:
          $ref: '#/components/schemas/System.String'
    Paytently.Core.Api.Extensions.RequestHandling.ErrorPaytently.Core.Api.Extensions.RequestHandling.PropertyError:
      required:
        - $type
        - property
        - code
        - reason
      properties:
        $type:
          enum:
            - property_error
          type: string
        property:
          $ref: '#/components/schemas/System.String'
        code:
          $ref: '#/components/schemas/System.String'
        reason:
          $ref: '#/components/schemas/System.String'
    Paytently.Core.Api.Extensions.RequestHandling.NotFoundError:
      required:
        - errors
      type: object
      properties:
        trace_id:
          $ref: '#/components/schemas/System.String'
        errors:
          $ref: >-
            #/components/schemas/ListOfPaytently.Core.Api.Extensions.RequestHandling.Error
    Paytently.Core.Api.Extensions.RequestHandling.UnprocessableEntityError:
      required:
        - errors
      type: object
      properties:
        trace_id:
          $ref: '#/components/schemas/System.String'
        errors:
          $ref: >-
            #/components/schemas/ListOfPaytently.Core.Api.Extensions.RequestHandling.Error
    Paytently.Vault.Api.Features.Common.Models.Initiator:
      type: object
      properties:
        payment_id:
          $ref: '#/components/schemas/System.String'
          nullable: true
    Paytently.Vault.Api.Features.Common.Models.InstrumentStatus:
      enum:
        - pending
        - active
        - expired
        - suspended
        - deleted
        - failed
    Paytently.Vault.Api.Features.Common.Models.InstrumentType:
      enum:
        - card
        - network_token
    Paytently.Vault.Api.Features.Common.Models.Urls:
      type: object
      properties:
        webhook:
          $ref: '#/components/schemas/System.String'
          nullable: true
    Paytently.Vault.Api.Features.Create.Models.Card:
      required:
        - number
        - expiry_month
        - expiry_year
        - name_on_card
      type: object
      properties:
        number:
          $ref: '#/components/schemas/System.String'
          nullable: true
        expiry_month:
          $ref: '#/components/schemas/System.String'
          nullable: true
        expiry_year:
          $ref: '#/components/schemas/System.String'
          nullable: true
        name_on_card:
          $ref: '#/components/schemas/System.String'
          nullable: true
    Paytently.Vault.Api.Features.Create.Models.Customer:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/System.String'
          nullable: true
    Paytently.Vault.Api.Features.Create.Models.Request:
      required:
        - type
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/Paytently.Vault.Api.Features.Common.Models.InstrumentType
        card:
          $ref: '#/components/schemas/Paytently.Vault.Api.Features.Create.Models.Card'
          nullable: true
        instrument_id:
          $ref: '#/components/schemas/System.String'
          nullable: true
        customer:
          $ref: >-
            #/components/schemas/Paytently.Vault.Api.Features.Create.Models.Customer
          nullable: true
        urls:
          $ref: '#/components/schemas/Paytently.Vault.Api.Features.Common.Models.Urls'
          nullable: true
        initiator:
          $ref: >-
            #/components/schemas/Paytently.Vault.Api.Features.Common.Models.Initiator
          nullable: true
        entity_id:
          $ref: '#/components/schemas/System.String'
          nullable: true
    Paytently.Vault.Api.Features.Create.Models.Response:
      required:
        - id
        - status
      type: object
      properties:
        id:
          $ref: '#/components/schemas/System.String'
        status:
          $ref: >-
            #/components/schemas/Paytently.Vault.Api.Features.Common.Models.InstrumentStatus
    Paytently.Vault.Api.Features.Get.Models.Card:
      required:
        - number
      type: object
      properties:
        number:
          $ref: '#/components/schemas/System.String'
        expiry_month:
          $ref: '#/components/schemas/System.String'
          nullable: true
        expiry_year:
          $ref: '#/components/schemas/System.String'
          nullable: true
        name_on_card:
          $ref: '#/components/schemas/System.String'
          nullable: true
    Paytently.Vault.Api.Features.Get.Models.Error:
      required:
        - code
        - reason
        - docs
      type: object
      properties:
        code:
          type: string
        reason:
          type: string
        docs:
          type: string
    Paytently.Vault.Api.Features.Get.Models.Instrument:
      required:
        - id
        - type
        - status
        - created_at
      type: object
      properties:
        id:
          $ref: '#/components/schemas/System.String'
        entity_id:
          $ref: '#/components/schemas/System.String'
          nullable: true
        type:
          $ref: >-
            #/components/schemas/Paytently.Vault.Api.Features.Common.Models.InstrumentType
        status:
          $ref: >-
            #/components/schemas/Paytently.Vault.Api.Features.Common.Models.InstrumentStatus
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Paytently.Vault.Api.Features.Get.Models.Error'
          nullable: true
        card:
          $ref: '#/components/schemas/Paytently.Vault.Api.Features.Get.Models.Card'
          nullable: true
        network_token:
          $ref: >-
            #/components/schemas/Paytently.Vault.Api.Features.Get.Models.NetworkToken
          nullable: true
        urls:
          $ref: '#/components/schemas/Paytently.Vault.Api.Features.Common.Models.Urls'
          nullable: true
        created_at:
          $ref: '#/components/schemas/System.DateTime'
        updated_at:
          $ref: '#/components/schemas/NullableOfSystem.DateTime'
          nullable: true
        updated_by:
          $ref: '#/components/schemas/System.String'
          nullable: true
        suspended_at:
          $ref: '#/components/schemas/NullableOfSystem.DateTime'
          nullable: true
        suspended_by:
          $ref: '#/components/schemas/System.String'
          nullable: true
    Paytently.Vault.Api.Features.Get.Models.NetworkToken:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/System.String'
          nullable: true
        expiry_month:
          $ref: '#/components/schemas/System.String'
          nullable: true
        expiry_year:
          $ref: '#/components/schemas/System.String'
          nullable: true
    Paytently.Vault.Api.Features.Update.Models.Card:
      required:
        - expiry_month
        - expiry_year
      type: object
      properties:
        expiry_month:
          $ref: '#/components/schemas/System.String'
          nullable: true
        expiry_year:
          $ref: '#/components/schemas/System.String'
          nullable: true
    Paytently.Vault.Api.Features.Update.Models.Request:
      required:
        - card
      type: object
      properties:
        card:
          $ref: '#/components/schemas/Paytently.Vault.Api.Features.Update.Models.Card'
    System.DateTime:
      type: string
      format: date-time
    System.String:
      type: string
  securitySchemes:
    Bearer:
      type: http
      scheme: Bearer
