openapi: 3.0.0
info:
  version: v1
  title: Weavr Embedded Payment Run API
  license:
    name: private
    url: https://weavr.io
  x-logo:
    url: https://weavr-cdn.s3.eu-central-1.amazonaws.com/weavr-payment-run-logo.png
    backgroundColor: '#FFFFFF'
    altText: Weavr
  description: >
    Weavr Payment Run Plug-in API provides a simple and flexible way for
    Embedders to add payment execution capabilities in their application.


    By integrating Weavr Payment Run plug-in API in your application, you can
    embed banking and payment capabilities within your app to boost productivity
    for your users in a seamless experience.


    # Authentication

    Each request to the API must include an `api_key` that represents your
    account. You can obtain an API Key by registering for a Embedder account
    [here](https://portal.weavr.io/register/?plugin=payment-run).


    Almost all endpoints require a secondary authentication token `auth_token`
    that represents the user for whom the request is being executed.


    # Postman Collection

    To help you get started with your integration, you can download the
    [Postman](https://postman.com) collection
    [here](https://sandbox.weavr.io/payment-run/v1/postman). The collection
    includes the steps you’ll need to follow to integrate Embedded Payment Run
    within your app. 


    The collection makes use of environment variables to pre-fill details
    associated with your Sandbox account, such as your account’s API Key. You
    can download your Sandbox Account environment file from the [Sandbox
    Portal](https://portal.weavr.io/register/?plugin=payment-run).
servers:
  - url: https://sandbox.weavr.io/payment-run
    description: Sandbox
paths:
  /v1/payment_runs:
    post:
      description: >-
        Create a new payment run containing a list of outstanding supplier
        payments.


        Note that all the supplier payments in a payment run is limited to one
        currency. The currency of the payment run are enabled upon the Buyer’s
        registration.



        Required user role: `CREATOR`
      operationId: postPaymentRun
      summary: Create a payment run
      tags:
        - Payment runs
      parameters:
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: PaymentRunCreate
              required:
                - payments
              properties:
                paymentRunRef:
                  type: string
                  description: >-
                    A unique identifier by which you identify the payment run
                    with on your system.
                  example: 94fddfb2-297d-423d-9157-4200b7beb834
                tag:
                  type: string
                  description: >-
                    The tag field is a custom field that can be used to search
                    and filter.
                  maxLength: 50
                  pattern: ^[a-zA-Z0-9_-]+$
                description:
                  type: string
                  description: The long form description of the payment run
                  example: September payment run 01
                payments:
                  description: The list of payments associated with the payment run
                  type: array
                  minItems: 1
                  maxItems: 1000
                  items:
                    type: object
                    title: Payment
                    required:
                      - amount
                      - currency
                      - reference
                      - payee
                      - paymentAmount
                      - supplier
                    properties:
                      externalRef:
                        type: string
                        example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                        description: >-
                          The unique identifier by which you identify the
                          associated payable on your system.
                      paymentRef:
                        type: string
                        example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                        description: >-
                          The unique identifier by which you identify this
                          payment on your system.
                      paymentAmount:
                        description: The currency and amount to be paid to the supplier.
                        allOf:
                          - description: >-
                              The object representing a monetary amount in a
                              particular currency
                            required:
                              - currency
                              - amount
                            type: object
                            properties:
                              currency:
                                type: string
                                description: The currency expressed in ISO-4217 code.
                                maxLength: 3
                                minLength: 3
                                enum:
                                  - GBP
                                  - EUR
                              amount:
                                type: integer
                                format: int64
                                example: 454321
                                description: >
                                  The monetary amount, scaled to the lowest
                                  denomination of the currency.


                                  Example, an amount of 1000 for a GBP currency
                                  is actually 1000 pennies or GBP 10.00.
                          - type: object
                            properties:
                              amount:
                                type: integer
                                minimum: 1
                      reference:
                        type: string
                        maxLength: 18
                        minLength: 1
                        pattern: ^[0-9a-zA-Z.-]{1,18}$
                        description: >
                          The long form description of the payment. This
                          information is also shared with the supplier. The
                          allowed length is dependent on the payment type:

                          `SEPA` and `SWIFT` <= 35 characters

                          `Faster Payments` <= 18 characters
                      supplier:
                        required:
                          - bankAccountDetails
                          - name
                        type: object
                        description: >-
                          Represent the supplier bank account typically used in
                          Outgoing Wire Transfer transactions.
                        properties:
                          name:
                            type: string
                            minLength: 1
                            maxLength: 140
                            pattern: ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                            description: >
                              The supplier name. The allowed length and pattern
                              is dependent on the `bankAccountDetails` type:

                              * with `SepaBankDetails`: >= `1` character and <=
                              `150` characters

                              * with `FasterPaymentsBankDetails`: >= `1`
                              character and <= `140` characters with a pattern
                              of `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                              (please note that the `’` symbol is the unicode
                              value U+2019 (right single quotation mark) and not
                              the unicode value U+0027 (apostrophe))
                          address:
                            maxLength: 150
                            minLength: 1
                            type: string
                            description: The supplier's address.
                          bankName:
                            type: string
                            description: The supplier's bank name.
                          bankAddress:
                            maxLength: 150
                            minLength: 1
                            type: string
                            description: The supplier's bank address.
                          bankCountry:
                            type: string
                            description: >-
                              The supplier's bank country in ISO 3166 alpha-2
                              format.
                            maxLength: 2
                            minLength: 2
                            pattern: ^[A-Z]{2}$
                          type:
                            type: string
                            description: >-
                              The type of supplier account. Required only when
                              FasterPaymentsBankDetails are specified.
                            enum:
                              - PERSONAL
                              - BUSINESS
                          bankAccountDetails:
                            description: >-
                              Details of the supplier bank account, depending on
                              the type of transfer chosen.
                            oneOf:
                              - title: FasterPaymentsBankDetails
                                required:
                                  - accountNumber
                                  - sortCode
                                type: object
                                description: >-
                                  Bank details used in case the wire transfer is
                                  executed over Faster Payments.
                                properties:
                                  accountNumber:
                                    type: string
                                    minLength: 8
                                    maxLength: 8
                                    pattern: ^[0-9]{8}$
                                    description: >-
                                      Account number, required for wire transfer
                                      over Faster Payments.
                                  sortCode:
                                    type: string
                                    minLength: 6
                                    maxLength: 6
                                    pattern: ^[0-9]{6}$
                                    description: >-
                                      Sort code, required for wire transfer over
                                      Faster Payments.
                                  secondaryReference:
                                    type: string
                                    description: Secondary reference data if applicable.
                              - title: SepaBankDetails
                                required:
                                  - iban
                                type: object
                                description: >-
                                  Bank details used in case the wire transfer is
                                  executed over SEPA.
                                properties:
                                  iban:
                                    type: string
                                    minLength: 15
                                    maxLength: 34
                                    pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                    description: >-
                                      International Bank Account Number,
                                      required for wire transfer over SEPA.
                                  bankIdentifierCode:
                                    type: string
                                    minLength: 8
                                    maxLength: 11
                                    pattern: >-
                                      ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                    description: BIC, for wire transfer over SEPA.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - payments
                  - id
                  - status
                  - createdAt
                  - buyerId
                  - createdBy
                title: PaymentRun
                properties:
                  id:
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                    readOnly: true
                  paymentRunRef:
                    type: string
                    description: >-
                      A unique identifier by which you identify the payment run
                      with on your system.
                    example: 94fddfb2-297d-423d-9157-4200b7beb834
                  tag:
                    type: string
                    description: >-
                      The tag field is a custom field that can be used to search
                      and filter.
                    maxLength: 50
                    pattern: ^[a-zA-Z0-9_-]+$
                  description:
                    type: string
                    description: The long form description of the payment run
                    example: September payment run 01
                  createdBy:
                    type: string
                    pattern: ^[0-9]+$
                    example: '110747174434373672'
                    readOnly: true
                  status:
                    type: string
                    enum:
                      - QUEUED
                    example: PENDING_CONFIRMATION
                    description: >
                      The current status of the payment run.


                      - `QUEUED`: The payment run creation is an asynchronous
                      process. This status indicates that the payment run is
                      currently being validated
                    readOnly: true
                  statusReason:
                    type: string
                  payments:
                    type: array
                    items:
                      type: object
                      title: Payment
                      required:
                        - id
                        - status
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              description: The unique identifier of the payment line
                              readOnly: true
                            status:
                              type: string
                              enum:
                                - QUEUED
                                - CANCELLED
                                - COMPLETED
                                - FAILED
                                - PENDING_CHALLENGE
                                - PENDING_CONFIRMATION
                                - PENDING_FUNDING
                                - RETURNED
                                - AWAITING_FUNDS
                                - EXECUTING
                                - SCA_FAILED
                              description: >
                                The status of the payment


                                - `QUEUED`: The payment run creation is an
                                asynchronous process. This status indicates that
                                the payment run is currently being validated

                                - `PENDING_CHALLENGE`: Waiting for the payment
                                run to complete the SCA challenge

                                - `PENDING_FUNDING`: Pending until the necessary
                                funds are initiated. Initiate the funding
                                process via the `/payment_runs/{id}/fund`
                                endpoint

                                - `AWAITING_FUNDS`: Waiting for the required
                                funds to be available to execute payment

                                - `EXECUTING`: Payment is being executed and
                                awaiting final status confirmation

                                - `COMPLETED`: Payment executed successfully

                                - `FAILED`: Payment executed, but failed

                                - `CANCELLED`: Payment cancelled, because
                                payment run was cancelled

                                - `PENDING_CONFIRMATION`: Payment run is pending
                                confirmation by a `CONTROLLER` user

                                - `RETURNED`: Payment sent, but was returned
                                back

                                - `SCA_FAILED`: Payment run failed due to SCA
                                either expiring or max attempts reached. You can
                                restart the payment run by calling the
                                /payment_runs/{id}/restart endpoint
                              readOnly: true
                        - type: object
                          title: Payment
                          required:
                            - amount
                            - currency
                            - reference
                            - payee
                            - paymentAmount
                            - supplier
                          properties:
                            externalRef:
                              type: string
                              example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                              description: >-
                                The unique identifier by which you identify the
                                associated payable on your system.
                            paymentRef:
                              type: string
                              example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                              description: >-
                                The unique identifier by which you identify this
                                payment on your system.
                            paymentAmount:
                              description: >-
                                The currency and amount to be paid to the
                                supplier.
                              allOf:
                                - description: >-
                                    The object representing a monetary amount in
                                    a particular currency
                                  required:
                                    - currency
                                    - amount
                                  type: object
                                  properties:
                                    currency:
                                      type: string
                                      description: The currency expressed in ISO-4217 code.
                                      maxLength: 3
                                      minLength: 3
                                      enum:
                                        - GBP
                                        - EUR
                                    amount:
                                      type: integer
                                      format: int64
                                      example: 454321
                                      description: >
                                        The monetary amount, scaled to the
                                        lowest denomination of the currency.


                                        Example, an amount of 1000 for a GBP
                                        currency is actually 1000 pennies or GBP
                                        10.00.
                                - type: object
                                  properties:
                                    amount:
                                      type: integer
                                      minimum: 1
                            reference:
                              type: string
                              maxLength: 18
                              minLength: 1
                              pattern: ^[0-9a-zA-Z.-]{1,18}$
                              description: >
                                The long form description of the payment. This
                                information is also shared with the supplier.
                                The allowed length is dependent on the payment
                                type:

                                `SEPA` and `SWIFT` <= 35 characters

                                `Faster Payments` <= 18 characters
                            supplier:
                              required:
                                - bankAccountDetails
                                - name
                              type: object
                              description: >-
                                Represent the supplier bank account typically
                                used in Outgoing Wire Transfer transactions.
                              properties:
                                name:
                                  type: string
                                  minLength: 1
                                  maxLength: 140
                                  pattern: ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                                  description: >
                                    The supplier name. The allowed length and
                                    pattern is dependent on the
                                    `bankAccountDetails` type:

                                    * with `SepaBankDetails`: >= `1` character
                                    and <= `150` characters

                                    * with `FasterPaymentsBankDetails`: >= `1`
                                    character and <= `140` characters with a
                                    pattern of
                                    `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                                    (please note that the `’` symbol is the
                                    unicode value U+2019 (right single quotation
                                    mark) and not the unicode value U+0027
                                    (apostrophe))
                                address:
                                  maxLength: 150
                                  minLength: 1
                                  type: string
                                  description: The supplier's address.
                                bankName:
                                  type: string
                                  description: The supplier's bank name.
                                bankAddress:
                                  maxLength: 150
                                  minLength: 1
                                  type: string
                                  description: The supplier's bank address.
                                bankCountry:
                                  type: string
                                  description: >-
                                    The supplier's bank country in ISO 3166
                                    alpha-2 format.
                                  maxLength: 2
                                  minLength: 2
                                  pattern: ^[A-Z]{2}$
                                type:
                                  type: string
                                  description: >-
                                    The type of supplier account. Required only
                                    when FasterPaymentsBankDetails are
                                    specified.
                                  enum:
                                    - PERSONAL
                                    - BUSINESS
                                bankAccountDetails:
                                  description: >-
                                    Details of the supplier bank account,
                                    depending on the type of transfer chosen.
                                  oneOf:
                                    - title: FasterPaymentsBankDetails
                                      required:
                                        - accountNumber
                                        - sortCode
                                      type: object
                                      description: >-
                                        Bank details used in case the wire
                                        transfer is executed over Faster
                                        Payments.
                                      properties:
                                        accountNumber:
                                          type: string
                                          minLength: 8
                                          maxLength: 8
                                          pattern: ^[0-9]{8}$
                                          description: >-
                                            Account number, required for wire
                                            transfer over Faster Payments.
                                        sortCode:
                                          type: string
                                          minLength: 6
                                          maxLength: 6
                                          pattern: ^[0-9]{6}$
                                          description: >-
                                            Sort code, required for wire transfer
                                            over Faster Payments.
                                        secondaryReference:
                                          type: string
                                          description: Secondary reference data if applicable.
                                    - title: SepaBankDetails
                                      required:
                                        - iban
                                      type: object
                                      description: >-
                                        Bank details used in case the wire
                                        transfer is executed over SEPA.
                                      properties:
                                        iban:
                                          type: string
                                          minLength: 15
                                          maxLength: 34
                                          pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                          description: >-
                                            International Bank Account Number,
                                            required for wire transfer over SEPA.
                                        bankIdentifierCode:
                                          type: string
                                          minLength: 8
                                          maxLength: 11
                                          pattern: >-
                                            ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                          description: BIC, for wire transfer over SEPA.
                            validationOutcomes:
                              type: array
                              items:
                                type: object
                                properties:
                                  category:
                                    type: string
                                    enum:
                                      - UK_CONFIRMATION_OF_PAYEE
                                  categoryResult:
                                    type: object
                                    properties:
                                      match:
                                        type: string
                                        description: >-
                                          The result of matching performed by the
                                          UK Confirmation of Payee responder
                                        enum:
                                          - EXACT_MATCH
                                          - CLOSE_MATCH
                                          - NO_MATCH
                                      reasonCode:
                                        type: string
                                        description: >
                                          The reason why the matching failed at
                                          the UK Confirmation of Payee responder:

                                            - ANNM: The CoP responder confirms that the account `name` provided does not match;
                                            - MBAM: The CoP responder indicates that the account `name` provided closely matches the actual account in its records, the actual account name is returned in the `accountName` field;
                                            - BANM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that the actual account matching the `name` provided is actually BUSINESS;
                                            - PANM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that the actual account matching the `name` provided is actually PERSONAL;
                                            - BAMM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that an account closely matching the `name` provided is BUSINESS;
                                            - PAMM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that an account closely matching the `name` provided is PERSONAL;
                                            - AC01: The account does not exist in the CoP responders books, the `accountNumber` specified is likely incorrect; 
                                            - IVCR: The CoP responder was unable to locate an account based on the `secondaryReference` field;
                                            - ACNS: The account is not supported for CoP by the CoP responder;
                                            - OPTO: The owner of the account has opted out of CoP service by the CoP responder;
                                            - CASS: The account has been switched using the Current Account Switch Service;
                                            - SCNS: The `sortCode` provided is not supported at endpoint;
                                        enum:
                                          - ANNM
                                          - MBAM
                                          - BANM
                                          - PANM
                                          - BAMM
                                          - PAMM
                                          - AC01
                                          - IVCR
                                          - ACNS
                                          - OPTO
                                          - CASS
                                          - SCNS
                                      accountName:
                                        type: string
                                        description: >-
                                          Returned when there is `match` is a
                                          `CLOSE_MATCH` and the `reasonCode` is
                                          MBAM, BAMM or PAMM
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - BANK_ACCOUNT_CANNOT_BE_LINKED_ACCOUNT
                      - LINKED_ACCOUNT_INVALID_STATE
                      - BANK_ACCOUNT_CANNOT_BE_ZERO_BALANCE_ACCOUNT
                      - UNSUPPORTED_CURRENCY
                      - INVALID_SUPPLIER_BANK_ACCOUNT_DETAILS
                      - ZERO_BALANCE_ACCOUNT_INVALID_STATE
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
                      - MISSING_SUPPLIER_TYPE
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    get:
      summary: Get payment runs
      description: >-
        Retrieve the list of payment runs belonging to the buyer that the
        logged-in user belongs to.


        Required user roles: `CONTROLLER` OR `CREATOR`
      operationId: getPaymentRuns
      tags:
        - Payment runs
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            The limit of the results for paging, starting at the offset. Limit
            is always capped at 100.
          schema:
            maximum: 100
            minimum: 1
            type: integer
            format: int32
            default: 100
        - name: offset
          in: query
          required: false
          description: >-
            The offset value for paging, indicating the initial item number to
            be returned from the data set satisfying the given criteria. Leave
            out to fetch the first page of results.
          schema:
            minimum: 0
            type: integer
            format: int32
            default: 0
        - name: tag
          in: query
          required: false
          description: >-
            Filter by tag. The exact tag must be provided, as wildcards are not
            supported. Leave out to fetch all entries.
          schema:
            type: array
            uniqueItems: true
            items:
              type: string
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - QUEUED
              - CANCELLED
              - COMPLETED
              - COMPLETED_WITH_ERRORS
              - EXECUTING
              - INVALID
              - PENDING_CHALLENGE
              - PENDING_CONFIRMATION
              - PENDING_FUNDING
              - SCA_FAILED
            example: PENDING_CONFIRMATION
            description: The status of the payment run.
        - name: reference
          in: query
          required: false
          schema:
            type: string
            description: The unique paymentRunRef of the payment run.
        - name: min_amount
          in: query
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
            description: The minimum total amount of the payment run.
        - name: max_amount
          in: query
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
            description: The maximum total amount of the payment run.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                title: PaymentRunCollection
                allOf:
                  - type: object
                    title: PaginationFields
                    properties:
                      count:
                        type: integer
                        description: >-
                          The total number of records (excluding the paging
                          limit)
                        example: 10
                      responseCount:
                        type: integer
                        description: >-
                          The total number of records returned in this response
                          (always capped at 100).
                        example: 100
                    required:
                      - count
                      - responseCount
                  - type: object
                    properties:
                      paymentRuns:
                        type: array
                        items:
                          type: object
                          required:
                            - payments
                            - id
                            - status
                            - createdAt
                            - buyerId
                            - createdBy
                          title: PaymentRun
                          properties:
                            id:
                              type: string
                              pattern: ^[0-9a-fA-F]{24}$
                              readOnly: true
                            paymentRunRef:
                              type: string
                              description: >-
                                A unique identifier by which you identify the
                                payment run with on your system.
                              example: 94fddfb2-297d-423d-9157-4200b7beb834
                            tag:
                              type: string
                              description: >-
                                The tag field is a custom field that can be used
                                to search and filter.
                              maxLength: 50
                              pattern: ^[a-zA-Z0-9_-]+$
                            description:
                              type: string
                              description: The long form description of the payment run
                              example: September payment run 01
                            createdBy:
                              type: string
                              pattern: ^[0-9]+$
                              example: '110747174434373672'
                              readOnly: true
                            status:
                              type: string
                              enum:
                                - QUEUED
                                - CANCELLED
                                - COMPLETED
                                - COMPLETED_WITH_ERRORS
                                - EXECUTING
                                - INVALID
                                - PENDING_CHALLENGE
                                - PENDING_CONFIRMATION
                                - PENDING_FUNDING
                                - SCA_FAILED
                              example: PENDING_CONFIRMATION
                              description: >
                                The current status of the payment run.


                                - `QUEUED`: The payment run creation is an
                                asynchronous process. This status indicates that
                                the payment run is currently being validated

                                - `CANCELLED`: Payment run was manually
                                cancelled

                                - `COMPLETED`: All payments have been executed
                                successfully

                                - `COMPLETED_WITH_ERRORS`: All payments have
                                been executed and some failed

                                - `EXECUTING`: Funds received, executing
                                payments

                                - `INVALID`: Payment run is invalid

                                - `PENDING_CHALLENGE`: Waiting for the payment
                                run to complete the SCA challenge

                                - `PENDING_CONFIRMATION`: Payment run is pending
                                confirmation by a `CONTROLLER` user

                                - `PENDING_FUNDING`: Pending until the necessary
                                funds are initiated. Initiate the funding
                                process via the `/payment_runs/{id}/fund`
                                endpoint

                                - `SCA_FAILED`: Payment run failed due to SCA
                                either expiring or max attempts reached. You can
                                restart the payment run by calling the
                                `/payment_runs/{id}/restart` endpoint
                              readOnly: true
                            statusReason:
                              type: string
                            payments:
                              type: array
                              items:
                                type: object
                                title: Payment
                                required:
                                  - id
                                  - status
                                allOf:
                                  - type: object
                                    properties:
                                      id:
                                        type: string
                                        description: >-
                                          The unique identifier of the payment
                                          line
                                        readOnly: true
                                      status:
                                        type: string
                                        enum:
                                          - QUEUED
                                          - CANCELLED
                                          - COMPLETED
                                          - FAILED
                                          - PENDING_CHALLENGE
                                          - PENDING_CONFIRMATION
                                          - PENDING_FUNDING
                                          - RETURNED
                                          - AWAITING_FUNDS
                                          - EXECUTING
                                          - SCA_FAILED
                                        description: >
                                          The status of the payment


                                          - `QUEUED`: The payment run creation is
                                          an asynchronous process. This status
                                          indicates that the payment run is
                                          currently being validated

                                          - `PENDING_CHALLENGE`: Waiting for the
                                          payment run to complete the SCA
                                          challenge

                                          - `PENDING_FUNDING`: Pending until the
                                          necessary funds are initiated. Initiate
                                          the funding process via the
                                          `/payment_runs/{id}/fund` endpoint

                                          - `AWAITING_FUNDS`: Waiting for the
                                          required funds to be available to
                                          execute payment

                                          - `EXECUTING`: Payment is being executed
                                          and awaiting final status confirmation

                                          - `COMPLETED`: Payment executed
                                          successfully

                                          - `FAILED`: Payment executed, but failed

                                          - `CANCELLED`: Payment cancelled,
                                          because payment run was cancelled

                                          - `PENDING_CONFIRMATION`: Payment run is
                                          pending confirmation by a `CONTROLLER`
                                          user

                                          - `RETURNED`: Payment sent, but was
                                          returned back

                                          - `SCA_FAILED`: Payment run failed due
                                          to SCA either expiring or max attempts
                                          reached. You can restart the payment run
                                          by calling the
                                          /payment_runs/{id}/restart endpoint
                                        readOnly: true
                                  - type: object
                                    title: Payment
                                    required:
                                      - amount
                                      - currency
                                      - reference
                                      - payee
                                      - paymentAmount
                                      - supplier
                                    properties:
                                      externalRef:
                                        type: string
                                        example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                                        description: >-
                                          The unique identifier by which you
                                          identify the associated payable on your
                                          system.
                                      paymentRef:
                                        type: string
                                        example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                                        description: >-
                                          The unique identifier by which you
                                          identify this payment on your system.
                                      paymentAmount:
                                        description: >-
                                          The currency and amount to be paid to
                                          the supplier.
                                        allOf:
                                          - description: >-
                                              The object representing a monetary
                                              amount in a particular currency
                                            required:
                                              - currency
                                              - amount
                                            type: object
                                            properties:
                                              currency:
                                                type: string
                                                description: The currency expressed in ISO-4217 code.
                                                maxLength: 3
                                                minLength: 3
                                                enum:
                                                  - GBP
                                                  - EUR
                                              amount:
                                                type: integer
                                                format: int64
                                                example: 454321
                                                description: >
                                                  The monetary amount, scaled to the
                                                  lowest denomination of the currency.


                                                  Example, an amount of 1000 for a GBP
                                                  currency is actually 1000 pennies or GBP
                                                  10.00.
                                          - type: object
                                            properties:
                                              amount:
                                                type: integer
                                                minimum: 1
                                      reference:
                                        type: string
                                        maxLength: 18
                                        minLength: 1
                                        pattern: ^[0-9a-zA-Z.-]{1,18}$
                                        description: >
                                          The long form description of the
                                          payment. This information is also shared
                                          with the supplier. The allowed length is
                                          dependent on the payment type:

                                          `SEPA` and `SWIFT` <= 35 characters

                                          `Faster Payments` <= 18 characters
                                      supplier:
                                        required:
                                          - bankAccountDetails
                                          - name
                                        type: object
                                        description: >-
                                          Represent the supplier bank account
                                          typically used in Outgoing Wire Transfer
                                          transactions.
                                        properties:
                                          name:
                                            type: string
                                            minLength: 1
                                            maxLength: 140
                                            pattern: >-
                                              ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                                            description: >
                                              The supplier name. The allowed length
                                              and pattern is dependent on the
                                              `bankAccountDetails` type:

                                              * with `SepaBankDetails`: >= `1`
                                              character and <= `150` characters

                                              * with `FasterPaymentsBankDetails`: >=
                                              `1` character and <= `140` characters
                                              with a pattern of
                                              `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                                              (please note that the `’` symbol is the
                                              unicode value U+2019 (right single
                                              quotation mark) and not the unicode
                                              value U+0027 (apostrophe))
                                          address:
                                            maxLength: 150
                                            minLength: 1
                                            type: string
                                            description: The supplier's address.
                                          bankName:
                                            type: string
                                            description: The supplier's bank name.
                                          bankAddress:
                                            maxLength: 150
                                            minLength: 1
                                            type: string
                                            description: The supplier's bank address.
                                          bankCountry:
                                            type: string
                                            description: >-
                                              The supplier's bank country in ISO 3166
                                              alpha-2 format.
                                            maxLength: 2
                                            minLength: 2
                                            pattern: ^[A-Z]{2}$
                                          type:
                                            type: string
                                            description: >-
                                              The type of supplier account. Required
                                              only when FasterPaymentsBankDetails are
                                              specified.
                                            enum:
                                              - PERSONAL
                                              - BUSINESS
                                          bankAccountDetails:
                                            description: >-
                                              Details of the supplier bank account,
                                              depending on the type of transfer
                                              chosen.
                                            oneOf:
                                              - title: FasterPaymentsBankDetails
                                                required:
                                                  - accountNumber
                                                  - sortCode
                                                type: object
                                                description: >-
                                                  Bank details used in case the wire
                                                  transfer is executed over Faster
                                                  Payments.
                                                properties:
                                                  accountNumber:
                                                    type: string
                                                    minLength: 8
                                                    maxLength: 8
                                                    pattern: ^[0-9]{8}$
                                                    description: >-
                                                      Account number, required for wire
                                                      transfer over Faster Payments.
                                                  sortCode:
                                                    type: string
                                                    minLength: 6
                                                    maxLength: 6
                                                    pattern: ^[0-9]{6}$
                                                    description: >-
                                                      Sort code, required for wire transfer
                                                      over Faster Payments.
                                                  secondaryReference:
                                                    type: string
                                                    description: Secondary reference data if applicable.
                                              - title: SepaBankDetails
                                                required:
                                                  - iban
                                                type: object
                                                description: >-
                                                  Bank details used in case the wire
                                                  transfer is executed over SEPA.
                                                properties:
                                                  iban:
                                                    type: string
                                                    minLength: 15
                                                    maxLength: 34
                                                    pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                                    description: >-
                                                      International Bank Account Number,
                                                      required for wire transfer over SEPA.
                                                  bankIdentifierCode:
                                                    type: string
                                                    minLength: 8
                                                    maxLength: 11
                                                    pattern: >-
                                                      ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                                    description: BIC, for wire transfer over SEPA.
                                      validationOutcomes:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            category:
                                              type: string
                                              enum:
                                                - UK_CONFIRMATION_OF_PAYEE
                                            categoryResult:
                                              type: object
                                              properties:
                                                match:
                                                  type: string
                                                  description: >-
                                                    The result of matching performed by the
                                                    UK Confirmation of Payee responder
                                                  enum:
                                                    - EXACT_MATCH
                                                    - CLOSE_MATCH
                                                    - NO_MATCH
                                                reasonCode:
                                                  type: string
                                                  description: >
                                                    The reason why the matching failed at
                                                    the UK Confirmation of Payee responder:

                                                      - ANNM: The CoP responder confirms that the account `name` provided does not match;
                                                      - MBAM: The CoP responder indicates that the account `name` provided closely matches the actual account in its records, the actual account name is returned in the `accountName` field;
                                                      - BANM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that the actual account matching the `name` provided is actually BUSINESS;
                                                      - PANM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that the actual account matching the `name` provided is actually PERSONAL;
                                                      - BAMM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that an account closely matching the `name` provided is BUSINESS;
                                                      - PAMM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that an account closely matching the `name` provided is PERSONAL;
                                                      - AC01: The account does not exist in the CoP responders books, the `accountNumber` specified is likely incorrect; 
                                                      - IVCR: The CoP responder was unable to locate an account based on the `secondaryReference` field;
                                                      - ACNS: The account is not supported for CoP by the CoP responder;
                                                      - OPTO: The owner of the account has opted out of CoP service by the CoP responder;
                                                      - CASS: The account has been switched using the Current Account Switch Service;
                                                      - SCNS: The `sortCode` provided is not supported at endpoint;
                                                  enum:
                                                    - ANNM
                                                    - MBAM
                                                    - BANM
                                                    - PANM
                                                    - BAMM
                                                    - PAMM
                                                    - AC01
                                                    - IVCR
                                                    - ACNS
                                                    - OPTO
                                                    - CASS
                                                    - SCNS
                                                accountName:
                                                  type: string
                                                  description: >-
                                                    Returned when there is `match` is a
                                                    `CLOSE_MATCH` and the `reasonCode` is
                                                    MBAM, BAMM or PAMM
                            createdAt:
                              type: string
                              format: date-time
                              readOnly: true
                    required:
                      - paymentRuns
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/payment_runs/{payment_run_id}:
    get:
      description: >-
        Retrieve a payment run belonging to the buyer that the logged-in user
        belongs to.



        Required user roles: `CONTROLLER` OR `CREATOR`
      operationId: getPaymentRunsId
      summary: Get a payment run
      tags:
        - Payment runs
      parameters:
        - name: payment_run_id
          in: path
          required: true
          description: The unique identifier of the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
            readOnly: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - payments
                  - id
                  - status
                  - createdAt
                  - buyerId
                  - createdBy
                title: PaymentRun
                properties:
                  id:
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                    readOnly: true
                  paymentRunRef:
                    type: string
                    description: >-
                      A unique identifier by which you identify the payment run
                      with on your system.
                    example: 94fddfb2-297d-423d-9157-4200b7beb834
                  tag:
                    type: string
                    description: >-
                      The tag field is a custom field that can be used to search
                      and filter.
                    maxLength: 50
                    pattern: ^[a-zA-Z0-9_-]+$
                  description:
                    type: string
                    description: The long form description of the payment run
                    example: September payment run 01
                  createdBy:
                    type: string
                    pattern: ^[0-9]+$
                    example: '110747174434373672'
                    readOnly: true
                  status:
                    type: string
                    enum:
                      - QUEUED
                      - CANCELLED
                      - COMPLETED
                      - COMPLETED_WITH_ERRORS
                      - EXECUTING
                      - INVALID
                      - PENDING_CHALLENGE
                      - PENDING_CONFIRMATION
                      - PENDING_FUNDING
                      - SCA_FAILED
                    example: PENDING_CONFIRMATION
                    description: >
                      The current status of the payment run.


                      - `QUEUED`: The payment run creation is an asynchronous
                      process. This status indicates that the payment run is
                      currently being validated

                      - `CANCELLED`: Payment run was manually cancelled

                      - `COMPLETED`: All payments have been executed
                      successfully

                      - `COMPLETED_WITH_ERRORS`: All payments have been executed
                      and some failed

                      - `EXECUTING`: Funds received, executing payments

                      - `INVALID`: Payment run is invalid

                      - `PENDING_CHALLENGE`: Waiting for the payment run to
                      complete the SCA challenge

                      - `PENDING_CONFIRMATION`: Payment run is pending
                      confirmation by a `CONTROLLER` user

                      - `PENDING_FUNDING`: Pending until the necessary funds are
                      initiated. Initiate the funding process via the
                      `/payment_runs/{id}/fund` endpoint

                      - `SCA_FAILED`: Payment run failed due to SCA either
                      expiring or max attempts reached. You can restart the
                      payment run by calling the `/payment_runs/{id}/restart`
                      endpoint
                    readOnly: true
                  statusReason:
                    type: string
                  payments:
                    type: array
                    items:
                      type: object
                      title: Payment
                      required:
                        - id
                        - status
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              description: The unique identifier of the payment line
                              readOnly: true
                            status:
                              type: string
                              enum:
                                - QUEUED
                                - CANCELLED
                                - COMPLETED
                                - FAILED
                                - PENDING_CHALLENGE
                                - PENDING_CONFIRMATION
                                - PENDING_FUNDING
                                - RETURNED
                                - AWAITING_FUNDS
                                - EXECUTING
                                - SCA_FAILED
                              description: >
                                The status of the payment


                                - `QUEUED`: The payment run creation is an
                                asynchronous process. This status indicates that
                                the payment run is currently being validated

                                - `PENDING_CHALLENGE`: Waiting for the payment
                                run to complete the SCA challenge

                                - `PENDING_FUNDING`: Pending until the necessary
                                funds are initiated. Initiate the funding
                                process via the `/payment_runs/{id}/fund`
                                endpoint

                                - `AWAITING_FUNDS`: Waiting for the required
                                funds to be available to execute payment

                                - `EXECUTING`: Payment is being executed and
                                awaiting final status confirmation

                                - `COMPLETED`: Payment executed successfully

                                - `FAILED`: Payment executed, but failed

                                - `CANCELLED`: Payment cancelled, because
                                payment run was cancelled

                                - `PENDING_CONFIRMATION`: Payment run is pending
                                confirmation by a `CONTROLLER` user

                                - `RETURNED`: Payment sent, but was returned
                                back

                                - `SCA_FAILED`: Payment run failed due to SCA
                                either expiring or max attempts reached. You can
                                restart the payment run by calling the
                                /payment_runs/{id}/restart endpoint
                              readOnly: true
                        - type: object
                          title: Payment
                          required:
                            - amount
                            - currency
                            - reference
                            - payee
                            - paymentAmount
                            - supplier
                          properties:
                            externalRef:
                              type: string
                              example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                              description: >-
                                The unique identifier by which you identify the
                                associated payable on your system.
                            paymentRef:
                              type: string
                              example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                              description: >-
                                The unique identifier by which you identify this
                                payment on your system.
                            paymentAmount:
                              description: >-
                                The currency and amount to be paid to the
                                supplier.
                              allOf:
                                - description: >-
                                    The object representing a monetary amount in
                                    a particular currency
                                  required:
                                    - currency
                                    - amount
                                  type: object
                                  properties:
                                    currency:
                                      type: string
                                      description: The currency expressed in ISO-4217 code.
                                      maxLength: 3
                                      minLength: 3
                                      enum:
                                        - GBP
                                        - EUR
                                    amount:
                                      type: integer
                                      format: int64
                                      example: 454321
                                      description: >
                                        The monetary amount, scaled to the
                                        lowest denomination of the currency.


                                        Example, an amount of 1000 for a GBP
                                        currency is actually 1000 pennies or GBP
                                        10.00.
                                - type: object
                                  properties:
                                    amount:
                                      type: integer
                                      minimum: 1
                            reference:
                              type: string
                              maxLength: 18
                              minLength: 1
                              pattern: ^[0-9a-zA-Z.-]{1,18}$
                              description: >
                                The long form description of the payment. This
                                information is also shared with the supplier.
                                The allowed length is dependent on the payment
                                type:

                                `SEPA` and `SWIFT` <= 35 characters

                                `Faster Payments` <= 18 characters
                            supplier:
                              required:
                                - bankAccountDetails
                                - name
                              type: object
                              description: >-
                                Represent the supplier bank account typically
                                used in Outgoing Wire Transfer transactions.
                              properties:
                                name:
                                  type: string
                                  minLength: 1
                                  maxLength: 140
                                  pattern: ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                                  description: >
                                    The supplier name. The allowed length and
                                    pattern is dependent on the
                                    `bankAccountDetails` type:

                                    * with `SepaBankDetails`: >= `1` character
                                    and <= `150` characters

                                    * with `FasterPaymentsBankDetails`: >= `1`
                                    character and <= `140` characters with a
                                    pattern of
                                    `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                                    (please note that the `’` symbol is the
                                    unicode value U+2019 (right single quotation
                                    mark) and not the unicode value U+0027
                                    (apostrophe))
                                address:
                                  maxLength: 150
                                  minLength: 1
                                  type: string
                                  description: The supplier's address.
                                bankName:
                                  type: string
                                  description: The supplier's bank name.
                                bankAddress:
                                  maxLength: 150
                                  minLength: 1
                                  type: string
                                  description: The supplier's bank address.
                                bankCountry:
                                  type: string
                                  description: >-
                                    The supplier's bank country in ISO 3166
                                    alpha-2 format.
                                  maxLength: 2
                                  minLength: 2
                                  pattern: ^[A-Z]{2}$
                                type:
                                  type: string
                                  description: >-
                                    The type of supplier account. Required only
                                    when FasterPaymentsBankDetails are
                                    specified.
                                  enum:
                                    - PERSONAL
                                    - BUSINESS
                                bankAccountDetails:
                                  description: >-
                                    Details of the supplier bank account,
                                    depending on the type of transfer chosen.
                                  oneOf:
                                    - title: FasterPaymentsBankDetails
                                      required:
                                        - accountNumber
                                        - sortCode
                                      type: object
                                      description: >-
                                        Bank details used in case the wire
                                        transfer is executed over Faster
                                        Payments.
                                      properties:
                                        accountNumber:
                                          type: string
                                          minLength: 8
                                          maxLength: 8
                                          pattern: ^[0-9]{8}$
                                          description: >-
                                            Account number, required for wire
                                            transfer over Faster Payments.
                                        sortCode:
                                          type: string
                                          minLength: 6
                                          maxLength: 6
                                          pattern: ^[0-9]{6}$
                                          description: >-
                                            Sort code, required for wire transfer
                                            over Faster Payments.
                                        secondaryReference:
                                          type: string
                                          description: Secondary reference data if applicable.
                                    - title: SepaBankDetails
                                      required:
                                        - iban
                                      type: object
                                      description: >-
                                        Bank details used in case the wire
                                        transfer is executed over SEPA.
                                      properties:
                                        iban:
                                          type: string
                                          minLength: 15
                                          maxLength: 34
                                          pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                          description: >-
                                            International Bank Account Number,
                                            required for wire transfer over SEPA.
                                        bankIdentifierCode:
                                          type: string
                                          minLength: 8
                                          maxLength: 11
                                          pattern: >-
                                            ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                          description: BIC, for wire transfer over SEPA.
                            validationOutcomes:
                              type: array
                              items:
                                type: object
                                properties:
                                  category:
                                    type: string
                                    enum:
                                      - UK_CONFIRMATION_OF_PAYEE
                                  categoryResult:
                                    type: object
                                    properties:
                                      match:
                                        type: string
                                        description: >-
                                          The result of matching performed by the
                                          UK Confirmation of Payee responder
                                        enum:
                                          - EXACT_MATCH
                                          - CLOSE_MATCH
                                          - NO_MATCH
                                      reasonCode:
                                        type: string
                                        description: >
                                          The reason why the matching failed at
                                          the UK Confirmation of Payee responder:

                                            - ANNM: The CoP responder confirms that the account `name` provided does not match;
                                            - MBAM: The CoP responder indicates that the account `name` provided closely matches the actual account in its records, the actual account name is returned in the `accountName` field;
                                            - BANM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that the actual account matching the `name` provided is actually BUSINESS;
                                            - PANM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that the actual account matching the `name` provided is actually PERSONAL;
                                            - BAMM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that an account closely matching the `name` provided is BUSINESS;
                                            - PAMM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that an account closely matching the `name` provided is PERSONAL;
                                            - AC01: The account does not exist in the CoP responders books, the `accountNumber` specified is likely incorrect; 
                                            - IVCR: The CoP responder was unable to locate an account based on the `secondaryReference` field;
                                            - ACNS: The account is not supported for CoP by the CoP responder;
                                            - OPTO: The owner of the account has opted out of CoP service by the CoP responder;
                                            - CASS: The account has been switched using the Current Account Switch Service;
                                            - SCNS: The `sortCode` provided is not supported at endpoint;
                                        enum:
                                          - ANNM
                                          - MBAM
                                          - BANM
                                          - PANM
                                          - BAMM
                                          - PAMM
                                          - AC01
                                          - IVCR
                                          - ACNS
                                          - OPTO
                                          - CASS
                                          - SCNS
                                      accountName:
                                        type: string
                                        description: >-
                                          Returned when there is `match` is a
                                          `CLOSE_MATCH` and the `reasonCode` is
                                          MBAM, BAMM or PAMM
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    put:
      description: >-
        Update the details of a payment identified by the paymentId that is in
        the `PENDING_CONFIRMATION` state.



        Required user role: `CREATOR`
      operationId: putPaymentRunsId
      summary: Update a payment
      tags:
        - Payment runs
      parameters:
        - name: payment_run_id
          in: path
          required: true
          description: The unique identifier of the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
            readOnly: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - payments
              properties:
                payments:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - paymentId
                      - supplier
                    properties:
                      paymentId:
                        type: string
                        pattern: ^[0-9a-fA-F]{24}$
                      supplier:
                        required:
                          - bankAccountDetails
                          - name
                        type: object
                        description: >-
                          Represent the supplier bank account typically used in
                          Outgoing Wire Transfer transactions.
                        properties:
                          name:
                            type: string
                            minLength: 1
                            maxLength: 140
                            pattern: ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                            description: >
                              The supplier name. The allowed length and pattern
                              is dependent on the `bankAccountDetails` type:

                              * with `SepaBankDetails`: >= `1` character and <=
                              `150` characters

                              * with `FasterPaymentsBankDetails`: >= `1`
                              character and <= `140` characters with a pattern
                              of `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                              (please note that the `’` symbol is the unicode
                              value U+2019 (right single quotation mark) and not
                              the unicode value U+0027 (apostrophe))
                          address:
                            maxLength: 150
                            minLength: 1
                            type: string
                            description: The supplier's address.
                          bankName:
                            type: string
                            description: The supplier's bank name.
                          bankAddress:
                            maxLength: 150
                            minLength: 1
                            type: string
                            description: The supplier's bank address.
                          bankCountry:
                            type: string
                            description: >-
                              The supplier's bank country in ISO 3166 alpha-2
                              format.
                            maxLength: 2
                            minLength: 2
                            pattern: ^[A-Z]{2}$
                          type:
                            type: string
                            description: >-
                              The type of supplier account. Required only when
                              FasterPaymentsBankDetails are specified.
                            enum:
                              - PERSONAL
                              - BUSINESS
                          bankAccountDetails:
                            description: >-
                              Details of the supplier bank account, depending on
                              the type of transfer chosen.
                            oneOf:
                              - title: FasterPaymentsBankDetails
                                required:
                                  - accountNumber
                                  - sortCode
                                type: object
                                description: >-
                                  Bank details used in case the wire transfer is
                                  executed over Faster Payments.
                                properties:
                                  accountNumber:
                                    type: string
                                    minLength: 8
                                    maxLength: 8
                                    pattern: ^[0-9]{8}$
                                    description: >-
                                      Account number, required for wire transfer
                                      over Faster Payments.
                                  sortCode:
                                    type: string
                                    minLength: 6
                                    maxLength: 6
                                    pattern: ^[0-9]{6}$
                                    description: >-
                                      Sort code, required for wire transfer over
                                      Faster Payments.
                                  secondaryReference:
                                    type: string
                                    description: Secondary reference data if applicable.
                              - title: SepaBankDetails
                                required:
                                  - iban
                                type: object
                                description: >-
                                  Bank details used in case the wire transfer is
                                  executed over SEPA.
                                properties:
                                  iban:
                                    type: string
                                    minLength: 15
                                    maxLength: 34
                                    pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                    description: >-
                                      International Bank Account Number,
                                      required for wire transfer over SEPA.
                                  bankIdentifierCode:
                                    type: string
                                    minLength: 8
                                    maxLength: 11
                                    pattern: >-
                                      ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                    description: BIC, for wire transfer over SEPA.
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - PAYMENT_RUN_INVALID_STATE
                      - PAYMENT_RUN_DUPLICATE_PAYMENT_ID
                      - INVALID_SUPPLIER_BANK_ACCOUNT_DETAILS
                      - MISSING_SUPPLIER_TYPE
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/payment_runs/{payment_run_id}/confirm:
    post:
      description: |-
        Confirm that a payment run can be executed.


        Required user role: `CONTROLLER`
      operationId: postPaymentRunsIdConfirm
      summary: Confirm a payment run
      tags:
        - Payment runs
      parameters:
        - name: payment_run_id
          in: path
          required: true
          description: The unique identifier of the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
            readOnly: true
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - payments
                  - id
                  - status
                  - createdAt
                  - buyerId
                  - createdBy
                title: PaymentRun
                properties:
                  id:
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                    readOnly: true
                  paymentRunRef:
                    type: string
                    description: >-
                      A unique identifier by which you identify the payment run
                      with on your system.
                    example: 94fddfb2-297d-423d-9157-4200b7beb834
                  tag:
                    type: string
                    description: >-
                      The tag field is a custom field that can be used to search
                      and filter.
                    maxLength: 50
                    pattern: ^[a-zA-Z0-9_-]+$
                  description:
                    type: string
                    description: The long form description of the payment run
                    example: September payment run 01
                  createdBy:
                    type: string
                    pattern: ^[0-9]+$
                    example: '110747174434373672'
                    readOnly: true
                  status:
                    type: string
                    enum:
                      - PENDING_CHALLENGE
                    example: PENDING_CONFIRMATION
                    description: >
                      The current status of the payment run.


                      - `PENDING_CHALLENGE`: Waiting for the payment run to
                      complete the SCA challenge
                    readOnly: true
                  statusReason:
                    type: string
                  payments:
                    type: array
                    items:
                      type: object
                      title: Payment
                      required:
                        - id
                        - status
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              description: The unique identifier of the payment line
                              readOnly: true
                            status:
                              type: string
                              enum:
                                - QUEUED
                                - CANCELLED
                                - COMPLETED
                                - FAILED
                                - PENDING_CHALLENGE
                                - PENDING_CONFIRMATION
                                - PENDING_FUNDING
                                - RETURNED
                                - AWAITING_FUNDS
                                - EXECUTING
                                - SCA_FAILED
                              description: >
                                The status of the payment


                                - `QUEUED`: The payment run creation is an
                                asynchronous process. This status indicates that
                                the payment run is currently being validated

                                - `PENDING_CHALLENGE`: Waiting for the payment
                                run to complete the SCA challenge

                                - `PENDING_FUNDING`: Pending until the necessary
                                funds are initiated. Initiate the funding
                                process via the `/payment_runs/{id}/fund`
                                endpoint

                                - `AWAITING_FUNDS`: Waiting for the required
                                funds to be available to execute payment

                                - `EXECUTING`: Payment is being executed and
                                awaiting final status confirmation

                                - `COMPLETED`: Payment executed successfully

                                - `FAILED`: Payment executed, but failed

                                - `CANCELLED`: Payment cancelled, because
                                payment run was cancelled

                                - `PENDING_CONFIRMATION`: Payment run is pending
                                confirmation by a `CONTROLLER` user

                                - `RETURNED`: Payment sent, but was returned
                                back

                                - `SCA_FAILED`: Payment run failed due to SCA
                                either expiring or max attempts reached. You can
                                restart the payment run by calling the
                                /payment_runs/{id}/restart endpoint
                              readOnly: true
                        - type: object
                          title: Payment
                          required:
                            - amount
                            - currency
                            - reference
                            - payee
                            - paymentAmount
                            - supplier
                          properties:
                            externalRef:
                              type: string
                              example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                              description: >-
                                The unique identifier by which you identify the
                                associated payable on your system.
                            paymentRef:
                              type: string
                              example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                              description: >-
                                The unique identifier by which you identify this
                                payment on your system.
                            paymentAmount:
                              description: >-
                                The currency and amount to be paid to the
                                supplier.
                              allOf:
                                - description: >-
                                    The object representing a monetary amount in
                                    a particular currency
                                  required:
                                    - currency
                                    - amount
                                  type: object
                                  properties:
                                    currency:
                                      type: string
                                      description: The currency expressed in ISO-4217 code.
                                      maxLength: 3
                                      minLength: 3
                                      enum:
                                        - GBP
                                        - EUR
                                    amount:
                                      type: integer
                                      format: int64
                                      example: 454321
                                      description: >
                                        The monetary amount, scaled to the
                                        lowest denomination of the currency.


                                        Example, an amount of 1000 for a GBP
                                        currency is actually 1000 pennies or GBP
                                        10.00.
                                - type: object
                                  properties:
                                    amount:
                                      type: integer
                                      minimum: 1
                            reference:
                              type: string
                              maxLength: 18
                              minLength: 1
                              pattern: ^[0-9a-zA-Z.-]{1,18}$
                              description: >
                                The long form description of the payment. This
                                information is also shared with the supplier.
                                The allowed length is dependent on the payment
                                type:

                                `SEPA` and `SWIFT` <= 35 characters

                                `Faster Payments` <= 18 characters
                            supplier:
                              required:
                                - bankAccountDetails
                                - name
                              type: object
                              description: >-
                                Represent the supplier bank account typically
                                used in Outgoing Wire Transfer transactions.
                              properties:
                                name:
                                  type: string
                                  minLength: 1
                                  maxLength: 140
                                  pattern: ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                                  description: >
                                    The supplier name. The allowed length and
                                    pattern is dependent on the
                                    `bankAccountDetails` type:

                                    * with `SepaBankDetails`: >= `1` character
                                    and <= `150` characters

                                    * with `FasterPaymentsBankDetails`: >= `1`
                                    character and <= `140` characters with a
                                    pattern of
                                    `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                                    (please note that the `’` symbol is the
                                    unicode value U+2019 (right single quotation
                                    mark) and not the unicode value U+0027
                                    (apostrophe))
                                address:
                                  maxLength: 150
                                  minLength: 1
                                  type: string
                                  description: The supplier's address.
                                bankName:
                                  type: string
                                  description: The supplier's bank name.
                                bankAddress:
                                  maxLength: 150
                                  minLength: 1
                                  type: string
                                  description: The supplier's bank address.
                                bankCountry:
                                  type: string
                                  description: >-
                                    The supplier's bank country in ISO 3166
                                    alpha-2 format.
                                  maxLength: 2
                                  minLength: 2
                                  pattern: ^[A-Z]{2}$
                                type:
                                  type: string
                                  description: >-
                                    The type of supplier account. Required only
                                    when FasterPaymentsBankDetails are
                                    specified.
                                  enum:
                                    - PERSONAL
                                    - BUSINESS
                                bankAccountDetails:
                                  description: >-
                                    Details of the supplier bank account,
                                    depending on the type of transfer chosen.
                                  oneOf:
                                    - title: FasterPaymentsBankDetails
                                      required:
                                        - accountNumber
                                        - sortCode
                                      type: object
                                      description: >-
                                        Bank details used in case the wire
                                        transfer is executed over Faster
                                        Payments.
                                      properties:
                                        accountNumber:
                                          type: string
                                          minLength: 8
                                          maxLength: 8
                                          pattern: ^[0-9]{8}$
                                          description: >-
                                            Account number, required for wire
                                            transfer over Faster Payments.
                                        sortCode:
                                          type: string
                                          minLength: 6
                                          maxLength: 6
                                          pattern: ^[0-9]{6}$
                                          description: >-
                                            Sort code, required for wire transfer
                                            over Faster Payments.
                                        secondaryReference:
                                          type: string
                                          description: Secondary reference data if applicable.
                                    - title: SepaBankDetails
                                      required:
                                        - iban
                                      type: object
                                      description: >-
                                        Bank details used in case the wire
                                        transfer is executed over SEPA.
                                      properties:
                                        iban:
                                          type: string
                                          minLength: 15
                                          maxLength: 34
                                          pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                          description: >-
                                            International Bank Account Number,
                                            required for wire transfer over SEPA.
                                        bankIdentifierCode:
                                          type: string
                                          minLength: 8
                                          maxLength: 11
                                          pattern: >-
                                            ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                          description: BIC, for wire transfer over SEPA.
                            validationOutcomes:
                              type: array
                              items:
                                type: object
                                properties:
                                  category:
                                    type: string
                                    enum:
                                      - UK_CONFIRMATION_OF_PAYEE
                                  categoryResult:
                                    type: object
                                    properties:
                                      match:
                                        type: string
                                        description: >-
                                          The result of matching performed by the
                                          UK Confirmation of Payee responder
                                        enum:
                                          - EXACT_MATCH
                                          - CLOSE_MATCH
                                          - NO_MATCH
                                      reasonCode:
                                        type: string
                                        description: >
                                          The reason why the matching failed at
                                          the UK Confirmation of Payee responder:

                                            - ANNM: The CoP responder confirms that the account `name` provided does not match;
                                            - MBAM: The CoP responder indicates that the account `name` provided closely matches the actual account in its records, the actual account name is returned in the `accountName` field;
                                            - BANM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that the actual account matching the `name` provided is actually BUSINESS;
                                            - PANM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that the actual account matching the `name` provided is actually PERSONAL;
                                            - BAMM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that an account closely matching the `name` provided is BUSINESS;
                                            - PAMM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that an account closely matching the `name` provided is PERSONAL;
                                            - AC01: The account does not exist in the CoP responders books, the `accountNumber` specified is likely incorrect; 
                                            - IVCR: The CoP responder was unable to locate an account based on the `secondaryReference` field;
                                            - ACNS: The account is not supported for CoP by the CoP responder;
                                            - OPTO: The owner of the account has opted out of CoP service by the CoP responder;
                                            - CASS: The account has been switched using the Current Account Switch Service;
                                            - SCNS: The `sortCode` provided is not supported at endpoint;
                                        enum:
                                          - ANNM
                                          - MBAM
                                          - BANM
                                          - PANM
                                          - BAMM
                                          - PAMM
                                          - AC01
                                          - IVCR
                                          - ACNS
                                          - OPTO
                                          - CASS
                                          - SCNS
                                      accountName:
                                        type: string
                                        description: >-
                                          Returned when there is `match` is a
                                          `CLOSE_MATCH` and the `reasonCode` is
                                          MBAM, BAMM or PAMM
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                required:
                  - errorCode
                properties:
                  errorCode:
                    type: string
                    enum:
                      - PAYMENT_RUN_ALREADY_CONFIRMED
                      - BANK_ACCOUNT_CANNOT_BE_LINKED_ACCOUNT
                      - LINKED_ACCOUNT_INVALID_STATE
                      - ZERO_BALANCE_ACCOUNT_INVALID_STATE
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
                  message:
                    type: string
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/payment_runs/{payment_run_id}/fund:
    get:
      description: >-
        Start the the funding process of a payment run.


        Specify the funding source of the payment run by providing an id to an
        already linked account.


        Depending on the maximum payment amount constraints imposed by the bank
        that is providing the account, the payment run may be split in 2 or more
        groups. Note that you'll need to complete a funding process for each
        instruction returned.



        Required user role: `CONTROLLER`
      operationId: getPaymentRunsIdFund
      summary: Get a payment run funding instructions
      tags:
        - Payment runs
      parameters:
        - name: payment_run_id
          in: path
          required: true
          description: The unique identifier of the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
            readOnly: true
        - name: linkedAccountIds
          in: query
          required: true
          description: >
            The unique identifier of the linked account, that is to be used as
            the funding source for the payment run. 


            *Note that only one linked account per currency is supported.*
          schema:
            type: array
            uniqueItems: true
            items:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
              example: 652d25b73541d8084a88a38d
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                title: PaymentRunFundingInstructions
                allOf:
                  - type: object
                    title: PaginationFields
                    properties:
                      count:
                        type: integer
                        description: >-
                          The total number of records (excluding the paging
                          limit)
                        example: 10
                      responseCount:
                        type: integer
                        description: >-
                          The total number of records returned in this response
                          (always capped at 100).
                        example: 100
                    required:
                      - count
                      - responseCount
                  - type: object
                    properties:
                      fundingInstructions:
                        type: array
                        description: >-
                          One or more instructions required to fund the payment
                          run
                        items:
                          type: object
                          required:
                            - reference
                            - totalAmount
                            - status
                            - payments
                          properties:
                            reference:
                              type: string
                              description: >-
                                The reference to be used to initialise the PIS
                                UX Component
                            totalAmount:
                              description: >-
                                The total amount of the group of payments in the
                                currency of the group.
                              required:
                                - currency
                                - amount
                              type: object
                              properties:
                                currency:
                                  type: string
                                  description: The currency expressed in ISO-4217 code.
                                  maxLength: 3
                                  minLength: 3
                                  enum:
                                    - GBP
                                    - EUR
                                amount:
                                  type: integer
                                  format: int64
                                  example: 454321
                                  description: >
                                    The monetary amount, scaled to the lowest
                                    denomination of the currency.


                                    Example, an amount of 1000 for a GBP
                                    currency is actually 1000 pennies or GBP
                                    10.00.
                            status:
                              type: string
                              description: The status of the funding instruction
                              enum:
                                - PENDING_FUNDING
                                - AWAITING_FUNDS
                                - CANCELLED
                                - EXECUTING
                                - COMPLETED
                                - COMPLETED_WITH_ERRORS
                            fundingDate:
                              type: string
                              format: date-time
                              description: The date of when the group was funded
                            payments:
                              type: array
                              description: >-
                                The group of payments within the payment run
                                that are funded with this funding instruction
                              items:
                                type: object
                                title: Payment
                                required:
                                  - id
                                  - status
                                allOf:
                                  - type: object
                                    properties:
                                      id:
                                        type: string
                                        description: >-
                                          The unique identifier of the payment
                                          line
                                        readOnly: true
                                      status:
                                        type: string
                                        enum:
                                          - QUEUED
                                          - CANCELLED
                                          - COMPLETED
                                          - FAILED
                                          - PENDING_CHALLENGE
                                          - PENDING_CONFIRMATION
                                          - PENDING_FUNDING
                                          - RETURNED
                                          - AWAITING_FUNDS
                                          - EXECUTING
                                          - SCA_FAILED
                                        description: >
                                          The status of the payment


                                          - `QUEUED`: The payment run creation is
                                          an asynchronous process. This status
                                          indicates that the payment run is
                                          currently being validated

                                          - `PENDING_CHALLENGE`: Waiting for the
                                          payment run to complete the SCA
                                          challenge

                                          - `PENDING_FUNDING`: Pending until the
                                          necessary funds are initiated. Initiate
                                          the funding process via the
                                          `/payment_runs/{id}/fund` endpoint

                                          - `AWAITING_FUNDS`: Waiting for the
                                          required funds to be available to
                                          execute payment

                                          - `EXECUTING`: Payment is being executed
                                          and awaiting final status confirmation

                                          - `COMPLETED`: Payment executed
                                          successfully

                                          - `FAILED`: Payment executed, but failed

                                          - `CANCELLED`: Payment cancelled,
                                          because payment run was cancelled

                                          - `PENDING_CONFIRMATION`: Payment run is
                                          pending confirmation by a `CONTROLLER`
                                          user

                                          - `RETURNED`: Payment sent, but was
                                          returned back

                                          - `SCA_FAILED`: Payment run failed due
                                          to SCA either expiring or max attempts
                                          reached. You can restart the payment run
                                          by calling the
                                          /payment_runs/{id}/restart endpoint
                                        readOnly: true
                                  - type: object
                                    title: Payment
                                    required:
                                      - amount
                                      - currency
                                      - reference
                                      - payee
                                      - paymentAmount
                                      - supplier
                                    properties:
                                      externalRef:
                                        type: string
                                        example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                                        description: >-
                                          The unique identifier by which you
                                          identify the associated payable on your
                                          system.
                                      paymentRef:
                                        type: string
                                        example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                                        description: >-
                                          The unique identifier by which you
                                          identify this payment on your system.
                                      paymentAmount:
                                        description: >-
                                          The currency and amount to be paid to
                                          the supplier.
                                        allOf:
                                          - description: >-
                                              The object representing a monetary
                                              amount in a particular currency
                                            required:
                                              - currency
                                              - amount
                                            type: object
                                            properties:
                                              currency:
                                                type: string
                                                description: The currency expressed in ISO-4217 code.
                                                maxLength: 3
                                                minLength: 3
                                                enum:
                                                  - GBP
                                                  - EUR
                                              amount:
                                                type: integer
                                                format: int64
                                                example: 454321
                                                description: >
                                                  The monetary amount, scaled to the
                                                  lowest denomination of the currency.


                                                  Example, an amount of 1000 for a GBP
                                                  currency is actually 1000 pennies or GBP
                                                  10.00.
                                          - type: object
                                            properties:
                                              amount:
                                                type: integer
                                                minimum: 1
                                      reference:
                                        type: string
                                        maxLength: 18
                                        minLength: 1
                                        pattern: ^[0-9a-zA-Z.-]{1,18}$
                                        description: >
                                          The long form description of the
                                          payment. This information is also shared
                                          with the supplier. The allowed length is
                                          dependent on the payment type:

                                          `SEPA` and `SWIFT` <= 35 characters

                                          `Faster Payments` <= 18 characters
                                      supplier:
                                        required:
                                          - bankAccountDetails
                                          - name
                                        type: object
                                        description: >-
                                          Represent the supplier bank account
                                          typically used in Outgoing Wire Transfer
                                          transactions.
                                        properties:
                                          name:
                                            type: string
                                            minLength: 1
                                            maxLength: 140
                                            pattern: >-
                                              ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                                            description: >
                                              The supplier name. The allowed length
                                              and pattern is dependent on the
                                              `bankAccountDetails` type:

                                              * with `SepaBankDetails`: >= `1`
                                              character and <= `150` characters

                                              * with `FasterPaymentsBankDetails`: >=
                                              `1` character and <= `140` characters
                                              with a pattern of
                                              `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                                              (please note that the `’` symbol is the
                                              unicode value U+2019 (right single
                                              quotation mark) and not the unicode
                                              value U+0027 (apostrophe))
                                          address:
                                            maxLength: 150
                                            minLength: 1
                                            type: string
                                            description: The supplier's address.
                                          bankName:
                                            type: string
                                            description: The supplier's bank name.
                                          bankAddress:
                                            maxLength: 150
                                            minLength: 1
                                            type: string
                                            description: The supplier's bank address.
                                          bankCountry:
                                            type: string
                                            description: >-
                                              The supplier's bank country in ISO 3166
                                              alpha-2 format.
                                            maxLength: 2
                                            minLength: 2
                                            pattern: ^[A-Z]{2}$
                                          type:
                                            type: string
                                            description: >-
                                              The type of supplier account. Required
                                              only when FasterPaymentsBankDetails are
                                              specified.
                                            enum:
                                              - PERSONAL
                                              - BUSINESS
                                          bankAccountDetails:
                                            description: >-
                                              Details of the supplier bank account,
                                              depending on the type of transfer
                                              chosen.
                                            oneOf:
                                              - title: FasterPaymentsBankDetails
                                                required:
                                                  - accountNumber
                                                  - sortCode
                                                type: object
                                                description: >-
                                                  Bank details used in case the wire
                                                  transfer is executed over Faster
                                                  Payments.
                                                properties:
                                                  accountNumber:
                                                    type: string
                                                    minLength: 8
                                                    maxLength: 8
                                                    pattern: ^[0-9]{8}$
                                                    description: >-
                                                      Account number, required for wire
                                                      transfer over Faster Payments.
                                                  sortCode:
                                                    type: string
                                                    minLength: 6
                                                    maxLength: 6
                                                    pattern: ^[0-9]{6}$
                                                    description: >-
                                                      Sort code, required for wire transfer
                                                      over Faster Payments.
                                                  secondaryReference:
                                                    type: string
                                                    description: Secondary reference data if applicable.
                                              - title: SepaBankDetails
                                                required:
                                                  - iban
                                                type: object
                                                description: >-
                                                  Bank details used in case the wire
                                                  transfer is executed over SEPA.
                                                properties:
                                                  iban:
                                                    type: string
                                                    minLength: 15
                                                    maxLength: 34
                                                    pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                                    description: >-
                                                      International Bank Account Number,
                                                      required for wire transfer over SEPA.
                                                  bankIdentifierCode:
                                                    type: string
                                                    minLength: 8
                                                    maxLength: 11
                                                    pattern: >-
                                                      ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                                    description: BIC, for wire transfer over SEPA.
                                      validationOutcomes:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            category:
                                              type: string
                                              enum:
                                                - UK_CONFIRMATION_OF_PAYEE
                                            categoryResult:
                                              type: object
                                              properties:
                                                match:
                                                  type: string
                                                  description: >-
                                                    The result of matching performed by the
                                                    UK Confirmation of Payee responder
                                                  enum:
                                                    - EXACT_MATCH
                                                    - CLOSE_MATCH
                                                    - NO_MATCH
                                                reasonCode:
                                                  type: string
                                                  description: >
                                                    The reason why the matching failed at
                                                    the UK Confirmation of Payee responder:

                                                      - ANNM: The CoP responder confirms that the account `name` provided does not match;
                                                      - MBAM: The CoP responder indicates that the account `name` provided closely matches the actual account in its records, the actual account name is returned in the `accountName` field;
                                                      - BANM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that the actual account matching the `name` provided is actually BUSINESS;
                                                      - PANM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that the actual account matching the `name` provided is actually PERSONAL;
                                                      - BAMM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that an account closely matching the `name` provided is BUSINESS;
                                                      - PAMM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that an account closely matching the `name` provided is PERSONAL;
                                                      - AC01: The account does not exist in the CoP responders books, the `accountNumber` specified is likely incorrect; 
                                                      - IVCR: The CoP responder was unable to locate an account based on the `secondaryReference` field;
                                                      - ACNS: The account is not supported for CoP by the CoP responder;
                                                      - OPTO: The owner of the account has opted out of CoP service by the CoP responder;
                                                      - CASS: The account has been switched using the Current Account Switch Service;
                                                      - SCNS: The `sortCode` provided is not supported at endpoint;
                                                  enum:
                                                    - ANNM
                                                    - MBAM
                                                    - BANM
                                                    - PANM
                                                    - BAMM
                                                    - PAMM
                                                    - AC01
                                                    - IVCR
                                                    - ACNS
                                                    - OPTO
                                                    - CASS
                                                    - SCNS
                                                accountName:
                                                  type: string
                                                  description: >-
                                                    Returned when there is `match` is a
                                                    `CLOSE_MATCH` and the `reasonCode` is
                                                    MBAM, BAMM or PAMM
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - PAYMENT_RUN_NOT_FOUND
                      - TOO_MANY_LINKED_ACCOUNT_PER_CURRENCY
                      - LINKED_ACCOUNT_NOT_FOUND
                      - LINKED_ACCOUNT_INVALID_STATE
                      - BANK_ACCOUNT_CANNOT_BE_LINKED_ACCOUNT
                      - BANK_ACCOUNT_CANNOT_BE_ZERO_BALANCE_ACCOUNT
                      - FUNDING_REQUEST_IN_PROGRESS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/payment_runs/{payment_run_id}/cancel:
    post:
      description: >-
        Cancel a payment run. 


        Note that a payment run can be cancelled when it is in the states
        `QUEUED`, `PENDING_CONFIRMATION`, `PENDING_CHALLENGE`, OR
        `PENDING_FUNDING`



        Required user roles: `CONTROLLER` OR `CREATOR`
      operationId: postPaymentRunsIdCancel
      summary: Cancel a payment run
      tags:
        - Payment runs
      parameters:
        - name: payment_run_id
          in: path
          required: true
          description: The unique identifier of the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
            readOnly: true
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      security:
        - apiKey: []
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - CANNOT_CANCEL_PAYMENT_RUN
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/payment_runs/{payment_run_id}/cancel/payments:
    put:
      description: >-
        Cancel a payment within a payment run. 


        Note that a payment can be cancelled when it is in the state
        `PENDING_CONFIRMATION`.



        Required user roles: `CONTROLLER` OR `CREATOR`
      operationId: putCancelPaymentRunPayment
      summary: Cancel a payment
      tags:
        - Payment runs
      parameters:
        - name: payment_run_id
          in: path
          required: true
          description: The unique identifier of the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
            readOnly: true
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - paymentIds
              properties:
                paymentIds:
                  type: array
                  minItems: 1
                  uniqueItems: true
                  items:
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                    description: The ids of the payments to be cancelled.
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - CANNOT_CANCEL_PAYMENT_RUN_PAYMENT
                      - PAYMENT_RUN_PAYMENT_INVALID_STATE
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/payment_runs/{payment_run_id}/restart:
    post:
      description: |-
        Restart a payment run after it has entered status `SCA_FAILED`.


        Required user role: `CONTROLLER`
      operationId: postRestartPaymentRun
      summary: Restart a payment run
      tags:
        - Payment runs
      parameters:
        - name: payment_run_id
          in: path
          required: true
          description: The unique identifier of the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
            readOnly: true
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                required:
                  - errorCode
                properties:
                  errorCode:
                    type: string
                    enum:
                      - PAYMENT_RUN_INVALID_STATE
                  message:
                    type: string
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/payment_runs/{payment_run_id}/group/{group_reference}/cancel:
    post:
      description: >-
        Cancel a payment run group

        Note that a payment run group can only be cancelled when it is in the
        state `AWAITING_FUNDS`.



        Required user role: `CONTROLLER`
      operationId: postCancelPaymentRunGroup
      summary: Cancel a payment run group
      tags:
        - Payment runs
      parameters:
        - name: payment_run_id
          in: path
          required: true
          description: The unique identifier of the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
            readOnly: true
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
        - name: group_reference
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - PAYMENT_RUN_GROUP_INVALID_STATE
                      - REFERENCE_INVALID
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/buyers:
    post:
      description: >
        Buyers are identities representing a business. Once on-boarded, Buyers
        can create and manage their own instruments via your plugin. 


        The information provided must be accurate and will be passed on for KYB
        verification with our partner.
      summary: Create a buyer
      operationId: buyerCreate
      security:
        - apiKey: []
      tags:
        - Buyers
      parameters:
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - adminUser
                - company
                - acceptedTerms
                - ipAddress
                - supportedCurrencies
              properties:
                tag:
                  type: string
                  description: >-
                    The tag field is a custom field that can be used to search
                    and filter.
                  maxLength: 50
                  pattern: ^[a-zA-Z0-9_-]+$
                adminUser:
                  type: object
                  required:
                    - name
                    - surname
                    - email
                    - mobile
                    - companyPosition
                  description: >
                    The admin user needs to be a director or a legal
                    representative of the buyer that is being onboarded - this
                    user cannot be deactivated.


                    Admin users need to verify their email address and mobile
                    number, as well as complete KYC as part of the Buyer's due
                    diligence process.
                  properties:
                    name:
                      type: string
                      maxLength: 50
                      description: The first name of the admin user.
                    surname:
                      type: string
                      maxLength: 50
                      description: The last name of the admin user.
                    email:
                      type: string
                      description: E-mail Address of the user
                      format: email
                    mobile:
                      type: object
                      description: Mobile number of the user
                      required:
                        - number
                        - countryCode
                      properties:
                        countryCode:
                          maxLength: 6
                          minLength: 1
                          pattern: ^[\+][0-9]{1,5}$
                          type: string
                          description: >-
                            The country code of the Buyer's admin user mobile
                            number (e.g. +44).
                        number:
                          maxLength: 15
                          minLength: 1
                          pattern: ^[0-9]+$
                          type: string
                          description: >-
                            The mobile number of the Buyer's admin user -
                            excluding country code.
                    companyPosition:
                      type: string
                      description: The company position of the Buyer Admin User.
                      enum:
                        - DIRECTOR
                        - AUTHORISED_REPRESENTATIVE
                    dateOfBirth:
                      type: object
                      required:
                        - year
                        - month
                        - day
                      properties:
                        year:
                          type: integer
                          format: int32
                          maximum: 2100
                          minimum: 1900
                        month:
                          type: integer
                          format: int32
                          maximum: 12
                          minimum: 1
                        day:
                          type: integer
                          format: int32
                          maximum: 31
                          minimum: 1
                company:
                  required:
                    - name
                    - type
                    - countryOfRegistration
                  type: object
                  description: >-
                    The details associated with the company being on-boarded.
                    The details provided need to match exactly with the details
                    provided during KYB.
                  properties:
                    type:
                      type: string
                      description: >-
                        Supported company types - if company type is not listed,
                        please contact our support team to check if the company
                        type can be supported.
                      enum:
                        - LLC
                        - PUBLIC_LIMITED_COMPANY
                        - LIMITED_LIABILITY_PARTNERSHIP
                    name:
                      maxLength: 100
                      type: string
                      description: The registered name of the company.
                    registrationNumber:
                      maxLength: 20
                      minLength: 1
                      type: string
                      description: The company registration number.
                    businessAddress:
                      description: The address where the business is based.
                      type: object
                      required:
                        - addressLine1
                        - city
                        - postCode
                        - country
                      properties:
                        addressLine1:
                          minLength: 1
                          maxLength: 150
                          type: string
                          description: The first line of the address.
                        addressLine2:
                          maxLength: 150
                          type: string
                          description: The second line of the address.
                        city:
                          minLength: 1
                          maxLength: 50
                          type: string
                          description: The city of the address.
                        postCode:
                          minLength: 1
                          maxLength: 10
                          pattern: ^[A-Za-z0-9 -]*$
                          type: string
                          description: The post cost associated with the address.
                        state:
                          maxLength: 50
                          type: string
                          description: The state of the address.
                        country:
                          maxLength: 2
                          minLength: 2
                          pattern: ^[A-Z]+$
                          type: string
                          description: >-
                            The country of the address expressed in ISO 3166
                            alpha-2 format.
                    countryOfRegistration:
                      type: string
                      maxLength: 2
                      minLength: 2
                      pattern: ^[A-Z]+$
                      enum:
                        - GB
                        - AT
                        - BE
                        - BG
                        - HR
                        - CY
                        - CZ
                        - DK
                        - EE
                        - FI
                        - FR
                        - DE
                        - GI
                        - GR
                        - HU
                        - IS
                        - IE
                        - IT
                        - LV
                        - LI
                        - LT
                        - LU
                        - MT
                        - NL
                        - 'NO'
                        - PL
                        - PT
                        - RO
                        - SK
                        - SI
                        - ES
                        - SE
                      description: The country of company registration in ISO 3166 alpha-2.
                acceptedTerms:
                  type: boolean
                  description: >-
                    Must be set to *true* to indicate that the buyer admin user
                    has accepted the terms and conditions.
                ipAddress:
                  type: string
                  maxLength: 45
                  minLength: 5
                  description: The IP address of the buyer user doing the registration.
                supportedCurrencies:
                  type: array
                  minItems: 1
                  items:
                    type: string
                    description: The currency expressed in ISO-4217 code.
                    maxLength: 3
                    minLength: 3
                    enum:
                      - GBP
                      - EUR
      responses:
        '200':
          description: Success
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                allOf:
                  - required:
                      - id
                      - adminUser
                      - company
                      - acceptedTerms
                      - creationTimestamp
                      - supportedCurrencies
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^[0-9]+$
                        description: Id of the buyer.
                      tag:
                        type: string
                        description: >-
                          The tag field is a custom field that can be used to
                          search and filter.
                        maxLength: 50
                        pattern: ^[a-zA-Z0-9_-]+$
                      adminUser:
                        required:
                          - id
                          - email
                          - name
                          - surname
                          - mobile
                          - active
                          - emailVerified
                          - mobileNumberVerified
                          - companyPosition
                          - roles
                        type: object
                        properties:
                          id:
                            allOf:
                              - type: string
                                pattern: ^[0-9]+$
                                description: The identifier of the user.
                              - description: The Corporate Id
                          name:
                            maxLength: 100
                            type: string
                            description: First name of the admin user.
                          surname:
                            maxLength: 100
                            type: string
                            description: Last name of the admin user.
                          email:
                            type: string
                            description: E-mail Address of the user
                            format: email
                          mobile:
                            type: object
                            description: Mobile number of the user
                            required:
                              - number
                              - countryCode
                            properties:
                              countryCode:
                                maxLength: 6
                                minLength: 1
                                pattern: ^[\+][0-9]{1,5}$
                                type: string
                                description: >-
                                  The country code of the Buyer's admin user
                                  mobile number (e.g. +44).
                              number:
                                maxLength: 15
                                minLength: 1
                                pattern: ^[0-9]+$
                                type: string
                                description: >-
                                  The mobile number of the Buyer's admin user -
                                  excluding country code.
                          companyPosition:
                            type: string
                            description: The company position of the Buyer Admin User.
                            enum:
                              - DIRECTOR
                              - AUTHORISED_REPRESENTATIVE
                          dateOfBirth:
                            description: Date of birth of the authorised user.
                            type: object
                            required:
                              - year
                              - month
                              - day
                            properties:
                              year:
                                type: integer
                                format: int32
                                maximum: 2100
                                minimum: 1900
                              month:
                                type: integer
                                format: int32
                                maximum: 12
                                minimum: 1
                              day:
                                type: integer
                                format: int32
                                maximum: 31
                                minimum: 1
                          active:
                            type: boolean
                            description: >-
                              The state of the admin user. If false, then the
                              user will not be able to log in.
                            readOnly: true
                          emailVerified:
                            type: boolean
                            description: >-
                              Indicates if the admin user's email has been
                              verified.
                            readOnly: true
                          mobileNumberVerified:
                            type: boolean
                            description: >-
                              Indicates if the admin user's mobile number has
                              been verified.
                            readOnly: true
                          roles:
                            type: array
                            minItems: 1
                            description: >
                              Roles define the level of access assigned to the
                              user.


                              * `CREATOR`: Users assigned this role can create,
                              view and update payment runs.

                              * `CONTROLLER`: Users assigned this role can view
                              and link their company's bank accounts as well as
                              fund payment runs.

                              * `ADMIN`: Users assigned to this role can create
                              a business and ensure that systems and processes
                              are effectively managed.
                            items:
                              type: string
                              enum:
                                - ADMIN
                                - CREATOR
                                - CONTROLLER
                        description: The admin user of the Buyer Identity.
                      company:
                        allOf:
                          - required:
                              - name
                              - type
                              - countryOfRegistration
                            type: object
                            description: >-
                              The details associated with the company being
                              on-boarded. The details provided need to match
                              exactly with the details provided during KYB.
                            properties:
                              type:
                                type: string
                                description: >-
                                  Supported company types - if company type is
                                  not listed, please contact our support team to
                                  check if the company type can be supported.
                                enum:
                                  - LLC
                                  - PUBLIC_LIMITED_COMPANY
                                  - LIMITED_LIABILITY_PARTNERSHIP
                              name:
                                maxLength: 100
                                type: string
                                description: The registered name of the company.
                              registrationNumber:
                                maxLength: 20
                                minLength: 1
                                type: string
                                description: The company registration number.
                              businessAddress:
                                description: The address where the business is based.
                                type: object
                                required:
                                  - addressLine1
                                  - city
                                  - postCode
                                  - country
                                properties:
                                  addressLine1:
                                    minLength: 1
                                    maxLength: 150
                                    type: string
                                    description: The first line of the address.
                                  addressLine2:
                                    maxLength: 150
                                    type: string
                                    description: The second line of the address.
                                  city:
                                    minLength: 1
                                    maxLength: 50
                                    type: string
                                    description: The city of the address.
                                  postCode:
                                    minLength: 1
                                    maxLength: 10
                                    pattern: ^[A-Za-z0-9 -]*$
                                    type: string
                                    description: The post cost associated with the address.
                                  state:
                                    maxLength: 50
                                    type: string
                                    description: The state of the address.
                                  country:
                                    maxLength: 2
                                    minLength: 2
                                    pattern: ^[A-Z]+$
                                    type: string
                                    description: >-
                                      The country of the address expressed in
                                      ISO 3166 alpha-2 format.
                              countryOfRegistration:
                                type: string
                                maxLength: 2
                                minLength: 2
                                pattern: ^[A-Z]+$
                                enum:
                                  - GB
                                  - AT
                                  - BE
                                  - BG
                                  - HR
                                  - CY
                                  - CZ
                                  - DK
                                  - EE
                                  - FI
                                  - FR
                                  - DE
                                  - GI
                                  - GR
                                  - HU
                                  - IS
                                  - IE
                                  - IT
                                  - LV
                                  - LI
                                  - LT
                                  - LU
                                  - MT
                                  - NL
                                  - 'NO'
                                  - PL
                                  - PT
                                  - RO
                                  - SK
                                  - SI
                                  - ES
                                  - SE
                                description: >-
                                  The country of company registration in ISO
                                  3166 alpha-2.
                          - type: object
                            properties:
                              registeredAddress:
                                required:
                                  - addressLine1
                                  - city
                                  - country
                                type: object
                                description: >-
                                  The legal address of the company. This
                                  information is captured via the Due Diligence
                                  (KYB) process.
                                properties:
                                  addressLine1:
                                    type: string
                                  addressLine2:
                                    type: string
                                  city:
                                    type: string
                                  postCode:
                                    maxLength: 10
                                    pattern: ^[A-Za-z0-9 -]*$
                                    type: string
                                  state:
                                    maxLength: 50
                                    type: string
                                  country:
                                    maxLength: 2
                                    minLength: 2
                                    pattern: ^[A-Z]+$
                                    type: string
                                    description: >-
                                      Country of the identity in ISO 3166
                                      alpha-2 format.
                                readOnly: true
                              incorporatedOn:
                                description: The company's date of incorporation
                                type: object
                                required:
                                  - year
                                  - month
                                  - day
                                properties:
                                  year:
                                    type: integer
                                    format: int32
                                    maximum: 2100
                                    minimum: 1900
                                  month:
                                    type: integer
                                    format: int32
                                    maximum: 12
                                    minimum: 1
                                  day:
                                    type: integer
                                    format: int32
                                    maximum: 31
                                    minimum: 1
                                readOnly: true
                      acceptedTerms:
                        type: boolean
                        description: >-
                          Must be set to *true* to indicate that the admin user
                          has accepted the terms and conditions.
                      supportedCurrencies:
                        type: array
                        items:
                          type: object
                          required:
                            - currency
                            - status
                          properties:
                            currency:
                              type: string
                              description: The currency expressed in ISO-4217 code.
                              maxLength: 3
                              minLength: 3
                              enum:
                                - GBP
                                - EUR
                            status:
                              type: string
                              description: >
                                The status of the currency, which can include
                                the following values


                                * `PENDING_KYB_APPROVAL`: The buyer’s KYB
                                process is pending approval.
                              enum:
                                - PENDING_KYB_APPROVAL
                      creationTimestamp:
                        type: integer
                        format: int64
                        description: >-
                          The time when the Buyer was created, expressed in
                          Epoch timestamp using millisecond precision.
                        readOnly: true
                  - type: object
                    properties:
                      ipAddress:
                        maxLength: 45
                        minLength: 5
                        type: string
                        description: The IP address of the user doing the registration.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - ADMIN_EMAIL_NOT_UNIQUE
                      - CURRENCY_UNSUPPORTED
                      - COUNTRY_INVALID
                      - TERMS_NOT_ACCEPTED
                      - MOBILE_OR_COUNTRY_CODE_INVALID
                      - COUNTRY_UNSUPPORTED
                      - COMPANY_TYPE_UNSUPPORTED
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    get:
      description: |-
        Retrieve the details of the buyer that the logged-in user belongs to.


        Required user role: `ADMIN`
      summary: Get buyer details
      operationId: buyerGet
      tags:
        - Buyers
      responses:
        '200':
          description: Success
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                allOf:
                  - required:
                      - id
                      - adminUser
                      - company
                      - acceptedTerms
                      - creationTimestamp
                      - supportedCurrencies
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^[0-9]+$
                        description: Id of the buyer.
                      tag:
                        type: string
                        description: >-
                          The tag field is a custom field that can be used to
                          search and filter.
                        maxLength: 50
                        pattern: ^[a-zA-Z0-9_-]+$
                      adminUser:
                        required:
                          - id
                          - email
                          - name
                          - surname
                          - mobile
                          - active
                          - emailVerified
                          - mobileNumberVerified
                          - companyPosition
                          - roles
                        type: object
                        properties:
                          id:
                            allOf:
                              - type: string
                                pattern: ^[0-9]+$
                                description: The identifier of the user.
                              - description: The Corporate Id
                          name:
                            maxLength: 100
                            type: string
                            description: First name of the admin user.
                          surname:
                            maxLength: 100
                            type: string
                            description: Last name of the admin user.
                          email:
                            type: string
                            description: E-mail Address of the user
                            format: email
                          mobile:
                            type: object
                            description: Mobile number of the user
                            required:
                              - number
                              - countryCode
                            properties:
                              countryCode:
                                maxLength: 6
                                minLength: 1
                                pattern: ^[\+][0-9]{1,5}$
                                type: string
                                description: >-
                                  The country code of the Buyer's admin user
                                  mobile number (e.g. +44).
                              number:
                                maxLength: 15
                                minLength: 1
                                pattern: ^[0-9]+$
                                type: string
                                description: >-
                                  The mobile number of the Buyer's admin user -
                                  excluding country code.
                          companyPosition:
                            type: string
                            description: The company position of the Buyer Admin User.
                            enum:
                              - DIRECTOR
                              - AUTHORISED_REPRESENTATIVE
                          dateOfBirth:
                            description: Date of birth of the authorised user.
                            type: object
                            required:
                              - year
                              - month
                              - day
                            properties:
                              year:
                                type: integer
                                format: int32
                                maximum: 2100
                                minimum: 1900
                              month:
                                type: integer
                                format: int32
                                maximum: 12
                                minimum: 1
                              day:
                                type: integer
                                format: int32
                                maximum: 31
                                minimum: 1
                          active:
                            type: boolean
                            description: >-
                              The state of the admin user. If false, then the
                              user will not be able to log in.
                            readOnly: true
                          emailVerified:
                            type: boolean
                            description: >-
                              Indicates if the admin user's email has been
                              verified.
                            readOnly: true
                          mobileNumberVerified:
                            type: boolean
                            description: >-
                              Indicates if the admin user's mobile number has
                              been verified.
                            readOnly: true
                          roles:
                            type: array
                            minItems: 1
                            description: >
                              Roles define the level of access assigned to the
                              user.


                              * `CREATOR`: Users assigned this role can create,
                              view and update payment runs.

                              * `CONTROLLER`: Users assigned this role can view
                              and link their company's bank accounts as well as
                              fund payment runs.

                              * `ADMIN`: Users assigned to this role can create
                              a business and ensure that systems and processes
                              are effectively managed.
                            items:
                              type: string
                              enum:
                                - ADMIN
                                - CREATOR
                                - CONTROLLER
                        description: The admin user of the Buyer Identity.
                      company:
                        allOf:
                          - required:
                              - name
                              - type
                              - countryOfRegistration
                            type: object
                            description: >-
                              The details associated with the company being
                              on-boarded. The details provided need to match
                              exactly with the details provided during KYB.
                            properties:
                              type:
                                type: string
                                description: >-
                                  Supported company types - if company type is
                                  not listed, please contact our support team to
                                  check if the company type can be supported.
                                enum:
                                  - LLC
                                  - PUBLIC_LIMITED_COMPANY
                                  - LIMITED_LIABILITY_PARTNERSHIP
                              name:
                                maxLength: 100
                                type: string
                                description: The registered name of the company.
                              registrationNumber:
                                maxLength: 20
                                minLength: 1
                                type: string
                                description: The company registration number.
                              businessAddress:
                                description: The address where the business is based.
                                type: object
                                required:
                                  - addressLine1
                                  - city
                                  - postCode
                                  - country
                                properties:
                                  addressLine1:
                                    minLength: 1
                                    maxLength: 150
                                    type: string
                                    description: The first line of the address.
                                  addressLine2:
                                    maxLength: 150
                                    type: string
                                    description: The second line of the address.
                                  city:
                                    minLength: 1
                                    maxLength: 50
                                    type: string
                                    description: The city of the address.
                                  postCode:
                                    minLength: 1
                                    maxLength: 10
                                    pattern: ^[A-Za-z0-9 -]*$
                                    type: string
                                    description: The post cost associated with the address.
                                  state:
                                    maxLength: 50
                                    type: string
                                    description: The state of the address.
                                  country:
                                    maxLength: 2
                                    minLength: 2
                                    pattern: ^[A-Z]+$
                                    type: string
                                    description: >-
                                      The country of the address expressed in
                                      ISO 3166 alpha-2 format.
                              countryOfRegistration:
                                type: string
                                maxLength: 2
                                minLength: 2
                                pattern: ^[A-Z]+$
                                enum:
                                  - GB
                                  - AT
                                  - BE
                                  - BG
                                  - HR
                                  - CY
                                  - CZ
                                  - DK
                                  - EE
                                  - FI
                                  - FR
                                  - DE
                                  - GI
                                  - GR
                                  - HU
                                  - IS
                                  - IE
                                  - IT
                                  - LV
                                  - LI
                                  - LT
                                  - LU
                                  - MT
                                  - NL
                                  - 'NO'
                                  - PL
                                  - PT
                                  - RO
                                  - SK
                                  - SI
                                  - ES
                                  - SE
                                description: >-
                                  The country of company registration in ISO
                                  3166 alpha-2.
                          - type: object
                            properties:
                              registeredAddress:
                                required:
                                  - addressLine1
                                  - city
                                  - country
                                type: object
                                description: >-
                                  The legal address of the company. This
                                  information is captured via the Due Diligence
                                  (KYB) process.
                                properties:
                                  addressLine1:
                                    type: string
                                  addressLine2:
                                    type: string
                                  city:
                                    type: string
                                  postCode:
                                    maxLength: 10
                                    pattern: ^[A-Za-z0-9 -]*$
                                    type: string
                                  state:
                                    maxLength: 50
                                    type: string
                                  country:
                                    maxLength: 2
                                    minLength: 2
                                    pattern: ^[A-Z]+$
                                    type: string
                                    description: >-
                                      Country of the identity in ISO 3166
                                      alpha-2 format.
                                readOnly: true
                              incorporatedOn:
                                description: The company's date of incorporation
                                type: object
                                required:
                                  - year
                                  - month
                                  - day
                                properties:
                                  year:
                                    type: integer
                                    format: int32
                                    maximum: 2100
                                    minimum: 1900
                                  month:
                                    type: integer
                                    format: int32
                                    maximum: 12
                                    minimum: 1
                                  day:
                                    type: integer
                                    format: int32
                                    maximum: 31
                                    minimum: 1
                                readOnly: true
                      acceptedTerms:
                        type: boolean
                        description: >-
                          Must be set to *true* to indicate that the admin user
                          has accepted the terms and conditions.
                      supportedCurrencies:
                        type: array
                        items:
                          type: object
                          required:
                            - currency
                            - status
                          properties:
                            currency:
                              type: string
                              description: The currency expressed in ISO-4217 code.
                              maxLength: 3
                              minLength: 3
                              enum:
                                - GBP
                                - EUR
                            status:
                              type: string
                              description: >
                                The status of the currency, which can include
                                the following values


                                * `PENDING_KYB_APPROVAL`: The buyer’s KYB
                                process is pending approval.

                                * `STEPUP_LOGIN_REQUIRED`: The buyer needs to
                                perform a stepped-up login for higher
                                authentication.

                                * `PENDING_CREATION`: Awaiting the setup
                                completion of the currency

                                * `ACTIVE`: The ZBA has been successfully
                                created and is ready for use.

                                * `UNAVAILABLE`: The currency is unavailable and
                                cannot be used.
                              enum:
                                - PENDING_KYB_APPROVAL
                                - STEPUP_LOGIN_REQUIRED
                                - PENDING_CREATION
                                - ACTIVE
                                - UNAVAILABLE
                      creationTimestamp:
                        type: integer
                        format: int64
                        description: >-
                          The time when the Buyer was created, expressed in
                          Epoch timestamp using millisecond precision.
                        readOnly: true
                  - type: object
                    properties:
                      ipAddress:
                        maxLength: 45
                        minLength: 5
                        type: string
                        description: The IP address of the user doing the registration.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    patch:
      description: |-
        Update the buyer currencies and admin roles.


        Required user role: `ADMIN`
      summary: Update a buyer
      operationId: buyerUpdate
      tags:
        - Buyers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                adminUser:
                  type: object
                  properties:
                    roles:
                      type: array
                      minItems: 1
                      description: >
                        Roles define the level of access assigned to the user.


                        * `CREATOR`: Users assigned this role can create, view
                        and update payment runs.

                        * `CONTROLLER`: Users assigned this role can view and
                        link their company's bank accounts as well as fund
                        payment runs.

                        * `ADMIN`: Users assigned to this role can create a
                        business and ensure that systems and processes are
                        effectively managed.
                      items:
                        type: string
                        enum:
                          - ADMIN
                          - CREATOR
                          - CONTROLLER
                supportedCurrencies:
                  type: array
                  items:
                    type: string
                    description: The currency expressed in ISO-4217 code.
                    maxLength: 3
                    minLength: 3
                    enum:
                      - GBP
                      - EUR
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                required:
                  - id
                  - adminUser
                  - company
                  - acceptedTerms
                  - creationTimestamp
                  - supportedCurrencies
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^[0-9]+$
                    description: Id of the buyer.
                  tag:
                    type: string
                    description: >-
                      The tag field is a custom field that can be used to search
                      and filter.
                    maxLength: 50
                    pattern: ^[a-zA-Z0-9_-]+$
                  adminUser:
                    required:
                      - id
                      - email
                      - name
                      - surname
                      - mobile
                      - active
                      - emailVerified
                      - mobileNumberVerified
                      - companyPosition
                      - roles
                    type: object
                    properties:
                      id:
                        allOf:
                          - type: string
                            pattern: ^[0-9]+$
                            description: The identifier of the user.
                          - description: The Corporate Id
                      name:
                        maxLength: 100
                        type: string
                        description: First name of the admin user.
                      surname:
                        maxLength: 100
                        type: string
                        description: Last name of the admin user.
                      email:
                        type: string
                        description: E-mail Address of the user
                        format: email
                      mobile:
                        type: object
                        description: Mobile number of the user
                        required:
                          - number
                          - countryCode
                        properties:
                          countryCode:
                            maxLength: 6
                            minLength: 1
                            pattern: ^[\+][0-9]{1,5}$
                            type: string
                            description: >-
                              The country code of the Buyer's admin user mobile
                              number (e.g. +44).
                          number:
                            maxLength: 15
                            minLength: 1
                            pattern: ^[0-9]+$
                            type: string
                            description: >-
                              The mobile number of the Buyer's admin user -
                              excluding country code.
                      companyPosition:
                        type: string
                        description: The company position of the Buyer Admin User.
                        enum:
                          - DIRECTOR
                          - AUTHORISED_REPRESENTATIVE
                      dateOfBirth:
                        description: Date of birth of the authorised user.
                        type: object
                        required:
                          - year
                          - month
                          - day
                        properties:
                          year:
                            type: integer
                            format: int32
                            maximum: 2100
                            minimum: 1900
                          month:
                            type: integer
                            format: int32
                            maximum: 12
                            minimum: 1
                          day:
                            type: integer
                            format: int32
                            maximum: 31
                            minimum: 1
                      active:
                        type: boolean
                        description: >-
                          The state of the admin user. If false, then the user
                          will not be able to log in.
                        readOnly: true
                      emailVerified:
                        type: boolean
                        description: Indicates if the admin user's email has been verified.
                        readOnly: true
                      mobileNumberVerified:
                        type: boolean
                        description: >-
                          Indicates if the admin user's mobile number has been
                          verified.
                        readOnly: true
                      roles:
                        type: array
                        minItems: 1
                        description: >
                          Roles define the level of access assigned to the user.


                          * `CREATOR`: Users assigned this role can create, view
                          and update payment runs.

                          * `CONTROLLER`: Users assigned this role can view and
                          link their company's bank accounts as well as fund
                          payment runs.

                          * `ADMIN`: Users assigned to this role can create a
                          business and ensure that systems and processes are
                          effectively managed.
                        items:
                          type: string
                          enum:
                            - ADMIN
                            - CREATOR
                            - CONTROLLER
                    description: The admin user of the Buyer Identity.
                  company:
                    allOf:
                      - required:
                          - name
                          - type
                          - countryOfRegistration
                        type: object
                        description: >-
                          The details associated with the company being
                          on-boarded. The details provided need to match exactly
                          with the details provided during KYB.
                        properties:
                          type:
                            type: string
                            description: >-
                              Supported company types - if company type is not
                              listed, please contact our support team to check
                              if the company type can be supported.
                            enum:
                              - LLC
                              - PUBLIC_LIMITED_COMPANY
                              - LIMITED_LIABILITY_PARTNERSHIP
                          name:
                            maxLength: 100
                            type: string
                            description: The registered name of the company.
                          registrationNumber:
                            maxLength: 20
                            minLength: 1
                            type: string
                            description: The company registration number.
                          businessAddress:
                            description: The address where the business is based.
                            type: object
                            required:
                              - addressLine1
                              - city
                              - postCode
                              - country
                            properties:
                              addressLine1:
                                minLength: 1
                                maxLength: 150
                                type: string
                                description: The first line of the address.
                              addressLine2:
                                maxLength: 150
                                type: string
                                description: The second line of the address.
                              city:
                                minLength: 1
                                maxLength: 50
                                type: string
                                description: The city of the address.
                              postCode:
                                minLength: 1
                                maxLength: 10
                                pattern: ^[A-Za-z0-9 -]*$
                                type: string
                                description: The post cost associated with the address.
                              state:
                                maxLength: 50
                                type: string
                                description: The state of the address.
                              country:
                                maxLength: 2
                                minLength: 2
                                pattern: ^[A-Z]+$
                                type: string
                                description: >-
                                  The country of the address expressed in ISO
                                  3166 alpha-2 format.
                          countryOfRegistration:
                            type: string
                            maxLength: 2
                            minLength: 2
                            pattern: ^[A-Z]+$
                            enum:
                              - GB
                              - AT
                              - BE
                              - BG
                              - HR
                              - CY
                              - CZ
                              - DK
                              - EE
                              - FI
                              - FR
                              - DE
                              - GI
                              - GR
                              - HU
                              - IS
                              - IE
                              - IT
                              - LV
                              - LI
                              - LT
                              - LU
                              - MT
                              - NL
                              - 'NO'
                              - PL
                              - PT
                              - RO
                              - SK
                              - SI
                              - ES
                              - SE
                            description: >-
                              The country of company registration in ISO 3166
                              alpha-2.
                      - type: object
                        properties:
                          registeredAddress:
                            required:
                              - addressLine1
                              - city
                              - country
                            type: object
                            description: >-
                              The legal address of the company. This information
                              is captured via the Due Diligence (KYB) process.
                            properties:
                              addressLine1:
                                type: string
                              addressLine2:
                                type: string
                              city:
                                type: string
                              postCode:
                                maxLength: 10
                                pattern: ^[A-Za-z0-9 -]*$
                                type: string
                              state:
                                maxLength: 50
                                type: string
                              country:
                                maxLength: 2
                                minLength: 2
                                pattern: ^[A-Z]+$
                                type: string
                                description: >-
                                  Country of the identity in ISO 3166 alpha-2
                                  format.
                            readOnly: true
                          incorporatedOn:
                            description: The company's date of incorporation
                            type: object
                            required:
                              - year
                              - month
                              - day
                            properties:
                              year:
                                type: integer
                                format: int32
                                maximum: 2100
                                minimum: 1900
                              month:
                                type: integer
                                format: int32
                                maximum: 12
                                minimum: 1
                              day:
                                type: integer
                                format: int32
                                maximum: 31
                                minimum: 1
                            readOnly: true
                  acceptedTerms:
                    type: boolean
                    description: >-
                      Must be set to *true* to indicate that the admin user has
                      accepted the terms and conditions.
                  supportedCurrencies:
                    type: array
                    items:
                      type: object
                      required:
                        - currency
                        - status
                      properties:
                        currency:
                          type: string
                          description: The currency expressed in ISO-4217 code.
                          maxLength: 3
                          minLength: 3
                          enum:
                            - GBP
                            - EUR
                        status:
                          type: string
                          description: >
                            The status of the currency, which can include the
                            following values


                            * `PENDING_KYB_APPROVAL`: The buyer’s KYB process is
                            pending approval.

                            * `STEPUP_LOGIN_REQUIRED`: The buyer needs to
                            perform a stepped-up login for higher
                            authentication.

                            * `PENDING_CREATION`: Awaiting the setup completion
                            of the currency

                            * `ACTIVE`: The ZBA has been successfully created
                            and is ready for use.

                            * `UNAVAILABLE`: The currency is unavailable and
                            cannot be used.
                          enum:
                            - PENDING_KYB_APPROVAL
                            - STEPUP_LOGIN_REQUIRED
                            - PENDING_CREATION
                            - ACTIVE
                            - UNAVAILABLE
                  creationTimestamp:
                    type: integer
                    format: int64
                    description: >-
                      The time when the Buyer was created, expressed in Epoch
                      timestamp using millisecond precision.
                    readOnly: true
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - STEP_UP_REQUIRED
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - CURRENCY_UNSUPPORTED
                      - INSUFFICIENT_PERMISSIONS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/authentication_factors/otp/{channel}:
    post:
      operationId: enrolDeviceUsingOtpStepOne
      description: >
        This is the first step in enrolling the logged-in user's mobile device,
        where a one-time password is sent to the device.


        _Note that on the Sandbox Environment, text messages are not sent and
        the one-time-password is always \"123456\"._
      summary: Enrol a user device for authentication using one-time passwords
      tags:
        - Additional Factors
      parameters:
        - name: channel
          in: path
          required: true
          description: The unique identifier for the channel.
          schema:
            type: string
            enum:
              - SMS
            description: '- "SMS": The one-time-password is sent as a text message'
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - CHANNEL_NOT_SUPPORTED
                      - CHANNEL_ALREADY_REGISTERED
                      - MOBILE_NUMBER_NOT_AVAILABLE
                      - MOBILE_NUMBER_INVALID
                      - MOBILE_COUNTRY_NOT_SUPPORTED
                      - CREDENTIALS_INACTIVE
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/authentication_factors/otp/{channel}/verify:
    post:
      operationId: enrolDeviceUsingOtpStepTwo
      description: >
        The second step in enrolling the logged-in user (root or authorised
        user) to use one-time-passwords to enable verification of transactions.


        _Note that on the Sandbox Environment, text messages are not sent and
        the `verificationCode` is always set to \"123456\"._
      summary: >-
        Verify enrolment of a user device for authentication using one-time
        passwords
      tags:
        - Additional Factors
      parameters:
        - name: channel
          in: path
          required: true
          description: The unique identifier for the channel.
          schema:
            type: string
            enum:
              - SMS
            description: '- "SMS": The one-time-password is sent as a text message'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - verificationCode
              properties:
                verificationCode:
                  type: string
                  description: The code received by the user on the device.
                  minLength: 6
                  maxLength: 6
                  pattern: ^[0-9]*$
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - CHANNEL_NOT_SUPPORTED
                      - CHANNEL_ALREADY_REGISTERED
                      - VERIFICATION_CODE_EXPIRED
                      - VERIFICATION_CODE_INVALID
                      - CREDENTIALS_INACTIVE
                      - ONE_CHALLENGE_LIMIT_REMAINING
                      - CHALLENGE_LIMIT_EXCEEDED
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/buyers/verification/email/send:
    post:
      operationId: buyerAdminUserEmailVerificationCodeSend
      description: >
        The first step in verifying a admin user's email. The admin user whose
        email address is to be verified is sent an email containing a randomly
        generated code.


        This code must then be provided in the _buyerAdminUserEmailVerify_
        operation to verify the admin user's email address.


        _Note that on the Sandbox Environment, the `verificationCode` is always
        set to \"123456\"._
      summary: Start admin user email verification
      security:
        - apiKey: []
      tags:
        - Buyers
      parameters:
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  description: E-mail Address of the user
                  format: email
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - EMAIL_NOT_FOUND
                      - ALREADY_VERIFIED
                      - EMAIL_NOT_UNIQUE
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/buyers/verification/email/verify:
    post:
      operationId: buyerAdminUserEmailVerify
      description: >
        The second step in verifying the admin user's email. The randomly
        generated code sent to the admin user via

        email, using the _buyerAdminUserEmailVerificationCodeSend_ operation, is
        submitted here to verify the admin user's email.


        This is needed as part of the verification process for basic due
        diligence.


        _Note that on the Sandbox Environment, the `verificationCode` is always
        set to \"123456\"._
      summary: Verify admin user email
      security:
        - apiKey: []
      tags:
        - Buyers
      parameters:
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - verificationCode
              properties:
                email:
                  type: string
                  description: E-mail Address of the user
                  format: email
                verificationCode:
                  type: string
                  description: >-
                    A randomly generated one-time use code used to verify the
                    user's email address or mobile number.
                  minLength: 6
                  maxLength: 6
                  pattern: ^[0-9]+$
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - VERIFICATION_CODE_INVALID
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/buyers/kyb:
    post:
      operationId: buyerKybStart
      description: >-
        Buyers need to complete due diligence (KYB) before they can create
        payment runs and pay their suppliers.


        This operation initiates the due diligence process for the buyer that
        the logged-in user belongs to.


        Due Diligence is handled by a KYB provider - you will need to embed the
        KYB UI Component in your application so that the buyer will be able to
        perform the KYB process.


        To initialise the KYB UI Component, you need a `reference` that is given
        you in the response of this operation.



        Required user role: `ADMIN`
      summary: Start buyer KYB
      tags:
        - Buyers
      parameters:
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                required:
                  - reference
                type: object
                properties:
                  reference:
                    type: string
                    pattern: ^[0-9]+$
                    description: The reference required to initialise the KYB UI Component.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - KYB_ALREADY_APPROVED
                      - KYB_PERMANENTLY_REJECTED
                      - KYB_PENDING_REVIEW
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    get:
      operationId: buyerKybGet
      description: |-
        Returns the KYB status for the buyer that the logged-in user belongs to.


        Required user role: `ADMIN`
      summary: Get buyer KYB status
      tags:
        - Buyers
      responses:
        '200':
          description: Success
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  kybStatus:
                    type: string
                    enum:
                      - NOT_STARTED
                      - INITIATED
                      - PENDING_REVIEW
                      - APPROVED
                      - REJECTED
                    description: >-
                      The effective due diligence status of the buyer that the
                      logged-in user belongs to.
                  ongoingKybStatus:
                    type: string
                    enum:
                      - NOT_STARTED
                      - INITIATED
                      - PENDING_REVIEW
                      - APPROVED
                      - REJECTED
                    description: >-
                      The ongoing due diligence status of the buyer that the
                      logged-in user belongs to.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    patch:
      description: >-
        Update the details of the buyer that the logged-in user belongs to.


        The following Buyer details are verified during due diligence (KYB) and
        cannot be updated via the API once the Buyer has been verified:

        - Admin User Name

        - Admin User Surname

        - Admin User Email

        - Admin User Mobile Country Code

        - Admin User Mobile Number

        - Admin Date of Birth

        - Company Business Address


        *If these details need to be changed after due diligence is completed,
        please contact Customer Support to restart the Due Diligence process.*



        Required user role: `ADMIN`
      summary: Update Buyer's KYB details
      operationId: buyerUpdateKyb
      tags:
        - Buyers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tag:
                  type: string
                  description: >-
                    The tag field is a custom field that can be used to search
                    and filter.
                  maxLength: 50
                  pattern: ^[a-zA-Z0-9_-]+$
                company:
                  type: object
                  description: >-
                    The details associated with the company. The details
                    provided need to match exactly with the details provided
                    during KYB.
                  properties:
                    businessAddress:
                      description: The address where the business is based.
                      type: object
                      required:
                        - addressLine1
                        - city
                        - postCode
                        - country
                      properties:
                        addressLine1:
                          minLength: 1
                          maxLength: 150
                          type: string
                          description: The first line of the address.
                        addressLine2:
                          maxLength: 150
                          type: string
                          description: The second line of the address.
                        city:
                          minLength: 1
                          maxLength: 50
                          type: string
                          description: The city of the address.
                        postCode:
                          minLength: 1
                          maxLength: 10
                          pattern: ^[A-Za-z0-9 -]*$
                          type: string
                          description: The post cost associated with the address.
                        state:
                          maxLength: 50
                          type: string
                          description: The state of the address.
                        country:
                          maxLength: 2
                          minLength: 2
                          pattern: ^[A-Z]+$
                          type: string
                          description: >-
                            The country of the address expressed in ISO 3166
                            alpha-2 format.
                adminUser:
                  type: object
                  description: >-
                    The legal representative of the buyer. Admin users can
                    invite and manage the buyer's authorised users.
                  properties:
                    name:
                      maxLength: 100
                      type: string
                      description: First name of the admin user.
                    surname:
                      maxLength: 100
                      type: string
                      description: Last name of the admin user.
                    email:
                      type: string
                      description: E-mail Address of the user
                      format: email
                    mobile:
                      type: object
                      description: Mobile number of the user
                      required:
                        - number
                        - countryCode
                      properties:
                        countryCode:
                          maxLength: 6
                          minLength: 1
                          pattern: ^[\+][0-9]{1,5}$
                          type: string
                          description: >-
                            The country code of the Buyer's admin user mobile
                            number (e.g. +44).
                        number:
                          maxLength: 15
                          minLength: 1
                          pattern: ^[0-9]+$
                          type: string
                          description: >-
                            The mobile number of the Buyer's admin user -
                            excluding country code.
                    dateOfBirth:
                      allOf:
                        - type: object
                          required:
                            - year
                            - month
                            - day
                          properties:
                            year:
                              type: integer
                              format: int32
                              maximum: 2100
                              minimum: 1900
                            month:
                              type: integer
                              format: int32
                              maximum: 12
                              minimum: 1
                            day:
                              type: integer
                              format: int32
                              maximum: 31
                              minimum: 1
                        - description: Date of birth of the authorised user.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                required:
                  - id
                  - adminUser
                  - company
                  - acceptedTerms
                  - creationTimestamp
                  - supportedCurrencies
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^[0-9]+$
                    description: Id of the buyer.
                  tag:
                    type: string
                    description: >-
                      The tag field is a custom field that can be used to search
                      and filter.
                    maxLength: 50
                    pattern: ^[a-zA-Z0-9_-]+$
                  adminUser:
                    required:
                      - id
                      - email
                      - name
                      - surname
                      - mobile
                      - active
                      - emailVerified
                      - mobileNumberVerified
                      - companyPosition
                      - roles
                    type: object
                    properties:
                      id:
                        allOf:
                          - type: string
                            pattern: ^[0-9]+$
                            description: The identifier of the user.
                          - description: The Corporate Id
                      name:
                        maxLength: 100
                        type: string
                        description: First name of the admin user.
                      surname:
                        maxLength: 100
                        type: string
                        description: Last name of the admin user.
                      email:
                        type: string
                        description: E-mail Address of the user
                        format: email
                      mobile:
                        type: object
                        description: Mobile number of the user
                        required:
                          - number
                          - countryCode
                        properties:
                          countryCode:
                            maxLength: 6
                            minLength: 1
                            pattern: ^[\+][0-9]{1,5}$
                            type: string
                            description: >-
                              The country code of the Buyer's admin user mobile
                              number (e.g. +44).
                          number:
                            maxLength: 15
                            minLength: 1
                            pattern: ^[0-9]+$
                            type: string
                            description: >-
                              The mobile number of the Buyer's admin user -
                              excluding country code.
                      companyPosition:
                        type: string
                        description: The company position of the Buyer Admin User.
                        enum:
                          - DIRECTOR
                          - AUTHORISED_REPRESENTATIVE
                      dateOfBirth:
                        description: Date of birth of the authorised user.
                        type: object
                        required:
                          - year
                          - month
                          - day
                        properties:
                          year:
                            type: integer
                            format: int32
                            maximum: 2100
                            minimum: 1900
                          month:
                            type: integer
                            format: int32
                            maximum: 12
                            minimum: 1
                          day:
                            type: integer
                            format: int32
                            maximum: 31
                            minimum: 1
                      active:
                        type: boolean
                        description: >-
                          The state of the admin user. If false, then the user
                          will not be able to log in.
                        readOnly: true
                      emailVerified:
                        type: boolean
                        description: Indicates if the admin user's email has been verified.
                        readOnly: true
                      mobileNumberVerified:
                        type: boolean
                        description: >-
                          Indicates if the admin user's mobile number has been
                          verified.
                        readOnly: true
                      roles:
                        type: array
                        minItems: 1
                        description: >
                          Roles define the level of access assigned to the user.


                          * `CREATOR`: Users assigned this role can create, view
                          and update payment runs.

                          * `CONTROLLER`: Users assigned this role can view and
                          link their company's bank accounts as well as fund
                          payment runs.

                          * `ADMIN`: Users assigned to this role can create a
                          business and ensure that systems and processes are
                          effectively managed.
                        items:
                          type: string
                          enum:
                            - ADMIN
                            - CREATOR
                            - CONTROLLER
                    description: The admin user of the Buyer Identity.
                  company:
                    allOf:
                      - required:
                          - name
                          - type
                          - countryOfRegistration
                        type: object
                        description: >-
                          The details associated with the company being
                          on-boarded. The details provided need to match exactly
                          with the details provided during KYB.
                        properties:
                          type:
                            type: string
                            description: >-
                              Supported company types - if company type is not
                              listed, please contact our support team to check
                              if the company type can be supported.
                            enum:
                              - LLC
                              - PUBLIC_LIMITED_COMPANY
                              - LIMITED_LIABILITY_PARTNERSHIP
                          name:
                            maxLength: 100
                            type: string
                            description: The registered name of the company.
                          registrationNumber:
                            maxLength: 20
                            minLength: 1
                            type: string
                            description: The company registration number.
                          businessAddress:
                            description: The address where the business is based.
                            type: object
                            required:
                              - addressLine1
                              - city
                              - postCode
                              - country
                            properties:
                              addressLine1:
                                minLength: 1
                                maxLength: 150
                                type: string
                                description: The first line of the address.
                              addressLine2:
                                maxLength: 150
                                type: string
                                description: The second line of the address.
                              city:
                                minLength: 1
                                maxLength: 50
                                type: string
                                description: The city of the address.
                              postCode:
                                minLength: 1
                                maxLength: 10
                                pattern: ^[A-Za-z0-9 -]*$
                                type: string
                                description: The post cost associated with the address.
                              state:
                                maxLength: 50
                                type: string
                                description: The state of the address.
                              country:
                                maxLength: 2
                                minLength: 2
                                pattern: ^[A-Z]+$
                                type: string
                                description: >-
                                  The country of the address expressed in ISO
                                  3166 alpha-2 format.
                          countryOfRegistration:
                            type: string
                            maxLength: 2
                            minLength: 2
                            pattern: ^[A-Z]+$
                            enum:
                              - GB
                              - AT
                              - BE
                              - BG
                              - HR
                              - CY
                              - CZ
                              - DK
                              - EE
                              - FI
                              - FR
                              - DE
                              - GI
                              - GR
                              - HU
                              - IS
                              - IE
                              - IT
                              - LV
                              - LI
                              - LT
                              - LU
                              - MT
                              - NL
                              - 'NO'
                              - PL
                              - PT
                              - RO
                              - SK
                              - SI
                              - ES
                              - SE
                            description: >-
                              The country of company registration in ISO 3166
                              alpha-2.
                      - type: object
                        properties:
                          registeredAddress:
                            required:
                              - addressLine1
                              - city
                              - country
                            type: object
                            description: >-
                              The legal address of the company. This information
                              is captured via the Due Diligence (KYB) process.
                            properties:
                              addressLine1:
                                type: string
                              addressLine2:
                                type: string
                              city:
                                type: string
                              postCode:
                                maxLength: 10
                                pattern: ^[A-Za-z0-9 -]*$
                                type: string
                              state:
                                maxLength: 50
                                type: string
                              country:
                                maxLength: 2
                                minLength: 2
                                pattern: ^[A-Z]+$
                                type: string
                                description: >-
                                  Country of the identity in ISO 3166 alpha-2
                                  format.
                            readOnly: true
                          incorporatedOn:
                            description: The company's date of incorporation
                            type: object
                            required:
                              - year
                              - month
                              - day
                            properties:
                              year:
                                type: integer
                                format: int32
                                maximum: 2100
                                minimum: 1900
                              month:
                                type: integer
                                format: int32
                                maximum: 12
                                minimum: 1
                              day:
                                type: integer
                                format: int32
                                maximum: 31
                                minimum: 1
                            readOnly: true
                  acceptedTerms:
                    type: boolean
                    description: >-
                      Must be set to *true* to indicate that the admin user has
                      accepted the terms and conditions.
                  supportedCurrencies:
                    type: array
                    items:
                      type: object
                      required:
                        - currency
                        - status
                      properties:
                        currency:
                          type: string
                          description: The currency expressed in ISO-4217 code.
                          maxLength: 3
                          minLength: 3
                          enum:
                            - GBP
                            - EUR
                        status:
                          type: string
                          description: >
                            The status of the currency, which can include the
                            following values


                            * `PENDING_KYB_APPROVAL`: The buyer’s KYB process is
                            pending approval.

                            * `STEPUP_LOGIN_REQUIRED`: The buyer needs to
                            perform a stepped-up login for higher
                            authentication.

                            * `PENDING_CREATION`: Awaiting the setup completion
                            of the currency

                            * `ACTIVE`: The ZBA has been successfully created
                            and is ready for use.

                            * `UNAVAILABLE`: The currency is unavailable and
                            cannot be used.
                          enum:
                            - PENDING_KYB_APPROVAL
                            - STEPUP_LOGIN_REQUIRED
                            - PENDING_CREATION
                            - ACTIVE
                            - UNAVAILABLE
                  creationTimestamp:
                    type: integer
                    format: int64
                    description: >-
                      The time when the Buyer was created, expressed in Epoch
                      timestamp using millisecond precision.
                    readOnly: true
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - ADMIN_EMAIL_NOT_UNIQUE
                      - CURRENCY_UNSUPPORTED
                      - COUNTRY_INVALID
                      - TERMS_NOT_ACCEPTED
                      - MOBILE_OR_COUNTRY_CODE_INVALID
                      - COUNTRY_UNSUPPORTED
                      - COMPANY_TYPE_UNSUPPORTED
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/login_with_password:
    post:
      operationId: acquireAuthToken
      description: >
        Authenticate a user with the `email` and `password` that they provided
        when registering.


        Given that the user credentials are correct, this returns a `token` that
        can then be used to authorise

        other secured operations. In case the password is expired, a temporary
        `token` is returned, which can be used

        solely for updating the password.


        The token returned is valid for 5 minutes from last activity.
      summary: Acquire auth token
      tags:
        - Tokens
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - email
                - password
              type: object
              properties:
                email:
                  type: string
                  description: E-mail Address of the user
                  format: email
                password:
                  type: object
                  description: >
                    The user's password or passcode used to log in a user.

                    Passwords must be:
                      - between 8 and 30 characters
                      - include a lowercase character
                      - include an uppercase character
                      - include a digit and a special character
                      - different from any of the 5 last such passwords used.

                    For non-PCI compliant integrations, the password submitted
                    must be **tokenised**.
                  required:
                    - value
                  properties:
                    value:
                      minLength: 1
                      maxLength: 100
                      type: string
                      format: password
      responses:
        '200':
          description: OK
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: >-
                      An authorisation token (valid for 5 minutes from last
                      activity) identifying the user to be used in the
                      `auth_token` authorization header for secured operations.
                  tokenType:
                    type: string
                    description: >
                      The auth token received can only be used to access the
                      following endpoints:
                        - `/identities`
                        - `/access_token`
                    enum:
                      - AUTH
                      - ACCESS
                  identity:
                    description: The identity to which the logged-in user belongs to.
                    type: object
                    required:
                      - type
                      - id
                    properties:
                      type:
                        enum:
                          - BUYER
                        type: string
                        description: Indicates the identity type.
                      id:
                        type: string
                        pattern: ^[0-9]+$
                        description: The identifier for the identity.
                  credentials:
                    description: The unique identifier for the logged-in user.
                    required:
                      - type
                      - id
                    type: object
                    properties:
                      type:
                        maxLength: 50
                        pattern: ^[a-zA-Z0-9_-]+$
                        type: string
                        enum:
                          - ADMIN
                          - USER
                        description: The type of user.
                      id:
                        type: string
                        pattern: ^[0-9]+$
                        description: The identifier of the user.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: >-
            The user's password has expired. Use the returned temporary token to
            update their password via the  '_/passwords/update_' endpoint.
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: >-
                      Temporary authorisation token required to initiate the
                      _passwordUpdate_ operation.
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/logout:
    post:
      operationId: logout
      description: |
        Logs out the user and terminates the session identified by the
        `auth_token` in the Authorization Header.
      summary: Logout
      tags:
        - Tokens
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/password/{user_id}:
    post:
      operationId: passwordCreate
      description: >-
        Create a new password for the user identified by the `user_id` path
        parameter.
      summary: Create a password
      tags:
        - Passwords
      security:
        - apiKey: []
      parameters:
        - name: user_id
          in: path
          required: true
          description: The unique identifier for the user.
          schema:
            type: string
            pattern: ^[0-9]+$
            example: '110747174434373672'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - password
              type: object
              properties:
                password:
                  type: object
                  description: >
                    The user's password or passcode used to log in a user.

                    Passwords must be:
                      - between 8 and 30 characters
                      - include a lowercase character
                      - include an uppercase character
                      - include a digit and a special character
                      - different from any of the 5 last such passwords used.

                    For non-PCI compliant integrations, the password submitted
                    must be **tokenised**.
                  required:
                    - value
                  properties:
                    value:
                      minLength: 1
                      maxLength: 100
                      type: string
                      format: password
      responses:
        '200':
          description: OK
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  passwordInfo:
                    type: object
                    required:
                      - buyerId
                    description: Additional information related to the user's password.
                    properties:
                      buyerId:
                        type: string
                        pattern: ^[0-9]+$
                        description: >-
                          The buyer to which the user's password information
                          belongs to.
                      expiryDate:
                        minimum: 0
                        type: integer
                        format: int64
                        description: >-
                          The millisecond timestamp indicating when the password
                          will expire. If 0, then this password will not expire.
                  token:
                    type: string
                    description: >-
                      The authorisation token to be used in the Authorization
                      header for secured operations.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - UNRESOLVED_IDENTITY
                      - PASSWORD_PROFILE_NOT_CONFIGURED_FOR_CREDENTIAL_TYPE
                      - PASSWORD_TOO_SHORT
                      - PASSWORD_TOO_LONG
                      - PASSWORD_TOO_SIMPLE
                      - PASSWORD_KEY_ALREADY_IN_USE
                      - PASSWORD_ALREADY_CREATED
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/passwords/update:
    post:
      description: Update the password for the logged-in user.
      summary: Update a password
      operationId: passwordUpdate
      tags:
        - Passwords
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - oldPassword
                - newPassword
              properties:
                oldPassword:
                  type: object
                  description: >
                    The user's password or passcode used to log in a user.

                    Passwords must be:
                      - between 8 and 30 characters
                      - include a lowercase character
                      - include an uppercase character
                      - include a digit and a special character
                      - different from any of the 5 last such passwords used.

                    For non-PCI compliant integrations, the password submitted
                    must be **tokenised**.
                  required:
                    - value
                  properties:
                    value:
                      minLength: 1
                      maxLength: 100
                      type: string
                      format: password
                newPassword:
                  type: object
                  description: >
                    The user's password or passcode used to log in a user.

                    Passwords must be:
                      - between 8 and 30 characters
                      - include a lowercase character
                      - include an uppercase character
                      - include a digit and a special character
                      - different from any of the 5 last such passwords used.

                    For non-PCI compliant integrations, the password submitted
                    must be **tokenised**.
                  required:
                    - value
                  properties:
                    value:
                      minLength: 1
                      maxLength: 100
                      type: string
                      format: password
      responses:
        '200':
          description: OK
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  passwordInfo:
                    type: object
                    required:
                      - buyerId
                    description: Additional information related to the user's password.
                    properties:
                      buyerId:
                        type: string
                        pattern: ^[0-9]+$
                        description: >-
                          The buyer to which the user's password information
                          belongs to.
                      expiryDate:
                        minimum: 0
                        type: integer
                        format: int64
                        description: >-
                          The millisecond timestamp indicating when the password
                          will expire. If 0, then this password will not expire.
                  token:
                    type: string
                    description: >-
                      The authorisation token to be used in the Authorization
                      header for secured operations.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - PASSWORD_ALREADY_USED
                      - PASSWORD_TOO_SHORT
                      - PASSWORD_TOO_LONG
                      - PASSWORD_TOO_SIMPLE
                      - PASSWORD_INCORRECT
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/passwords/validate:
    post:
      description: Check that a password adheres to all complexity checks.
      summary: Validate a password
      operationId: passwordValidate
      security:
        - apiKey: []
      tags:
        - Passwords
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - password
              type: object
              properties:
                password:
                  type: object
                  description: >
                    The user's password or passcode used to log in a user.

                    Passwords must be:
                      - between 8 and 30 characters
                      - include a lowercase character
                      - include an uppercase character
                      - include a digit and a special character
                      - different from any of the 5 last such passwords used.

                    For non-PCI compliant integrations, the password submitted
                    must be **tokenised**.
                  required:
                    - value
                  properties:
                    value:
                      minLength: 1
                      maxLength: 100
                      type: string
                      format: password
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - PASSWORD_ALREADY_USED
                      - PASSWORD_TOO_SHORT
                      - PASSWORD_TOO_LONG
                      - PASSWORD_TOO_SIMPLE
                      - PASSWORD_INCORRECT
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/passwords/lost_password/start:
    post:
      description: >
        Initiate the lost password process.


        If the email address provided is associated with an active user, an
        email will be sent, containing a URL that redirects the user to change
        their password.

        The URL contains request parameters for all of the parameters required
        to change the password for the user via the
        `/passwords/lost_password/resume` POST endpoint.
      summary: Initiate lost password process
      operationId: lostPasswordInitiate
      security:
        - apiKey: []
      tags:
        - Passwords
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  description: E-mail Address of the user
                  format: email
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MULTIPLE_ACCOUNTS_FOUND
                      - ACCOUNT_NOT_FOUND
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/passwords/lost_password/resume:
    post:
      description: >
        This is the second and final step in updating the password of a user who
        forgot their password.
      summary: Resume lost password process
      operationId: lostPasswordResume
      security:
        - apiKey: []
      tags:
        - Passwords
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - email
                - nonce
                - newPassword
              type: object
              properties:
                nonce:
                  type: string
                  description: A randomly generated one-time use code.
                  minLength: 6
                  maxLength: 6
                  pattern: ^[0-9]*$
                email:
                  type: string
                  description: E-mail Address of the user
                  format: email
                newPassword:
                  type: object
                  description: >
                    The user's password or passcode used to log in a user.

                    Passwords must be:
                      - between 8 and 30 characters
                      - include a lowercase character
                      - include an uppercase character
                      - include a digit and a special character
                      - different from any of the 5 last such passwords used.

                    For non-PCI compliant integrations, the password submitted
                    must be **tokenised**.
                  required:
                    - value
                  properties:
                    value:
                      minLength: 1
                      maxLength: 100
                      type: string
                      format: password
      responses:
        '200':
          description: OK
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: >-
                      An authorisation token to be used in the Authorization
                      header for secured operations.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INVALID_NONCE_OR_EMAIL
                      - PASSWORD_ALREADY_USED
                      - PASSWORD_TOO_SHORT
                      - PASSWORD_TOO_LONG
                      - PASSWORD_TOO_SIMPLE
                      - PASSWORD_INCORRECT
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/stepup/challenges/otp/{channel}:
    post:
      operationId: stepupSCAChallenge
      description: >
        Initiates the step-up token process by sending an SMS with an
        one-time-password to a device belonging to the logged-in user that was
        previously enrolled through `/authentication_factors/otp/{channel}`
        endpoint.


        This process is required for endpoints that require a step-up token to
        complete the call.


        _Note that on the Sandbox Environment, text messages are not sent and
        the one-time-password is always \"123456\"._
      summary: Issue a one-time password that can be used to step-up a token
      tags:
        - Step up
      parameters:
        - name: channel
          in: path
          required: true
          description: The unique identifier for the channel.
          schema:
            type: string
            enum:
              - SMS
            description: '- "SMS": The one-time-password is sent as a text message'
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - CHANNEL_NOT_SUPPORTED
                      - CHANNEL_NOT_REGISTERED
                      - MOBILE_NUMBER_INVALID
                      - RETRY_IN_15SEC
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/stepup/challenges/otp/{channel}/verify:
    post:
      operationId: stepupSCAVerify
      description: >
        Completes the verification process for a step up token.


        _Note that on the Sandbox Environment, text messages are not sent and
        the `verificationCode` is always \"123456\"._
      summary: Verify a step-up token using a one-time password
      tags:
        - Step up
      parameters:
        - name: channel
          in: path
          required: true
          description: The unique identifier for the channel.
          schema:
            type: string
            enum:
              - SMS
            description: '- "SMS": The one-time-password is sent as a text message'
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - verificationCode
              properties:
                verificationCode:
                  type: string
                  description: The code received by the user on the device.
                  minLength: 6
                  maxLength: 6
                  pattern: ^[0-9]*$
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - STATE_INVALID
                      - VERIFICATION_CODE_EXPIRED
                      - VERIFICATION_CODE_INVALID
                      - CHANNEL_NOT_SUPPORTED
                      - CHANNEL_NOT_REGISTERED
                      - ONE_CHALLENGE_LIMIT_REMAINING
                      - CHALLENGE_LIMIT_EXCEEDED
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/users:
    post:
      description: >-
        Creates a user that belongs to the buyer that the logged-in user belongs
        to. To Create an Authorised User you would need a stepped-up token.
        After calling this endpoint you need to step-up ( issue a challenge
        `/stepup/challenges/otp/{channel}` ). More details on how to step-up a
        token can be found here
        [Step-Up](https://docs.weavr.io/payment-run/plugin-api/plugin-api-authentication-stepup/).


        Once on-boarded, users have access and manage the buyer's payment runs.


        Users are assigned `roles` which limit the level of access they have and
        what they can do on behalf of the buyer.



        Required user role: `ADMIN`
      summary: Create a user
      operationId: userCreate
      tags:
        - Buyer Authorised Users
      parameters:
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: UserCreate
              required:
                - email
                - name
                - surname
                - roles
              type: object
              properties:
                name:
                  minLength: 1
                  maxLength: 20
                  type: string
                  description: The first name of the user.
                surname:
                  minLength: 1
                  maxLength: 20
                  type: string
                  description: The last name of the user.
                email:
                  type: string
                  description: E-mail Address of the user
                  format: email
                mobile:
                  type: object
                  description: Mobile number of the user
                  required:
                    - number
                    - countryCode
                  properties:
                    countryCode:
                      maxLength: 6
                      minLength: 1
                      pattern: ^[\+][0-9]{1,5}$
                      type: string
                      description: >-
                        The country code of the Buyer's admin user mobile number
                        (e.g. +44).
                    number:
                      maxLength: 15
                      minLength: 1
                      pattern: ^[0-9]+$
                      type: string
                      description: >-
                        The mobile number of the Buyer's admin user - excluding
                        country code.
                dateOfBirth:
                  description: Date of birth of the authorised user.
                  type: object
                  required:
                    - year
                    - month
                    - day
                  properties:
                    year:
                      type: integer
                      format: int32
                      maximum: 2100
                      minimum: 1900
                    month:
                      type: integer
                      format: int32
                      maximum: 12
                      minimum: 1
                    day:
                      type: integer
                      format: int32
                      maximum: 31
                      minimum: 1
                roles:
                  type: array
                  minItems: 1
                  description: >
                    Roles define the level of access assigned to the user.


                    * `CREATOR`: Users assigned this role can create, view and
                    update payment runs.

                    * `CONTROLLER`: Users assigned this role can view and link
                    their company's bank accounts as well as fund payment runs.
                  items:
                    type: string
                    enum:
                      - CREATOR
                      - CONTROLLER
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - required:
                      - id
                      - email
                      - name
                      - surname
                      - buyerId
                      - active
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^[0-9]+$
                        description: The unique identifier of the user.
                      buyerId:
                        type: string
                        pattern: ^[0-9]+$
                        description: The identifier for the identity.
                      name:
                        maxLength: 100
                        type: string
                        description: The first name of the user.
                      surname:
                        maxLength: 100
                        type: string
                        description: The last name of the user.
                      email:
                        type: string
                        description: E-mail Address of the user
                        format: email
                      mobile:
                        type: object
                        description: Mobile number of the user
                        required:
                          - number
                          - countryCode
                        properties:
                          countryCode:
                            maxLength: 6
                            minLength: 1
                            pattern: ^[\+][0-9]{1,5}$
                            type: string
                            description: >-
                              The country code of the Buyer's admin user mobile
                              number (e.g. +44).
                          number:
                            maxLength: 15
                            minLength: 1
                            pattern: ^[0-9]+$
                            type: string
                            description: >-
                              The mobile number of the Buyer's admin user -
                              excluding country code.
                      active:
                        type: boolean
                        description: >-
                          The state of the user. If the `active` attribute is
                          false, then the user will not be able to log in.
                      dateOfBirth:
                        description: Date of birth of the authorised user.
                        type: object
                        required:
                          - year
                          - month
                          - day
                        properties:
                          year:
                            type: integer
                            format: int32
                            maximum: 2100
                            minimum: 1900
                          month:
                            type: integer
                            format: int32
                            maximum: 12
                            minimum: 1
                          day:
                            type: integer
                            format: int32
                            maximum: 31
                            minimum: 1
                  - type: object
                    required:
                      - roles
                    properties:
                      roles:
                        type: array
                        minItems: 1
                        description: >
                          Roles define the level of access assigned to the user.


                          * `CREATOR`: Users assigned this role can create, view
                          and update payment runs.

                          * `CONTROLLER`: Users assigned this role can view and
                          link their company's bank accounts as well as fund
                          payment runs.
                        items:
                          type: string
                          enum:
                            - CREATOR
                            - CONTROLLER
                  - type: object
                    properties:
                      addedBy:
                        type: object
                        required:
                          - roleNames
                          - userId
                        properties:
                          rolesNames:
                            type: array
                            minItems: 1
                            description: >
                              Roles define the level of access assigned to the
                              user.


                              * `ADMIN`: Users assigned to this role can create
                              a business and ensure that systems and processes
                              are effectively managed.
                            items:
                              type: string
                              enum:
                                - ADMIN
                          userId:
                            type: string
                            pattern: ^[0-9]+$
                            description: >-
                              The unique identifier of the user who added this
                              user.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - STEP_UP_REQUIRED
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - EMAIL_NOT_UNIQUE
                      - MOBILE_NOT_UNIQUE
                      - MOBILE_OR_COUNTRY_CODE_INVALID
                      - EMAIL_DOMAIN_NOT_ALLOWED
                      - INSUFFICIENT_PERMISSIONS
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    get:
      description: >-
        Fetches all authorised users associated with the buyer that the
        logged-in user belongs to.



        Required user role: `ADMIN`
      summary: Get all users
      operationId: usersGet
      tags:
        - Buyer Authorised Users
      parameters:
        - name: offset
          in: query
          required: false
          description: >-
            The offset value for paging, indicating the initial item number to
            be returned from the data set satisfying the given criteria. Leave
            out to fetch the first page of results.
          schema:
            minimum: 0
            type: integer
            format: int32
            default: 0
        - name: limit
          in: query
          required: false
          description: >-
            The limit of the results for paging, starting at the offset. Limit
            is always capped at 100.
          schema:
            maximum: 100
            minimum: 1
            type: integer
            format: int32
            default: 100
        - name: active
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Filter for active or deactivated users. Leave out to fetch all
              users.
        - name: email
          in: query
          required: false
          schema:
            type: string
            format: email
            description: Filter for users with the specified email address.
      responses:
        '200':
          description: Success
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  users:
                    type: array
                    description: The list of users matching the criteria specified.
                    items:
                      allOf:
                        - required:
                            - id
                            - email
                            - name
                            - surname
                            - buyerId
                            - active
                          type: object
                          properties:
                            id:
                              type: string
                              pattern: ^[0-9]+$
                              description: The unique identifier of the user.
                            buyerId:
                              type: string
                              pattern: ^[0-9]+$
                              description: The identifier for the identity.
                            name:
                              maxLength: 100
                              type: string
                              description: The first name of the user.
                            surname:
                              maxLength: 100
                              type: string
                              description: The last name of the user.
                            email:
                              type: string
                              description: E-mail Address of the user
                              format: email
                            mobile:
                              type: object
                              description: Mobile number of the user
                              required:
                                - number
                                - countryCode
                              properties:
                                countryCode:
                                  maxLength: 6
                                  minLength: 1
                                  pattern: ^[\+][0-9]{1,5}$
                                  type: string
                                  description: >-
                                    The country code of the Buyer's admin user
                                    mobile number (e.g. +44).
                                number:
                                  maxLength: 15
                                  minLength: 1
                                  pattern: ^[0-9]+$
                                  type: string
                                  description: >-
                                    The mobile number of the Buyer's admin user
                                    - excluding country code.
                            active:
                              type: boolean
                              description: >-
                                The state of the user. If the `active` attribute
                                is false, then the user will not be able to log
                                in.
                            dateOfBirth:
                              description: Date of birth of the authorised user.
                              type: object
                              required:
                                - year
                                - month
                                - day
                              properties:
                                year:
                                  type: integer
                                  format: int32
                                  maximum: 2100
                                  minimum: 1900
                                month:
                                  type: integer
                                  format: int32
                                  maximum: 12
                                  minimum: 1
                                day:
                                  type: integer
                                  format: int32
                                  maximum: 31
                                  minimum: 1
                        - type: object
                          required:
                            - roles
                          properties:
                            roles:
                              type: array
                              minItems: 1
                              description: >
                                Roles define the level of access assigned to the
                                user.


                                * `CREATOR`: Users assigned this role can
                                create, view and update payment runs.

                                * `CONTROLLER`: Users assigned this role can
                                view and link their company's bank accounts as
                                well as fund payment runs.
                              items:
                                type: string
                                enum:
                                  - CREATOR
                                  - CONTROLLER
                        - type: object
                          properties:
                            addedBy:
                              type: object
                              required:
                                - roleNames
                                - userId
                              properties:
                                rolesNames:
                                  type: array
                                  minItems: 1
                                  description: >
                                    Roles define the level of access assigned to
                                    the user.


                                    * `ADMIN`: Users assigned to this role can
                                    create a business and ensure that systems
                                    and processes are effectively managed.
                                  items:
                                    type: string
                                    enum:
                                      - ADMIN
                                userId:
                                  type: string
                                  pattern: ^[0-9]+$
                                  description: >-
                                    The unique identifier of the user who added
                                    this user.
                  count:
                    type: integer
                    description: The total number of records (excluding the paging limit).
                    format: int32
                  responseCount:
                    type: integer
                    description: >-
                      The total number of records returned in this response
                      (always capped at 100).
                    format: int32
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/users/{user_id}:
    get:
      description: |-
        Retrieves the user identified by the `user_id` path parameter.


        Required user role: `ADMIN`
      summary: Get a user
      operationId: userGetById
      tags:
        - Buyer Authorised Users
      parameters:
        - name: user_id
          in: path
          required: true
          description: The unique identifier for the user.
          schema:
            type: string
            pattern: ^[0-9]+$
            example: '110747174434373672'
      responses:
        '200':
          description: Success
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                allOf:
                  - required:
                      - id
                      - email
                      - name
                      - surname
                      - buyerId
                      - active
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^[0-9]+$
                        description: The unique identifier of the user.
                      buyerId:
                        type: string
                        pattern: ^[0-9]+$
                        description: The identifier for the identity.
                      name:
                        maxLength: 100
                        type: string
                        description: The first name of the user.
                      surname:
                        maxLength: 100
                        type: string
                        description: The last name of the user.
                      email:
                        type: string
                        description: E-mail Address of the user
                        format: email
                      mobile:
                        type: object
                        description: Mobile number of the user
                        required:
                          - number
                          - countryCode
                        properties:
                          countryCode:
                            maxLength: 6
                            minLength: 1
                            pattern: ^[\+][0-9]{1,5}$
                            type: string
                            description: >-
                              The country code of the Buyer's admin user mobile
                              number (e.g. +44).
                          number:
                            maxLength: 15
                            minLength: 1
                            pattern: ^[0-9]+$
                            type: string
                            description: >-
                              The mobile number of the Buyer's admin user -
                              excluding country code.
                      active:
                        type: boolean
                        description: >-
                          The state of the user. If the `active` attribute is
                          false, then the user will not be able to log in.
                      dateOfBirth:
                        description: Date of birth of the authorised user.
                        type: object
                        required:
                          - year
                          - month
                          - day
                        properties:
                          year:
                            type: integer
                            format: int32
                            maximum: 2100
                            minimum: 1900
                          month:
                            type: integer
                            format: int32
                            maximum: 12
                            minimum: 1
                          day:
                            type: integer
                            format: int32
                            maximum: 31
                            minimum: 1
                  - type: object
                    required:
                      - roles
                    properties:
                      roles:
                        type: array
                        minItems: 1
                        description: >
                          Roles define the level of access assigned to the user.


                          * `CREATOR`: Users assigned this role can create, view
                          and update payment runs.

                          * `CONTROLLER`: Users assigned this role can view and
                          link their company's bank accounts as well as fund
                          payment runs.
                        items:
                          type: string
                          enum:
                            - CREATOR
                            - CONTROLLER
                  - type: object
                    properties:
                      addedBy:
                        type: object
                        required:
                          - roleNames
                          - userId
                        properties:
                          rolesNames:
                            type: array
                            minItems: 1
                            description: >
                              Roles define the level of access assigned to the
                              user.


                              * `ADMIN`: Users assigned to this role can create
                              a business and ensure that systems and processes
                              are effectively managed.
                            items:
                              type: string
                              enum:
                                - ADMIN
                          userId:
                            type: string
                            pattern: ^[0-9]+$
                            description: >-
                              The unique identifier of the user who added this
                              user.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    patch:
      description: >-
        Update the details of a user identified by the user_id in the the path
        parameter. After calling this endpoint you need to step-up ( issue a
        challenge /stepup/challenges/otp/{channel} ). More details on how to
        step-up a token can be found here
        [Step-Up](https://docs.weavr.io/payment-run/plugin-api/plugin-api-authentication-stepup/)..


        Only the fields that are specified in the request body will be updated.
        All other fields will remain unchanged.


        When patching a mobile number, the new mobile number should be enrolled
        for Additional Factors.



        Required user role: `ADMIN`
      summary: Update a user
      operationId: userUpdate
      tags:
        - Buyer Authorised Users
      parameters:
        - name: user_id
          in: path
          required: true
          description: The unique identifier for the user.
          schema:
            type: string
            pattern: ^[0-9]+$
            example: '110747174434373672'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: UserUpdate
              type: object
              properties:
                name:
                  maxLength: 20
                  type: string
                  description: The first name of the user.
                surname:
                  maxLength: 20
                  type: string
                  description: The last name of the user.
                email:
                  type: string
                  description: E-mail Address of the user
                  format: email
                mobile:
                  type: object
                  description: Mobile number of the user
                  required:
                    - number
                    - countryCode
                  properties:
                    countryCode:
                      maxLength: 6
                      minLength: 1
                      pattern: ^[\+][0-9]{1,5}$
                      type: string
                      description: >-
                        The country code of the Buyer's admin user mobile number
                        (e.g. +44).
                    number:
                      maxLength: 15
                      minLength: 1
                      pattern: ^[0-9]+$
                      type: string
                      description: >-
                        The mobile number of the Buyer's admin user - excluding
                        country code.
                dateOfBirth:
                  description: Date of birth of the authorised user.
                  type: object
                  required:
                    - year
                    - month
                    - day
                  properties:
                    year:
                      type: integer
                      format: int32
                      maximum: 2100
                      minimum: 1900
                    month:
                      type: integer
                      format: int32
                      maximum: 12
                      minimum: 1
                    day:
                      type: integer
                      format: int32
                      maximum: 31
                      minimum: 1
                roles:
                  type: array
                  minItems: 1
                  description: >
                    Roles define the level of access assigned to the user.


                    * `CREATOR`: Users assigned this role can create, view and
                    update payment runs.

                    * `CONTROLLER`: Users assigned this role can view and link
                    their company's bank accounts as well as fund payment runs.
                  items:
                    type: string
                    enum:
                      - CREATOR
                      - CONTROLLER
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - required:
                      - id
                      - email
                      - name
                      - surname
                      - buyerId
                      - active
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^[0-9]+$
                        description: The unique identifier of the user.
                      buyerId:
                        type: string
                        pattern: ^[0-9]+$
                        description: The identifier for the identity.
                      name:
                        maxLength: 100
                        type: string
                        description: The first name of the user.
                      surname:
                        maxLength: 100
                        type: string
                        description: The last name of the user.
                      email:
                        type: string
                        description: E-mail Address of the user
                        format: email
                      mobile:
                        type: object
                        description: Mobile number of the user
                        required:
                          - number
                          - countryCode
                        properties:
                          countryCode:
                            maxLength: 6
                            minLength: 1
                            pattern: ^[\+][0-9]{1,5}$
                            type: string
                            description: >-
                              The country code of the Buyer's admin user mobile
                              number (e.g. +44).
                          number:
                            maxLength: 15
                            minLength: 1
                            pattern: ^[0-9]+$
                            type: string
                            description: >-
                              The mobile number of the Buyer's admin user -
                              excluding country code.
                      active:
                        type: boolean
                        description: >-
                          The state of the user. If the `active` attribute is
                          false, then the user will not be able to log in.
                      dateOfBirth:
                        description: Date of birth of the authorised user.
                        type: object
                        required:
                          - year
                          - month
                          - day
                        properties:
                          year:
                            type: integer
                            format: int32
                            maximum: 2100
                            minimum: 1900
                          month:
                            type: integer
                            format: int32
                            maximum: 12
                            minimum: 1
                          day:
                            type: integer
                            format: int32
                            maximum: 31
                            minimum: 1
                  - type: object
                    required:
                      - roles
                    properties:
                      roles:
                        type: array
                        minItems: 1
                        description: >
                          Roles define the level of access assigned to the user.


                          * `CREATOR`: Users assigned this role can create, view
                          and update payment runs.

                          * `CONTROLLER`: Users assigned this role can view and
                          link their company's bank accounts as well as fund
                          payment runs.
                        items:
                          type: string
                          enum:
                            - CREATOR
                            - CONTROLLER
                  - type: object
                    properties:
                      addedBy:
                        type: object
                        required:
                          - roleNames
                          - userId
                        properties:
                          rolesNames:
                            type: array
                            minItems: 1
                            description: >
                              Roles define the level of access assigned to the
                              user.


                              * `ADMIN`: Users assigned to this role can create
                              a business and ensure that systems and processes
                              are effectively managed.
                            items:
                              type: string
                              enum:
                                - ADMIN
                          userId:
                            type: string
                            pattern: ^[0-9]+$
                            description: >-
                              The unique identifier of the user who added this
                              user.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - EMAIL_NOT_UNIQUE
                      - MOBILE_NOT_UNIQUE
                      - MOBILE_OR_COUNTRY_CODE_INVALID
                      - MOBILE_NO_CHANGE_LIMIT_EXCEEDED
                      - TOO_FREQUENT_EMAIL_CHANGES
                      - EMAIL_DOMAIN_NOT_ALLOWED
                      - MOBILE_CHANGE_NOT_ALLOWED
                      - INSUFFICIENT_PERMISSIONS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/users/{user_id}/activate:
    post:
      description: >-
        Activate the user identified by the `user_id` path parameter.


        By default, any new users created will be automatically activated. This
        operation needs to be used only if the user was previously de-activated
        using the _userDeactivate_ operation, or if the user was de-activated
        automatically after multiple incorrect login attempts.



        Required user role: `ADMIN`
      summary: Activate a user
      operationId: userActivate
      tags:
        - Buyer Authorised Users
      parameters:
        - name: user_id
          in: path
          required: true
          description: The unique identifier for the user.
          schema:
            type: string
            pattern: ^[0-9]+$
            example: '110747174434373672'
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/users/{user_id}/deactivate:
    post:
      description: >-
        De-activate the user identified by the `user_id` path parameter.


        Deactivated users cannot log in or execute any operations with their
        credentials.


        This operations is not final and a user can be re-activated using the
        userActivate operation. Note that another active user would need to log
        in so as to re-activate the de-activated user.



        Required user role: `ADMIN`
      summary: Deactivate a user
      operationId: userDeactivate
      tags:
        - Buyer Authorised Users
      parameters:
        - name: user_id
          in: path
          required: true
          description: The unique identifier for the user.
          schema:
            type: string
            pattern: ^[0-9]+$
            example: '110747174434373672'
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/users/{user_id}/invite:
    post:
      summary: Send a user invite
      operationId: userInviteSend
      tags:
        - Buyer Authorised Users
      description: >-
        Once a user is created using the _userCreate_ operation, the user needs
        to setup his/her password.


        An invitation needs to be sent to the user in order to be able to set up
        the password for the first time. The invitation email, which remains
        valid for 1 month, will contain a URL having all information required to
        setup the password via the _userInviteConsume_.



        Required user role: `ADMIN`
      parameters:
        - name: user_id
          in: path
          required: true
          description: The unique identifier for the user.
          schema:
            type: string
            pattern: ^[0-9]+$
            example: '110747174434373672'
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INVITE_ALREADY_CONSUMED
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/users/{user_id}/invite/validate:
    post:
      description: >
        Check if a user's invite is still valid. This operation is useful

        to avoid having the user fill in a form only to be held by a validation
        issue

        (eg. expired invite).
      summary: Validate a user invite
      operationId: userInviteValidate
      tags:
        - Buyer Authorised Users
      parameters:
        - name: user_id
          in: path
          required: true
          description: The unique identifier for the user.
          schema:
            type: string
            pattern: ^[0-9]+$
            example: '110747174434373672'
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - inviteCode
              type: object
              properties:
                inviteCode:
                  type: string
                  description: A randomly generated one-time use code.
                  minLength: 6
                  maxLength: 6
                  pattern: ^[0-9]*$
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INVITE_OR_INVITE_CODE_INVALID
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
      security:
        - apiKey: []
  /v1/users/{user_id}/invite/consume:
    post:
      description: >
        Consumes an invitation previously sent to the user via _userInviteSend_.
        This is needed so that the invited user sets up the password.


        _Note that on the Sandbox Environment, the `inviteCode` is always set to
        \"123456\"._
      summary: Consume a user invite
      operationId: userInviteConsume
      tags:
        - Buyer Authorised Users
      parameters:
        - name: user_id
          in: path
          required: true
          description: The unique identifier for the user.
          schema:
            type: string
            pattern: ^[0-9]+$
            example: '110747174434373672'
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - inviteCode
                - password
              type: object
              properties:
                inviteCode:
                  type: string
                  description: A randomly generated one-time use code.
                  minLength: 6
                  maxLength: 6
                  pattern: ^[0-9]*$
                password:
                  type: object
                  description: >
                    The user's password or passcode used to log in a user.

                    Passwords must be:
                      - between 8 and 30 characters
                      - include a lowercase character
                      - include an uppercase character
                      - include a digit and a special character
                      - different from any of the 5 last such passwords used.

                    For non-PCI compliant integrations, the password submitted
                    must be **tokenised**.
                  required:
                    - value
                  properties:
                    value:
                      minLength: 1
                      maxLength: 100
                      type: string
                      format: password
      responses:
        '200':
          description: Success
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: >-
                      An authorisation token to be used in the Authorization
                      header for secured operations.
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INVITE_OR_INVITE_CODE_INVALID
                      - UNRESOLVED_IDENTITY
                      - PASSWORD_ALREADY_USED
                      - PASSWORD_PROFILE_NOT_CONFIGURED_FOR_CREDENTIAL_TYPE
                      - PASSWORD_TOO_SHORT
                      - PASSWORD_TOO_LONG
                      - PASSWORD_TOO_SIMPLE
                      - PASSWORD_KEY_ALREADY_IN_USE
                      - PASSWORD_ALREADY_CREATED
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
      security:
        - apiKey: []
  /v1/users/verification/email/send:
    post:
      description: >
        The first step in verifying an authorised user's email. The authorised
        user whose email address is to be verified is sent an email containing a
        randomly generated code.


        This code must then be provided in the _authorisedUserEmailVerify_
        operation to verify the authorised user's email address.


        _Note that on the Sandbox Environment, the `verificationCode` is always
        set to \"123456\"._
      summary: Send an email verification code to the authorised user
      operationId: authorisedUserEmailVerificationCodeSend
      tags:
        - Buyer Authorised Users
      parameters:
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - email
              type: object
              properties:
                email:
                  type: string
                  description: E-mail Address of the user
                  format: email
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - EMAIL_NOT_FOUND
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
      security:
        - apiKey: []
  /v1/users/verification/email/verify:
    post:
      description: >
        The second step in verifying the authorised user's email. The randomly
        generated code sent to the authorised user via

        email, using the _authorisedUserEmailVerificationCodeSend_ operation, is
        submitted here to verify the authorised user's email.


        This is needed as part of the verification process for basic due
        diligence.


        _Note that on the Sandbox Environment, the `verificationCode` is always
        set to \"123456\"._
      summary: Verify email of the authorised user
      operationId: authorisedUserEmailVerify
      tags:
        - Buyer Authorised Users
      parameters:
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - email
                - verificationCode
              type: object
              properties:
                email:
                  type: string
                  description: E-mail Address of the user
                  format: email
                verificationCode:
                  type: string
                  description: >-
                    A randomly generated one-time use code used to verify the
                    user's email address or mobile number.
                  minLength: 6
                  maxLength: 6
                  pattern: ^[0-9]+$
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - VERIFICATION_CODE_INVALID
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
      security:
        - apiKey: []
  /v1/linked_accounts:
    get:
      operationId: getLinkedAccounts
      summary: Get Linked accounts
      description: >-
        Retrieves the linked accounts belonging to the buyer that the logged-in
        user belongs to.



        Required user role: `CONTROLLER`
      tags:
        - Linked Accounts
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - linkedAccounts
                properties:
                  linkedAccounts:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - accountIdentification
                        - currency
                        - institution
                        - consent
                        - status
                      properties:
                        id:
                          description: The unique identifier of the linked account
                          type: string
                          pattern: ^[0-9a-fA-F]{24}$
                          example: 652d25b73541d8084a88a38d
                        accountIdentification:
                          description: >-
                            The bank details that uniquely identify the account
                            on the banking systems.
                          oneOf:
                            - title: FasterPaymentsBankDetails
                              required:
                                - accountNumber
                                - sortCode
                              type: object
                              description: >-
                                Bank details used in case the wire transfer is
                                executed over Faster Payments.
                              properties:
                                accountNumber:
                                  type: string
                                  minLength: 8
                                  maxLength: 8
                                  pattern: ^[0-9]{8}$
                                  description: >-
                                    Account number, required for wire transfer
                                    over Faster Payments.
                                sortCode:
                                  type: string
                                  minLength: 6
                                  maxLength: 6
                                  pattern: ^[0-9]{6}$
                                  description: >-
                                    Sort code, required for wire transfer over
                                    Faster Payments.
                                secondaryReference:
                                  type: string
                                  description: Secondary reference data if applicable.
                            - title: SepaBankDetails
                              required:
                                - iban
                              type: object
                              description: >-
                                Bank details used in case the wire transfer is
                                executed over SEPA.
                              properties:
                                iban:
                                  type: string
                                  minLength: 15
                                  maxLength: 34
                                  pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                  description: >-
                                    International Bank Account Number, required
                                    for wire transfer over SEPA.
                                bankIdentifierCode:
                                  type: string
                                  minLength: 8
                                  maxLength: 11
                                  pattern: >-
                                    ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                  description: BIC, for wire transfer over SEPA.
                        currency:
                          type: string
                          description: The primary currency associated with the account
                          maxLength: 3
                          minLength: 3
                          enum:
                            - GBP
                            - EUR
                        institution:
                          type: object
                          required:
                            - countries
                          properties:
                            displayName:
                              description: >-
                                The name to be used when displaying the
                                institution to users on user interfaces
                              type: string
                            countries:
                              type: array
                              description: The institution's supported countries
                              items:
                                type: string
                                maxLength: 2
                                minLength: 2
                                pattern: ^[A-Z]+$
                                enum:
                                  - GB
                                  - AT
                                  - BE
                                  - BG
                                  - HR
                                  - CY
                                  - CZ
                                  - DK
                                  - EE
                                  - FI
                                  - FR
                                  - DE
                                  - GI
                                  - GR
                                  - HU
                                  - IS
                                  - IE
                                  - IT
                                  - LV
                                  - LI
                                  - LT
                                  - LU
                                  - MT
                                  - NL
                                  - 'NO'
                                  - PL
                                  - PT
                                  - RO
                                  - SK
                                  - SI
                                  - ES
                                  - SE
                            images:
                              type: object
                              description: >-
                                The images that should be used when displaying
                                the institution
                              properties:
                                icon:
                                  type: string
                                logo:
                                  type: string
                            info:
                              type: object
                              properties:
                                loginUrl:
                                  type: string
                                helplinePhoneNumber:
                                  type: string
                        consent:
                          type: object
                          required:
                            - expiresAt
                            - expiresIn
                            - status
                          properties:
                            expiresAt:
                              type: string
                              format: date-time
                            expiresIn:
                              type: integer
                            status:
                              type: string
                              enum:
                                - ACTIVE
                                - EXPIRED
                                - REVOKED
                        status:
                          type: string
                          description: >
                            The status of the linked account. The status can be
                            one of the following:


                            - `PENDING_CHALLENGE`: The Linked Account is pending
                            challenge

                            - `PENDING_VERIFICATION`: The Linked Account is
                            pending the completion of the required verification
                            steps

                            - `PENDING_FUNDING`: Awaiting a wire transfer as
                            part of the verification process when adding an
                            account without Open Banking

                            - `REJECTED`: The Linked Account did not pass one or
                            more verification steps and is not eligible for use

                            - `LINKED`: The linked account is linked and ready
                            for use

                            - `UNLINKED`: The linked account is not linked and
                            cannot be used
                          enum:
                            - LINKED
                            - UNLINKED
                            - PENDING_CHALLENGE
                            - PENDING_FUNDING
                            - PENDING_VERIFICATION
                            - REJECTED
                        friendlyName:
                          type: string
                          maxLength: 80
                          description: A user-friendly name for the linked account
                  count:
                    type: integer
                    description: The total number of records (excluding the paging limit).
                    format: int32
                  responseCount:
                    type: integer
                    description: >-
                      The total number of records returned in this response
                      (always capped at 100).
                    format: int32
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/linked_accounts/{linked_account_id}:
    get:
      operationId: getLinkedAccountsId
      summary: Get Linked account
      description: >-
        Retrieves a linked account of the buyer that the logged-in user belongs
        to.



        Required user role: `CONTROLLER`
      tags:
        - Linked Accounts
      parameters:
        - name: linked_account_id
          in: path
          required: true
          description: The unique identifier of the linked account.
          schema:
            type: string
            readOnly: true
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - accountIdentification
                  - currency
                  - institution
                  - consent
                  - status
                properties:
                  id:
                    description: The unique identifier of the linked account
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                    example: 652d25b73541d8084a88a38d
                  accountIdentification:
                    description: >-
                      The bank details that uniquely identify the account on the
                      banking systems.
                    oneOf:
                      - title: FasterPaymentsBankDetails
                        required:
                          - accountNumber
                          - sortCode
                        type: object
                        description: >-
                          Bank details used in case the wire transfer is
                          executed over Faster Payments.
                        properties:
                          accountNumber:
                            type: string
                            minLength: 8
                            maxLength: 8
                            pattern: ^[0-9]{8}$
                            description: >-
                              Account number, required for wire transfer over
                              Faster Payments.
                          sortCode:
                            type: string
                            minLength: 6
                            maxLength: 6
                            pattern: ^[0-9]{6}$
                            description: >-
                              Sort code, required for wire transfer over Faster
                              Payments.
                          secondaryReference:
                            type: string
                            description: Secondary reference data if applicable.
                      - title: SepaBankDetails
                        required:
                          - iban
                        type: object
                        description: >-
                          Bank details used in case the wire transfer is
                          executed over SEPA.
                        properties:
                          iban:
                            type: string
                            minLength: 15
                            maxLength: 34
                            pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                            description: >-
                              International Bank Account Number, required for
                              wire transfer over SEPA.
                          bankIdentifierCode:
                            type: string
                            minLength: 8
                            maxLength: 11
                            pattern: >-
                              ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                            description: BIC, for wire transfer over SEPA.
                  currency:
                    type: string
                    description: The primary currency associated with the account
                    maxLength: 3
                    minLength: 3
                    enum:
                      - GBP
                      - EUR
                  institution:
                    type: object
                    required:
                      - countries
                    properties:
                      displayName:
                        description: >-
                          The name to be used when displaying the institution to
                          users on user interfaces
                        type: string
                      countries:
                        type: array
                        description: The institution's supported countries
                        items:
                          type: string
                          maxLength: 2
                          minLength: 2
                          pattern: ^[A-Z]+$
                          enum:
                            - GB
                            - AT
                            - BE
                            - BG
                            - HR
                            - CY
                            - CZ
                            - DK
                            - EE
                            - FI
                            - FR
                            - DE
                            - GI
                            - GR
                            - HU
                            - IS
                            - IE
                            - IT
                            - LV
                            - LI
                            - LT
                            - LU
                            - MT
                            - NL
                            - 'NO'
                            - PL
                            - PT
                            - RO
                            - SK
                            - SI
                            - ES
                            - SE
                      images:
                        type: object
                        description: >-
                          The images that should be used when displaying the
                          institution
                        properties:
                          icon:
                            type: string
                          logo:
                            type: string
                      info:
                        type: object
                        properties:
                          loginUrl:
                            type: string
                          helplinePhoneNumber:
                            type: string
                  consent:
                    type: object
                    required:
                      - expiresAt
                      - expiresIn
                      - status
                    properties:
                      expiresAt:
                        type: string
                        format: date-time
                      expiresIn:
                        type: integer
                      status:
                        type: string
                        enum:
                          - ACTIVE
                          - EXPIRED
                          - REVOKED
                  status:
                    type: string
                    description: >
                      The status of the linked account. The status can be one of
                      the following:


                      - `PENDING_CHALLENGE`: The Linked Account is pending
                      challenge

                      - `PENDING_VERIFICATION`: The Linked Account is pending
                      the completion of the required verification steps

                      - `PENDING_FUNDING`: Awaiting a wire transfer as part of
                      the verification process when adding an account without
                      Open Banking

                      - `REJECTED`: The Linked Account did not pass one or more
                      verification steps and is not eligible for use

                      - `LINKED`: The linked account is linked and ready for use

                      - `UNLINKED`: The linked account is not linked and cannot
                      be used
                    enum:
                      - LINKED
                      - UNLINKED
                      - PENDING_CHALLENGE
                      - PENDING_FUNDING
                      - PENDING_VERIFICATION
                      - REJECTED
                  friendlyName:
                    type: string
                    maxLength: 80
                    description: A user-friendly name for the linked account
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    patch:
      operationId: patchLinkedAccountsId
      summary: Update a linked account
      description: |-
        Updates properties of a linked account such as friendly name.

        Required user role: `CONTROLLER`
      tags:
        - Linked Accounts
      parameters:
        - name: linked_account_id
          in: path
          required: true
          description: The unique identifier of the linked account.
          schema:
            type: string
            readOnly: true
            pattern: ^[0-9a-fA-F]{24}$
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                friendlyName:
                  type: string
                  maxLength: 80
                  nullable: false
                  description: >-
                    A user-friendly name for the linked account. Allows special
                    characters. Max 80 characters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - accountIdentification
                  - currency
                  - institution
                  - consent
                  - status
                properties:
                  id:
                    description: The unique identifier of the linked account
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                    example: 652d25b73541d8084a88a38d
                  accountIdentification:
                    description: >-
                      The bank details that uniquely identify the account on the
                      banking systems.
                    oneOf:
                      - title: FasterPaymentsBankDetails
                        required:
                          - accountNumber
                          - sortCode
                        type: object
                        description: >-
                          Bank details used in case the wire transfer is
                          executed over Faster Payments.
                        properties:
                          accountNumber:
                            type: string
                            minLength: 8
                            maxLength: 8
                            pattern: ^[0-9]{8}$
                            description: >-
                              Account number, required for wire transfer over
                              Faster Payments.
                          sortCode:
                            type: string
                            minLength: 6
                            maxLength: 6
                            pattern: ^[0-9]{6}$
                            description: >-
                              Sort code, required for wire transfer over Faster
                              Payments.
                          secondaryReference:
                            type: string
                            description: Secondary reference data if applicable.
                      - title: SepaBankDetails
                        required:
                          - iban
                        type: object
                        description: >-
                          Bank details used in case the wire transfer is
                          executed over SEPA.
                        properties:
                          iban:
                            type: string
                            minLength: 15
                            maxLength: 34
                            pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                            description: >-
                              International Bank Account Number, required for
                              wire transfer over SEPA.
                          bankIdentifierCode:
                            type: string
                            minLength: 8
                            maxLength: 11
                            pattern: >-
                              ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                            description: BIC, for wire transfer over SEPA.
                  currency:
                    type: string
                    description: The primary currency associated with the account
                    maxLength: 3
                    minLength: 3
                    enum:
                      - GBP
                      - EUR
                  institution:
                    type: object
                    required:
                      - countries
                    properties:
                      displayName:
                        description: >-
                          The name to be used when displaying the institution to
                          users on user interfaces
                        type: string
                      countries:
                        type: array
                        description: The institution's supported countries
                        items:
                          type: string
                          maxLength: 2
                          minLength: 2
                          pattern: ^[A-Z]+$
                          enum:
                            - GB
                            - AT
                            - BE
                            - BG
                            - HR
                            - CY
                            - CZ
                            - DK
                            - EE
                            - FI
                            - FR
                            - DE
                            - GI
                            - GR
                            - HU
                            - IS
                            - IE
                            - IT
                            - LV
                            - LI
                            - LT
                            - LU
                            - MT
                            - NL
                            - 'NO'
                            - PL
                            - PT
                            - RO
                            - SK
                            - SI
                            - ES
                            - SE
                      images:
                        type: object
                        description: >-
                          The images that should be used when displaying the
                          institution
                        properties:
                          icon:
                            type: string
                          logo:
                            type: string
                      info:
                        type: object
                        properties:
                          loginUrl:
                            type: string
                          helplinePhoneNumber:
                            type: string
                  consent:
                    type: object
                    required:
                      - expiresAt
                      - expiresIn
                      - status
                    properties:
                      expiresAt:
                        type: string
                        format: date-time
                      expiresIn:
                        type: integer
                      status:
                        type: string
                        enum:
                          - ACTIVE
                          - EXPIRED
                          - REVOKED
                  status:
                    type: string
                    description: >
                      The status of the linked account. The status can be one of
                      the following:


                      - `PENDING_CHALLENGE`: The Linked Account is pending
                      challenge

                      - `PENDING_VERIFICATION`: The Linked Account is pending
                      the completion of the required verification steps

                      - `PENDING_FUNDING`: Awaiting a wire transfer as part of
                      the verification process when adding an account without
                      Open Banking

                      - `REJECTED`: The Linked Account did not pass one or more
                      verification steps and is not eligible for use

                      - `LINKED`: The linked account is linked and ready for use

                      - `UNLINKED`: The linked account is not linked and cannot
                      be used
                    enum:
                      - LINKED
                      - UNLINKED
                      - PENDING_CHALLENGE
                      - PENDING_FUNDING
                      - PENDING_VERIFICATION
                      - REJECTED
                  friendlyName:
                    type: string
                    maxLength: 80
                    description: A user-friendly name for the linked account
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
                      - LINKED_ACCOUNT_INVALID_STATE
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/linked_accounts/{linked_account_id}/unlink:
    post:
      operationId: unlinkLinkedAccountsId
      summary: Unlink a linked account
      description: >-
        Unlinks a linked account identified by the `linked_account_id`.


        This action is not reversible and if the buyer wants to use this linked
        account again to fund payment runs, they will have to re-link the
        account. More information on how to link an account can be found
        [here](https://docs.weavr.io/payment-run/instruments/link-account/).


        Details of an unlinked account, can still be retrieved via the [Get
        linked accounts](#operation/getLinkedAccounts) and [Get linked
        account](#operation/getLinkedAccountsId) endpoints.



        Required user role: `CONTROLLER`
      tags:
        - Linked Accounts
      parameters:
        - name: linked_account_id
          in: path
          required: true
          description: The unique identifier of the linked account.
          schema:
            type: string
            readOnly: true
            pattern: ^[0-9a-fA-F]{24}$
        - in: header
          name: idempotency-ref
          description: >-
            A unique call reference generated by the caller that, taking into
            consideration the payload as well as the operation itself, helps
            avoid duplicate operations. Idempotency reference uniqueness is
            maintained for at least 24 hours.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - accountIdentification
                  - currency
                  - institution
                  - consent
                  - status
                properties:
                  id:
                    description: The unique identifier of the linked account
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                    example: 652d25b73541d8084a88a38d
                  accountIdentification:
                    description: >-
                      The bank details that uniquely identify the account on the
                      banking systems.
                    oneOf:
                      - title: FasterPaymentsBankDetails
                        required:
                          - accountNumber
                          - sortCode
                        type: object
                        description: >-
                          Bank details used in case the wire transfer is
                          executed over Faster Payments.
                        properties:
                          accountNumber:
                            type: string
                            minLength: 8
                            maxLength: 8
                            pattern: ^[0-9]{8}$
                            description: >-
                              Account number, required for wire transfer over
                              Faster Payments.
                          sortCode:
                            type: string
                            minLength: 6
                            maxLength: 6
                            pattern: ^[0-9]{6}$
                            description: >-
                              Sort code, required for wire transfer over Faster
                              Payments.
                          secondaryReference:
                            type: string
                            description: Secondary reference data if applicable.
                      - title: SepaBankDetails
                        required:
                          - iban
                        type: object
                        description: >-
                          Bank details used in case the wire transfer is
                          executed over SEPA.
                        properties:
                          iban:
                            type: string
                            minLength: 15
                            maxLength: 34
                            pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                            description: >-
                              International Bank Account Number, required for
                              wire transfer over SEPA.
                          bankIdentifierCode:
                            type: string
                            minLength: 8
                            maxLength: 11
                            pattern: >-
                              ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                            description: BIC, for wire transfer over SEPA.
                  currency:
                    type: string
                    description: The primary currency associated with the account
                    maxLength: 3
                    minLength: 3
                    enum:
                      - GBP
                      - EUR
                  institution:
                    type: object
                    required:
                      - countries
                    properties:
                      displayName:
                        description: >-
                          The name to be used when displaying the institution to
                          users on user interfaces
                        type: string
                      countries:
                        type: array
                        description: The institution's supported countries
                        items:
                          type: string
                          maxLength: 2
                          minLength: 2
                          pattern: ^[A-Z]+$
                          enum:
                            - GB
                            - AT
                            - BE
                            - BG
                            - HR
                            - CY
                            - CZ
                            - DK
                            - EE
                            - FI
                            - FR
                            - DE
                            - GI
                            - GR
                            - HU
                            - IS
                            - IE
                            - IT
                            - LV
                            - LI
                            - LT
                            - LU
                            - MT
                            - NL
                            - 'NO'
                            - PL
                            - PT
                            - RO
                            - SK
                            - SI
                            - ES
                            - SE
                      images:
                        type: object
                        description: >-
                          The images that should be used when displaying the
                          institution
                        properties:
                          icon:
                            type: string
                          logo:
                            type: string
                      info:
                        type: object
                        properties:
                          loginUrl:
                            type: string
                          helplinePhoneNumber:
                            type: string
                  consent:
                    type: object
                    required:
                      - expiresAt
                      - expiresIn
                      - status
                    properties:
                      expiresAt:
                        type: string
                        format: date-time
                      expiresIn:
                        type: integer
                      status:
                        type: string
                        enum:
                          - ACTIVE
                          - EXPIRED
                          - REVOKED
                  status:
                    type: string
                    description: >
                      The status of the linked account. The status can be one of
                      the following:


                      - `PENDING_CHALLENGE`: The Linked Account is pending
                      challenge

                      - `PENDING_VERIFICATION`: The Linked Account is pending
                      the completion of the required verification steps

                      - `PENDING_FUNDING`: Awaiting a wire transfer as part of
                      the verification process when adding an account without
                      Open Banking

                      - `REJECTED`: The Linked Account did not pass one or more
                      verification steps and is not eligible for use

                      - `LINKED`: The linked account is linked and ready for use

                      - `UNLINKED`: The linked account is not linked and cannot
                      be used
                    enum:
                      - LINKED
                      - UNLINKED
                      - PENDING_CHALLENGE
                      - PENDING_FUNDING
                      - PENDING_VERIFICATION
                      - REJECTED
                  friendlyName:
                    type: string
                    maxLength: 80
                    description: A user-friendly name for the linked account
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - IDEMPOTENT_REQUEST_IN_PROGRESS
                      - LINKED_ACCOUNT_INVALID_STATE
        '413':
          description: Content Too Large
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /v1/institutions:
    get:
      operationId: getInstitutions
      summary: Get Institutions
      description: >
        Retrieves the `Institutions` supported by Embedded Payment Run. The
        response payload should list all the institutions.


        Payment runs are funded from linked bank accounts provided by one of the
        supported institutions.


        We recommend that you enable Buyers to check if their banks are
        supported before they start the registration and onboarding process.
      tags:
        - Institutions
      security:
        - apiKey: []
      parameters:
        - in: query
          name: country
          required: false
          description: Filter by country
          schema:
            type: string
        - in: query
          name: institutionIds
          required: false
          description: Filter by institution ID
          schema:
            type: array
            items:
              type: string
        - in: query
          name: institutionName
          required: false
          description: Filter by institution name
          schema:
            type: string
        - in: query
          name: market
          required: false
          description: Filter by market
          schema:
            type: array
            items:
              type: string
              enum:
                - EEA
                - UK
        - in: query
          name: offset
          required: false
          schema:
            type: integer
            minimum: 0
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    required:
                      - institutions
                    properties:
                      institutions:
                        type: array
                        items:
                          type: object
                          title: Institution
                          required:
                            - id
                            - countries
                          properties:
                            id:
                              type: string
                            displayName:
                              type: string
                            markets:
                              type: array
                              items:
                                type: string
                                enum:
                                  - EEA
                                  - UK
                            currencies:
                              type: array
                              items:
                                type: string
                                enum:
                                  - GBP
                                  - EUR
                            countries:
                              type: array
                              items:
                                enum:
                                  - GB
                                  - AT
                                  - BE
                                  - BG
                                  - HR
                                  - CY
                                  - CZ
                                  - DK
                                  - EE
                                  - FI
                                  - FR
                                  - DE
                                  - GI
                                  - GR
                                  - HU
                                  - IS
                                  - IE
                                  - IT
                                  - LV
                                  - LI
                                  - LT
                                  - LU
                                  - MT
                                  - NL
                                  - 'NO'
                                  - PL
                                  - PT
                                  - RO
                                  - SK
                                  - SI
                                  - ES
                                  - SE
                            images:
                              type: object
                              properties:
                                logo:
                                  type: string
                                  format: uri
                                icon:
                                  type: string
                                  format: uri
                  - type: object
                    title: PaginationFields
                    properties:
                      count:
                        type: integer
                        description: >-
                          The total number of records (excluding the paging
                          limit)
                        example: 10
                      responseCount:
                        type: integer
                        description: >-
                          The total number of records returned in this response
                          (always capped at 100).
                        example: 100
                    required:
                      - count
                      - responseCount
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /simulate/v1/payment_runs/{payment_run_id}/fund_group/{reference}:
    post:
      x-sandbox-only: true
      operationId: postFundPaymentRunGroup
      summary: Simulate Fund a Payment run
      description: >
        Simulate funding a payment run using a linked account.


        *This endpoint will only function in Sandbox and should not be used in
        the Live environment.*
      tags:
        - Simulator
      security:
        - apiKey: []
      parameters:
        - name: payment_run_id
          in: path
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{24}$
            type: string
        - name: reference
          in: path
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Success
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - BUYER_ID_INVALID
                      - UNSUPPORTED_CURRENCY
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /simulate/v1/linked_accounts:
    post:
      x-sandbox-only: true
      operationId: postLinkedAccounts
      summary: Simulate Creating a Linked Account via Open Banking
      description: >
        The Linked Account Simulator allows you to create a simulated linked
        account that can be used for funding payment runs.


        *This endpoint will only function in Sandbox and should not be used in
        the Live environment.*
      tags:
        - Simulator
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - buyerId
                - accountIdentification
              properties:
                institutionId:
                  type: string
                  deprecated: true
                buyerId:
                  type: string
                createdBy:
                  type: string
                  deprecated: true
                accountIdentification:
                  description: >-
                    The bank details that uniquely identify the account on the
                    banking systems.
                  oneOf:
                    - title: FasterPaymentsBankDetails
                      required:
                        - accountNumber
                        - sortCode
                      type: object
                      description: >-
                        Bank details used in case the wire transfer is executed
                        over Faster Payments.
                      properties:
                        accountNumber:
                          type: string
                          minLength: 8
                          maxLength: 8
                          pattern: ^[0-9]{8}$
                          description: >-
                            Account number, required for wire transfer over
                            Faster Payments.
                        sortCode:
                          type: string
                          minLength: 6
                          maxLength: 6
                          pattern: ^[0-9]{6}$
                          description: >-
                            Sort code, required for wire transfer over Faster
                            Payments.
                        secondaryReference:
                          type: string
                          description: Secondary reference data if applicable.
                    - title: SepaBankDetails
                      required:
                        - iban
                      type: object
                      description: >-
                        Bank details used in case the wire transfer is executed
                        over SEPA.
                      properties:
                        iban:
                          type: string
                          minLength: 15
                          maxLength: 34
                          pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                          description: >-
                            International Bank Account Number, required for wire
                            transfer over SEPA.
                        bankIdentifierCode:
                          type: string
                          minLength: 8
                          maxLength: 11
                          pattern: >-
                            ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                          description: BIC, for wire transfer over SEPA.
                currency:
                  type: string
                  description: The currency expressed in ISO-4217 code.
                  maxLength: 3
                  minLength: 3
                  enum:
                    - GBP
                    - EUR
                  deprecated: true
                  default: GBP
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    required:
                      - id
                      - accountIdentification
                      - currency
                      - institution
                      - consent
                      - status
                    properties:
                      id:
                        description: The unique identifier of the linked account
                        type: string
                        pattern: ^[0-9a-fA-F]{24}$
                        example: 652d25b73541d8084a88a38d
                      accountIdentification:
                        description: >-
                          The bank details that uniquely identify the account on
                          the banking systems.
                        oneOf:
                          - title: FasterPaymentsBankDetails
                            required:
                              - accountNumber
                              - sortCode
                            type: object
                            description: >-
                              Bank details used in case the wire transfer is
                              executed over Faster Payments.
                            properties:
                              accountNumber:
                                type: string
                                minLength: 8
                                maxLength: 8
                                pattern: ^[0-9]{8}$
                                description: >-
                                  Account number, required for wire transfer
                                  over Faster Payments.
                              sortCode:
                                type: string
                                minLength: 6
                                maxLength: 6
                                pattern: ^[0-9]{6}$
                                description: >-
                                  Sort code, required for wire transfer over
                                  Faster Payments.
                              secondaryReference:
                                type: string
                                description: Secondary reference data if applicable.
                          - title: SepaBankDetails
                            required:
                              - iban
                            type: object
                            description: >-
                              Bank details used in case the wire transfer is
                              executed over SEPA.
                            properties:
                              iban:
                                type: string
                                minLength: 15
                                maxLength: 34
                                pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                description: >-
                                  International Bank Account Number, required
                                  for wire transfer over SEPA.
                              bankIdentifierCode:
                                type: string
                                minLength: 8
                                maxLength: 11
                                pattern: >-
                                  ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                description: BIC, for wire transfer over SEPA.
                      currency:
                        type: string
                        description: The primary currency associated with the account
                        maxLength: 3
                        minLength: 3
                        enum:
                          - GBP
                          - EUR
                      institution:
                        type: object
                        required:
                          - countries
                        properties:
                          displayName:
                            description: >-
                              The name to be used when displaying the
                              institution to users on user interfaces
                            type: string
                          countries:
                            type: array
                            description: The institution's supported countries
                            items:
                              type: string
                              maxLength: 2
                              minLength: 2
                              pattern: ^[A-Z]+$
                              enum:
                                - GB
                                - AT
                                - BE
                                - BG
                                - HR
                                - CY
                                - CZ
                                - DK
                                - EE
                                - FI
                                - FR
                                - DE
                                - GI
                                - GR
                                - HU
                                - IS
                                - IE
                                - IT
                                - LV
                                - LI
                                - LT
                                - LU
                                - MT
                                - NL
                                - 'NO'
                                - PL
                                - PT
                                - RO
                                - SK
                                - SI
                                - ES
                                - SE
                          images:
                            type: object
                            description: >-
                              The images that should be used when displaying the
                              institution
                            properties:
                              icon:
                                type: string
                              logo:
                                type: string
                          info:
                            type: object
                            properties:
                              loginUrl:
                                type: string
                              helplinePhoneNumber:
                                type: string
                      consent:
                        type: object
                        required:
                          - expiresAt
                          - expiresIn
                          - status
                        properties:
                          expiresAt:
                            type: string
                            format: date-time
                          expiresIn:
                            type: integer
                          status:
                            type: string
                            enum:
                              - ACTIVE
                              - EXPIRED
                              - REVOKED
                      status:
                        type: string
                        description: >
                          The status of the linked account. The status can be
                          one of the following:


                          - `PENDING_CHALLENGE`: The Linked Account is pending
                          challenge

                          - `PENDING_VERIFICATION`: The Linked Account is
                          pending the completion of the required verification
                          steps

                          - `PENDING_FUNDING`: Awaiting a wire transfer as part
                          of the verification process when adding an account
                          without Open Banking

                          - `REJECTED`: The Linked Account did not pass one or
                          more verification steps and is not eligible for use

                          - `LINKED`: The linked account is linked and ready for
                          use

                          - `UNLINKED`: The linked account is not linked and
                          cannot be used
                        enum:
                          - LINKED
                          - UNLINKED
                          - PENDING_CHALLENGE
                          - PENDING_FUNDING
                          - PENDING_VERIFICATION
                          - REJECTED
                      friendlyName:
                        type: string
                        maxLength: 80
                        description: A user-friendly name for the linked account
                  - type: object
                    properties:
                      createdAt:
                        type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - BUYER_ID_INVALID
                      - UNSUPPORTED_CURRENCY
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /simulate/v1/consents/{consent_id}/extend:
    post:
      operationId: postSimulateConsentExtension
      summary: Simulate Extend AIS consent
      description: Simulate Extend AIS consent
      x-sandbox-only: true
      tags:
        - Simulator Linked accounts
      parameters:
        - in: path
          name: consent_id
          required: true
          schema:
            type: string
      security:
        - apiKey: []
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - CONSENT_EXPIRED
                      - LINKED_ACCOUNT_NOT_FOUND
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /simulate/v1/linked_accounts/{linked_account_id}:
    delete:
      operationId: deleteLinkedAccount
      summary: Simulate Delete linked account
      description: Simulate deletion of a linked account
      tags:
        - Simulator Linked accounts
      parameters:
        - name: linked_account_id
          in: path
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{24}$
            type: string
      security:
        - apiKey: []
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - LINKED_ACCOUNT_ID_INVALID
                      - STATE_INVALID
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /simulate/v1/linked_accounts/{linked_account_id}/fund:
    post:
      operationId: postSimulateLinkedAccountFundVerification
      summary: Simulate Control Check via Test Funding Transaction
      description: Simulate Control Check via Test Funding Transaction
      tags:
        - Simulator
      parameters:
        - name: linked_account_id
          in: path
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{24}$
            type: string
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - STATE_INVALID
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /simulate/v1/buyers/{buyer_id}/verify:
    post:
      operationId: verifyBuyerKyb
      summary: Simulate Buyer KYB Verify
      description: >
        Simulates due diligence (KYB) for Buyers.


        *This endpoint will only function in Sandbox and should not be used in
        the Live environment.*
      x-sandbox-only: true
      tags:
        - Simulator
      parameters:
        - name: buyer_id
          in: path
          required: true
          schema:
            type: string
      security:
        - apiKey: []
      responses:
        '204':
          description: Success - No Content.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /simulate/v1/consents/{linked_account_id}/change_status:
    post:
      operationId: postSimulateConsentStatusChange
      summary: Simulate AIS consent status change
      description: >
        Simulate AIS consent status change.


        *This endpoint will only function in Sandbox and should not be used in
        the Live environment.*
      x-sandbox-only: true
      tags:
        - Simulator
      parameters:
        - name: linked_account_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - action
              properties:
                action:
                  type: string
                  enum:
                    - REVOKED
                    - EXPIRED
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - LINKED_ACCOUNT_NOT_FOUND
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /simulate/v1/payment_run_sca/{payment_run_id}/challenges/otp/{channel}:
    post:
      operationId: issuePaymentRunChallengeSimulate
      summary: Simulate issuing a Payment Run SCA Challenge
      description: >
        Simulates issuing the SCA challenge for a payment run.


        *This endpoint will only function in Sandbox and should not be used in
        the Live environment.*
      x-sandbox-only: true
      tags:
        - Simulator
      parameters:
        - name: channel
          in: path
          required: true
          description: The unique identifier for the channel.
          schema:
            type: string
            enum:
              - SMS
            description: '- "SMS": The one-time-password is sent as a text message'
        - in: path
          name: payment_run_id
          required: true
          description: The unique identifier for the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    description: >
                      - `STATE_INVALID` - The operation no longer requires
                      additional verification, it was either cancelled or
                      completed.

                      - `CHANNEL_NOT_SUPPORTED` - The channel selected cannot be
                      used to verify this type of operation.

                      - `CHANNEL_NOT_REGISTERED` - The channel selected must be
                      enrolled to receive one-time passwords before it can be
                      used to verify this type of operation.
                    type: string
                    enum:
                      - STATE_INVALID
                      - CHANNEL_NOT_SUPPORTED
                      - CHANNEL_NOT_REGISTERED
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
  /simulate/v1/payment_run_sca/{payment_run_id}/challenges/otp/{channel}/verify:
    post:
      operationId: verifyPaymentRunChallengeSimulate
      summary: Simulate verifying a payment run SCA Challenge
      description: >
        Simulates verifying the SCA challenge for a payment run.


        *This endpoint will only function in Sandbox and should not be used in
        the Live environment.*
      x-sandbox-only: true
      tags:
        - Simulator
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - verificationCode
              properties:
                verificationCode:
                  type: string
                  minLength: 1
      parameters:
        - name: channel
          in: path
          required: true
          description: The unique identifier for the channel.
          schema:
            type: string
            enum:
              - SMS
            description: '- "SMS": The one-time-password is sent as a text message'
        - in: path
          name: payment_run_id
          required: true
          description: The unique identifier for the payment run.
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request Error - Your request is invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    maxLength: 255
                    type: string
                    description: When present helps to identify and fix the problem.
                  syntaxErrors:
                    type: object
                    description: >-
                      Is returned as part of an HTTP error response whenever a
                      syntax error is detected. A list of the fields together
                      with their syntax error will be provided.
                    properties:
                      invalidFields:
                        type: array
                        items:
                          type: object
                          properties:
                            params:
                              type: array
                              items:
                                type: string
                            fieldName:
                              type: string
                            error:
                              type: string
                              enum:
                                - REQUIRED
                                - HAS_TEXT
                                - REQUIRES
                                - SIZE
                                - RANGE
                                - IN
                                - NOT_IN
                                - REGEX
                                - EXACTLY
                                - AT_LEAST
                                - AT_MOST
                                - ALL_OR_NONE
        '401':
          description: Unauthorized - Your credentials or access token are invalid.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '403':
          description: Forbidden - Access to the requested resource or action is forbidden.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - INSUFFICIENT_PERMISSIONS
        '404':
          description: Not found - The requested resource couldn't be found.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  errorCode:
                    type: string
                    enum:
                      - STATE_INVALID
                      - CHANNEL_NOT_SUPPORTED
                      - CHANNEL_NOT_REGISTERED
                      - VERIFICATION_CODE_EXPIRED
                      - VERIFICATION_CODE_INVALID
                      - PAYMENT_RUN_SCA_CHALLENGE_VERIFY_FAILED
                      - ONE_CHALLENGE_LIMIT_REMAINING
                      - CHALLENGE_LIMIT_EXCEEDED
        '429':
          description: Too many requests.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
            x-ratelimit-limit:
              description: >
                Example: `20, 10;w=60, 20;w=3600, 200;w=86400`

                The first number (20) is the limit that has been exceeded.

                The remaining numbers are the limits that are in force, with 'w'
                meaning 'window in seconds'. In this example `20;w=3600` was
                exceeded. 20 calls in 3600secs (1hr)
              required: true
              schema:
                type: string
            x-ratelimit-reset:
              description: The number of seconds until the window is reset.
              required: true
              schema:
                minimum: 0
                type: integer
                format: int32
        '500':
          description: >-
            Internal Server Error - There is a problem with the server. Please
            try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        '503':
          description: >-
            Service Unavailable - We're temporarily offline for maintenance.
            Please try again later.
          headers:
            request-ref:
              description: >-
                A request identifier. Providing this reference when contacting
                our support team will help us investigate your query.
              required: true
              schema:
                type: string
        default:
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
x-webhooks:
  buyerKYBWatch:
    post:
      summary: Buyer KYB status update
      description: Notification that the KYB status of a buyer identity has been updated.
      operationId: webhook_buyer_kyb_watch
      security: []
      tags:
        - Buyers Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - buyerKYBWatch
                payload:
                  type: object
                  properties:
                    buyerId:
                      type: string
                      pattern: ^[0-9]+$
                      description: Id of the buyer.
                    status:
                      type: string
                      enum:
                        - NOT_STARTED
                        - INITIATED
                        - PENDING_REVIEW
                        - APPROVED
                        - REJECTED
                      description: Effective KYB status of the buyer.
                    details:
                      type: array
                      description: >-
                        Action which my be required to re-process kyb in case of
                        temporary rejections.
                      items:
                        type: string
                        enum:
                          - BUYER_DETAILS_UNSATISFACTORY
                          - ADMIN_USER_UNMATCHED_TO_DIRECTOR_OR_REPRESENTATIVE
                          - UNDEFINED_REQUIRED_INTERVENTION
                          - DOCUMENTS_UNSATISFACTORY
                          - SUPPLIED_DATA_AND_DOCUMENTS_MISMATCH
                          - LANGUAGE_IN_DOCUMENTS_UNSUPPORTED
                          - SELFIE_UNSATISFACTORY
                          - SELFIE_AND_DOCUMENTS_MISMATCH
                          - BENEFICIARY_DETAILS_UNSATISFACTORY
                          - REPRESENTATIVE_DETAILS_UNSATISFACTORY
                          - OTHER
                          - UNSUPPORTED_COUNTRY
                          - EXPIRED_KYC_DOCUMENTS
                    rejectionComment:
                      type: string
                      description: Reason shown to the user in case of temporary rejection.
                    ongoingStatus:
                      type: string
                      enum:
                        - NOT_STARTED
                        - INITIATED
                        - PENDING_REVIEW
                        - APPROVED
                        - REJECTED
                      description: Ongoing KYB Status of the buyer.
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  buyerBeneficiaryStatusWatch:
    post:
      summary: Buyer Beneficiary status update
      description: >-
        Notification that the verification status of a buyer beneficiary has
        been updated.
      operationId: webhook_buyer_beneficiary_kyb_watch
      security: []
      tags:
        - Buyers Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - buyerBeneficiaryStatusWatch
                payload:
                  type: object
                  properties:
                    event:
                      type: array
                      description: >
                        The event that triggered this webhook notification. The
                        event

                        is structured to describe the parameter that has
                        triggered the event followed

                        by the action that occurred.
                      items:
                        type: string
                        enum:
                          - STATUS_UPDATED
                          - BENEFICIARY_TYPE_UPDATED
                          - FIRST_NAME_UPDATED
                          - MIDDLE_NAME_UPDATED
                          - LAST_NAME_UPDATED
                          - EMAIL_UPDATED
                    eventDetails:
                      type: array
                      description: >-
                        A reason, if any, describing why this event has
                        occurred.
                      items:
                        type: string
                        enum:
                          - BUYER_DETAILS_UNSATISFACTORY
                          - ADMIN_USER_UNMATCHED_TO_DIRECTOR_OR_REPRESENTATIVE
                          - UNDEFINED_REQUIRED_INTERVENTION
                          - DOCUMENTS_UNSATISFACTORY
                          - SUPPLIED_DATA_AND_DOCUMENTS_MISMATCH
                          - LANGUAGE_IN_DOCUMENTS_UNSUPPORTED
                          - SELFIE_UNSATISFACTORY
                          - SELFIE_AND_DOCUMENTS_MISMATCH
                          - BENEFICIARY_DETAILS_UNSATISFACTORY
                          - REPRESENTATIVE_DETAILS_UNSATISFACTORY
                          - OTHER
                          - UNSUPPORTED_COUNTRY
                          - EXPIRED_KYC_DOCUMENTS
                    additionalInformation:
                      type: object
                      properties:
                        buyerId:
                          type: string
                          pattern: ^[0-9]+$
                          description: >-
                            The buyer id whose beneficiary has triggered this
                            event.
                        buyerName:
                          type: string
                          description: >-
                            The buyer name whose beneficiary has triggered this
                            event.
                        adminUserEmail:
                          type: string
                          description: The buyer's root user email.
                        kybStatus:
                          type: string
                          enum:
                            - NOT_STARTED
                            - INITIATED
                            - PENDING_REVIEW
                            - APPROVED
                            - REJECTED
                          description: >-
                            The status of the Full Company Verification Checks
                            for the buyer entity.
                        beneficiary:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - UNDEFINED_BENEFICIARY_TYPE
                                - UBO
                                - DIRECTOR
                                - UNKNOWN
                                - SHAREHOLDER
                                - PARTNER
                                - OTHER_DIRECTOR
                              description: Type of the beneficiary.
                            firstName:
                              type: string
                              description: First name of the beneficiary.
                            middleName:
                              type: string
                              description: Middle name of the beneficiary.
                            lastName:
                              type: string
                              description: Last name of the beneficiary.
                            email:
                              type: string
                              description: Email of the beneficiary.
                            status:
                              type: string
                              enum:
                                - NOT_STARTED
                                - INITIATED
                                - PENDING_REVIEW
                                - APPROVED
                                - REJECTED
                              description: Effective KYB Status of the beneficiary.
                            ongoingKybStatus:
                              type: string
                              enum:
                                - NOT_STARTED
                                - INITIATED
                                - PENDING_REVIEW
                                - APPROVED
                                - REJECTED
                              description: Ongoing KYB Status of the beneficiary.
                      description: >-
                        Additional information related to the event triggering
                        this notification.
                    rejectionComment:
                      type: string
                      description: Reason shown to the user in case of temporary rejection.
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  buyerWatch:
    post:
      summary: Buyer update
      description: Notification that a buyer has been updated.
      operationId: webhook_buyer_watch
      security: []
      tags:
        - Buyers Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - buyerActivatedWatch
                payload:
                  required:
                    - actionDoneBy
                    - buyerId
                    - supportedCurrencies
                  type: object
                  properties:
                    actionDoneBy:
                      type: string
                      enum:
                        - UNDEFINED
                        - ADMIN
                        - EMBEDDER
                    buyerId:
                      type: string
                    supportedCurrencies:
                      type: array
                      items:
                        type: object
                        required:
                          - currency
                          - status
                        properties:
                          currency:
                            type: string
                            description: The currency expressed in ISO-4217 code.
                            maxLength: 3
                            minLength: 3
                            enum:
                              - GBP
                              - EUR
                          status:
                            type: string
                            description: >
                              The status of the currency, which can include the
                              following values


                              * `PENDING_KYB_APPROVAL`: The buyer’s KYB process
                              is pending approval.

                              * `STEPUP_LOGIN_REQUIRED`: The buyer needs to
                              perform a stepped-up login for higher
                              authentication.

                              * `PENDING_CREATION`: Awaiting the setup
                              completion of the currency

                              * `ACTIVE`: The ZBA has been successfully created
                              and is ready for use.

                              * `UNAVAILABLE`: The currency is unavailable and
                              cannot be used.
                            enum:
                              - PENDING_KYB_APPROVAL
                              - STEPUP_LOGIN_REQUIRED
                              - PENDING_CREATION
                              - ACTIVE
                              - UNAVAILABLE
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  buyerDeactivatedWatch:
    post:
      summary: Buyer deactivation
      description: Notification that a buyer identity has been deactivated.
      operationId: webhook_buyer_deactivated_watch
      security: []
      tags:
        - Buyers Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - buyerDeactivatedWatch
                payload:
                  required:
                    - actionDoneBy
                    - buyerId
                    - reasonCode
                    - supportedCurrencies
                  type: object
                  properties:
                    actionDoneBy:
                      type: string
                      enum:
                        - UNDEFINED
                        - ADMIN
                        - EMBEDDER
                    buyerId:
                      type: string
                    reasonCode:
                      type: string
                      enum:
                        - UNDEFINED_REASON
                        - ACCOUNT_REVIEW
                        - ACCOUNT_SECURITY
                        - TEMPORARY
                        - ACCOUNT_CLOSURE
                        - ACCOUNT_ABANDONED
                    supportedCurrencies:
                      type: array
                      items:
                        type: object
                        required:
                          - currency
                          - status
                        properties:
                          currency:
                            type: string
                            description: The currency expressed in ISO-4217 code.
                            maxLength: 3
                            minLength: 3
                            enum:
                              - GBP
                              - EUR
                          status:
                            type: string
                            description: >
                              The status of the currency, which can include the
                              following values


                              * `PENDING_KYB_APPROVAL`: The buyer’s KYB process
                              is pending approval.

                              * `STEPUP_LOGIN_REQUIRED`: The buyer needs to
                              perform a stepped-up login for higher
                              authentication.

                              * `PENDING_CREATION`: Awaiting the setup
                              completion of the currency

                              * `ACTIVE`: The ZBA has been successfully created
                              and is ready for use.

                              * `UNAVAILABLE`: The currency is unavailable and
                              cannot be used.
                            enum:
                              - PENDING_KYB_APPROVAL
                              - STEPUP_LOGIN_REQUIRED
                              - PENDING_CREATION
                              - ACTIVE
                              - UNAVAILABLE
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  paymentRunWatch:
    post:
      description: Notification that the status of a Payment Run has been updated.
      summary: Payment Run Update
      operationId: webhookPaymentRunWatch
      security: []
      tags:
        - Payment runs Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        description: Payment run event triggered when the status changes
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - paymentRunWatch
                payload:
                  type: object
                  required:
                    - payments
                    - id
                    - status
                    - createdAt
                    - buyerId
                    - createdBy
                  title: PaymentRun
                  properties:
                    id:
                      type: string
                      pattern: ^[0-9a-fA-F]{24}$
                      readOnly: true
                    paymentRunRef:
                      type: string
                      description: >-
                        A unique identifier by which you identify the payment
                        run with on your system.
                      example: 94fddfb2-297d-423d-9157-4200b7beb834
                    tag:
                      type: string
                      description: >-
                        The tag field is a custom field that can be used to
                        search and filter.
                      maxLength: 50
                      pattern: ^[a-zA-Z0-9_-]+$
                    description:
                      type: string
                      description: The long form description of the payment run
                      example: September payment run 01
                    createdBy:
                      type: string
                      pattern: ^[0-9]+$
                      example: '110747174434373672'
                      readOnly: true
                    status:
                      type: string
                      enum:
                        - QUEUED
                        - CANCELLED
                        - COMPLETED
                        - COMPLETED_WITH_ERRORS
                        - EXECUTING
                        - INVALID
                        - PENDING_CHALLENGE
                        - PENDING_CONFIRMATION
                        - PENDING_FUNDING
                        - SCA_FAILED
                      example: PENDING_CONFIRMATION
                      description: >
                        The current status of the payment run.


                        - `QUEUED`: The payment run creation is an asynchronous
                        process. This status indicates that the payment run is
                        currently being validated

                        - `CANCELLED`: Payment run was manually cancelled

                        - `COMPLETED`: All payments have been executed
                        successfully

                        - `COMPLETED_WITH_ERRORS`: All payments have been
                        executed and some failed

                        - `EXECUTING`: Funds received, executing payments

                        - `INVALID`: Payment run is invalid

                        - `PENDING_CHALLENGE`: Waiting for the payment run to
                        complete the SCA challenge

                        - `PENDING_CONFIRMATION`: Payment run is pending
                        confirmation by a `CONTROLLER` user

                        - `PENDING_FUNDING`: Pending until the necessary funds
                        are initiated. Initiate the funding process via the
                        `/payment_runs/{id}/fund` endpoint

                        - `SCA_FAILED`: Payment run failed due to SCA either
                        expiring or max attempts reached. You can restart the
                        payment run by calling the `/payment_runs/{id}/restart`
                        endpoint
                      readOnly: true
                    statusReason:
                      type: string
                    payments:
                      type: array
                      items:
                        type: object
                        title: Payment
                        required:
                          - id
                          - status
                        allOf:
                          - type: object
                            properties:
                              id:
                                type: string
                                description: The unique identifier of the payment line
                                readOnly: true
                              status:
                                type: string
                                enum:
                                  - QUEUED
                                  - CANCELLED
                                  - COMPLETED
                                  - FAILED
                                  - PENDING_CHALLENGE
                                  - PENDING_CONFIRMATION
                                  - PENDING_FUNDING
                                  - RETURNED
                                  - AWAITING_FUNDS
                                  - EXECUTING
                                  - SCA_FAILED
                                description: >
                                  The status of the payment


                                  - `QUEUED`: The payment run creation is an
                                  asynchronous process. This status indicates
                                  that the payment run is currently being
                                  validated

                                  - `PENDING_CHALLENGE`: Waiting for the payment
                                  run to complete the SCA challenge

                                  - `PENDING_FUNDING`: Pending until the
                                  necessary funds are initiated. Initiate the
                                  funding process via the
                                  `/payment_runs/{id}/fund` endpoint

                                  - `AWAITING_FUNDS`: Waiting for the required
                                  funds to be available to execute payment

                                  - `EXECUTING`: Payment is being executed and
                                  awaiting final status confirmation

                                  - `COMPLETED`: Payment executed successfully

                                  - `FAILED`: Payment executed, but failed

                                  - `CANCELLED`: Payment cancelled, because
                                  payment run was cancelled

                                  - `PENDING_CONFIRMATION`: Payment run is
                                  pending confirmation by a `CONTROLLER` user

                                  - `RETURNED`: Payment sent, but was returned
                                  back

                                  - `SCA_FAILED`: Payment run failed due to SCA
                                  either expiring or max attempts reached. You
                                  can restart the payment run by calling the
                                  /payment_runs/{id}/restart endpoint
                                readOnly: true
                          - type: object
                            title: Payment
                            required:
                              - amount
                              - currency
                              - reference
                              - payee
                              - paymentAmount
                              - supplier
                            properties:
                              externalRef:
                                type: string
                                example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                                description: >-
                                  The unique identifier by which you identify
                                  the associated payable on your system.
                              paymentRef:
                                type: string
                                example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                                description: >-
                                  The unique identifier by which you identify
                                  this payment on your system.
                              paymentAmount:
                                description: >-
                                  The currency and amount to be paid to the
                                  supplier.
                                allOf:
                                  - description: >-
                                      The object representing a monetary amount
                                      in a particular currency
                                    required:
                                      - currency
                                      - amount
                                    type: object
                                    properties:
                                      currency:
                                        type: string
                                        description: The currency expressed in ISO-4217 code.
                                        maxLength: 3
                                        minLength: 3
                                        enum:
                                          - GBP
                                          - EUR
                                      amount:
                                        type: integer
                                        format: int64
                                        example: 454321
                                        description: >
                                          The monetary amount, scaled to the
                                          lowest denomination of the currency.


                                          Example, an amount of 1000 for a GBP
                                          currency is actually 1000 pennies or GBP
                                          10.00.
                                  - type: object
                                    properties:
                                      amount:
                                        type: integer
                                        minimum: 1
                              reference:
                                type: string
                                maxLength: 18
                                minLength: 1
                                pattern: ^[0-9a-zA-Z.-]{1,18}$
                                description: >
                                  The long form description of the payment. This
                                  information is also shared with the supplier.
                                  The allowed length is dependent on the payment
                                  type:

                                  `SEPA` and `SWIFT` <= 35 characters

                                  `Faster Payments` <= 18 characters
                              supplier:
                                required:
                                  - bankAccountDetails
                                  - name
                                type: object
                                description: >-
                                  Represent the supplier bank account typically
                                  used in Outgoing Wire Transfer transactions.
                                properties:
                                  name:
                                    type: string
                                    minLength: 1
                                    maxLength: 140
                                    pattern: >-
                                      ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                                    description: >
                                      The supplier name. The allowed length and
                                      pattern is dependent on the
                                      `bankAccountDetails` type:

                                      * with `SepaBankDetails`: >= `1` character
                                      and <= `150` characters

                                      * with `FasterPaymentsBankDetails`: >= `1`
                                      character and <= `140` characters with a
                                      pattern of
                                      `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                                      (please note that the `’` symbol is the
                                      unicode value U+2019 (right single
                                      quotation mark) and not the unicode value
                                      U+0027 (apostrophe))
                                  address:
                                    maxLength: 150
                                    minLength: 1
                                    type: string
                                    description: The supplier's address.
                                  bankName:
                                    type: string
                                    description: The supplier's bank name.
                                  bankAddress:
                                    maxLength: 150
                                    minLength: 1
                                    type: string
                                    description: The supplier's bank address.
                                  bankCountry:
                                    type: string
                                    description: >-
                                      The supplier's bank country in ISO 3166
                                      alpha-2 format.
                                    maxLength: 2
                                    minLength: 2
                                    pattern: ^[A-Z]{2}$
                                  type:
                                    type: string
                                    description: >-
                                      The type of supplier account. Required
                                      only when FasterPaymentsBankDetails are
                                      specified.
                                    enum:
                                      - PERSONAL
                                      - BUSINESS
                                  bankAccountDetails:
                                    description: >-
                                      Details of the supplier bank account,
                                      depending on the type of transfer chosen.
                                    oneOf:
                                      - title: FasterPaymentsBankDetails
                                        required:
                                          - accountNumber
                                          - sortCode
                                        type: object
                                        description: >-
                                          Bank details used in case the wire
                                          transfer is executed over Faster
                                          Payments.
                                        properties:
                                          accountNumber:
                                            type: string
                                            minLength: 8
                                            maxLength: 8
                                            pattern: ^[0-9]{8}$
                                            description: >-
                                              Account number, required for wire
                                              transfer over Faster Payments.
                                          sortCode:
                                            type: string
                                            minLength: 6
                                            maxLength: 6
                                            pattern: ^[0-9]{6}$
                                            description: >-
                                              Sort code, required for wire transfer
                                              over Faster Payments.
                                          secondaryReference:
                                            type: string
                                            description: Secondary reference data if applicable.
                                      - title: SepaBankDetails
                                        required:
                                          - iban
                                        type: object
                                        description: >-
                                          Bank details used in case the wire
                                          transfer is executed over SEPA.
                                        properties:
                                          iban:
                                            type: string
                                            minLength: 15
                                            maxLength: 34
                                            pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                            description: >-
                                              International Bank Account Number,
                                              required for wire transfer over SEPA.
                                          bankIdentifierCode:
                                            type: string
                                            minLength: 8
                                            maxLength: 11
                                            pattern: >-
                                              ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                            description: BIC, for wire transfer over SEPA.
                              validationOutcomes:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    category:
                                      type: string
                                      enum:
                                        - UK_CONFIRMATION_OF_PAYEE
                                    categoryResult:
                                      type: object
                                      properties:
                                        match:
                                          type: string
                                          description: >-
                                            The result of matching performed by the
                                            UK Confirmation of Payee responder
                                          enum:
                                            - EXACT_MATCH
                                            - CLOSE_MATCH
                                            - NO_MATCH
                                        reasonCode:
                                          type: string
                                          description: >
                                            The reason why the matching failed at
                                            the UK Confirmation of Payee responder:

                                              - ANNM: The CoP responder confirms that the account `name` provided does not match;
                                              - MBAM: The CoP responder indicates that the account `name` provided closely matches the actual account in its records, the actual account name is returned in the `accountName` field;
                                              - BANM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that the actual account matching the `name` provided is actually BUSINESS;
                                              - PANM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that the actual account matching the `name` provided is actually PERSONAL;
                                              - BAMM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that an account closely matching the `name` provided is BUSINESS;
                                              - PAMM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that an account closely matching the `name` provided is PERSONAL;
                                              - AC01: The account does not exist in the CoP responders books, the `accountNumber` specified is likely incorrect; 
                                              - IVCR: The CoP responder was unable to locate an account based on the `secondaryReference` field;
                                              - ACNS: The account is not supported for CoP by the CoP responder;
                                              - OPTO: The owner of the account has opted out of CoP service by the CoP responder;
                                              - CASS: The account has been switched using the Current Account Switch Service;
                                              - SCNS: The `sortCode` provided is not supported at endpoint;
                                          enum:
                                            - ANNM
                                            - MBAM
                                            - BANM
                                            - PANM
                                            - BAMM
                                            - PAMM
                                            - AC01
                                            - IVCR
                                            - ACNS
                                            - OPTO
                                            - CASS
                                            - SCNS
                                        accountName:
                                          type: string
                                          description: >-
                                            Returned when there is `match` is a
                                            `CLOSE_MATCH` and the `reasonCode` is
                                            MBAM, BAMM or PAMM
                    createdAt:
                      type: string
                      format: date-time
                      readOnly: true
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  paymentRunPaymentWatch:
    post:
      description: >-
        Notification that the status of a payment in the Payment Run has been
        updated.
      summary: Payment Update
      operationId: webhookPaymentRunPaymentWatch
      security: []
      tags:
        - Payment runs Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        description: Event triggered when the status of a payment run payment changes
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - paymentRunPaymentWatch
                payload:
                  allOf:
                    - type: object
                      properties:
                        paymentRunId:
                          type: string
                    - type: object
                      title: Payment
                      required:
                        - id
                        - status
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              description: The unique identifier of the payment line
                              readOnly: true
                            status:
                              type: string
                              enum:
                                - QUEUED
                                - CANCELLED
                                - COMPLETED
                                - FAILED
                                - PENDING_CHALLENGE
                                - PENDING_CONFIRMATION
                                - PENDING_FUNDING
                                - RETURNED
                                - AWAITING_FUNDS
                                - EXECUTING
                                - SCA_FAILED
                              description: >
                                The status of the payment


                                - `QUEUED`: The payment run creation is an
                                asynchronous process. This status indicates that
                                the payment run is currently being validated

                                - `PENDING_CHALLENGE`: Waiting for the payment
                                run to complete the SCA challenge

                                - `PENDING_FUNDING`: Pending until the necessary
                                funds are initiated. Initiate the funding
                                process via the `/payment_runs/{id}/fund`
                                endpoint

                                - `AWAITING_FUNDS`: Waiting for the required
                                funds to be available to execute payment

                                - `EXECUTING`: Payment is being executed and
                                awaiting final status confirmation

                                - `COMPLETED`: Payment executed successfully

                                - `FAILED`: Payment executed, but failed

                                - `CANCELLED`: Payment cancelled, because
                                payment run was cancelled

                                - `PENDING_CONFIRMATION`: Payment run is pending
                                confirmation by a `CONTROLLER` user

                                - `RETURNED`: Payment sent, but was returned
                                back

                                - `SCA_FAILED`: Payment run failed due to SCA
                                either expiring or max attempts reached. You can
                                restart the payment run by calling the
                                /payment_runs/{id}/restart endpoint
                              readOnly: true
                        - type: object
                          title: Payment
                          required:
                            - amount
                            - currency
                            - reference
                            - payee
                            - paymentAmount
                            - supplier
                          properties:
                            externalRef:
                              type: string
                              example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                              description: >-
                                The unique identifier by which you identify the
                                associated payable on your system.
                            paymentRef:
                              type: string
                              example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                              description: >-
                                The unique identifier by which you identify this
                                payment on your system.
                            paymentAmount:
                              description: >-
                                The currency and amount to be paid to the
                                supplier.
                              allOf:
                                - description: >-
                                    The object representing a monetary amount in
                                    a particular currency
                                  required:
                                    - currency
                                    - amount
                                  type: object
                                  properties:
                                    currency:
                                      type: string
                                      description: The currency expressed in ISO-4217 code.
                                      maxLength: 3
                                      minLength: 3
                                      enum:
                                        - GBP
                                        - EUR
                                    amount:
                                      type: integer
                                      format: int64
                                      example: 454321
                                      description: >
                                        The monetary amount, scaled to the
                                        lowest denomination of the currency.


                                        Example, an amount of 1000 for a GBP
                                        currency is actually 1000 pennies or GBP
                                        10.00.
                                - type: object
                                  properties:
                                    amount:
                                      type: integer
                                      minimum: 1
                            reference:
                              type: string
                              maxLength: 18
                              minLength: 1
                              pattern: ^[0-9a-zA-Z.-]{1,18}$
                              description: >
                                The long form description of the payment. This
                                information is also shared with the supplier.
                                The allowed length is dependent on the payment
                                type:

                                `SEPA` and `SWIFT` <= 35 characters

                                `Faster Payments` <= 18 characters
                            supplier:
                              required:
                                - bankAccountDetails
                                - name
                              type: object
                              description: >-
                                Represent the supplier bank account typically
                                used in Outgoing Wire Transfer transactions.
                              properties:
                                name:
                                  type: string
                                  minLength: 1
                                  maxLength: 140
                                  pattern: ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                                  description: >
                                    The supplier name. The allowed length and
                                    pattern is dependent on the
                                    `bankAccountDetails` type:

                                    * with `SepaBankDetails`: >= `1` character
                                    and <= `150` characters

                                    * with `FasterPaymentsBankDetails`: >= `1`
                                    character and <= `140` characters with a
                                    pattern of
                                    `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                                    (please note that the `’` symbol is the
                                    unicode value U+2019 (right single quotation
                                    mark) and not the unicode value U+0027
                                    (apostrophe))
                                address:
                                  maxLength: 150
                                  minLength: 1
                                  type: string
                                  description: The supplier's address.
                                bankName:
                                  type: string
                                  description: The supplier's bank name.
                                bankAddress:
                                  maxLength: 150
                                  minLength: 1
                                  type: string
                                  description: The supplier's bank address.
                                bankCountry:
                                  type: string
                                  description: >-
                                    The supplier's bank country in ISO 3166
                                    alpha-2 format.
                                  maxLength: 2
                                  minLength: 2
                                  pattern: ^[A-Z]{2}$
                                type:
                                  type: string
                                  description: >-
                                    The type of supplier account. Required only
                                    when FasterPaymentsBankDetails are
                                    specified.
                                  enum:
                                    - PERSONAL
                                    - BUSINESS
                                bankAccountDetails:
                                  description: >-
                                    Details of the supplier bank account,
                                    depending on the type of transfer chosen.
                                  oneOf:
                                    - title: FasterPaymentsBankDetails
                                      required:
                                        - accountNumber
                                        - sortCode
                                      type: object
                                      description: >-
                                        Bank details used in case the wire
                                        transfer is executed over Faster
                                        Payments.
                                      properties:
                                        accountNumber:
                                          type: string
                                          minLength: 8
                                          maxLength: 8
                                          pattern: ^[0-9]{8}$
                                          description: >-
                                            Account number, required for wire
                                            transfer over Faster Payments.
                                        sortCode:
                                          type: string
                                          minLength: 6
                                          maxLength: 6
                                          pattern: ^[0-9]{6}$
                                          description: >-
                                            Sort code, required for wire transfer
                                            over Faster Payments.
                                        secondaryReference:
                                          type: string
                                          description: Secondary reference data if applicable.
                                    - title: SepaBankDetails
                                      required:
                                        - iban
                                      type: object
                                      description: >-
                                        Bank details used in case the wire
                                        transfer is executed over SEPA.
                                      properties:
                                        iban:
                                          type: string
                                          minLength: 15
                                          maxLength: 34
                                          pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                          description: >-
                                            International Bank Account Number,
                                            required for wire transfer over SEPA.
                                        bankIdentifierCode:
                                          type: string
                                          minLength: 8
                                          maxLength: 11
                                          pattern: >-
                                            ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                          description: BIC, for wire transfer over SEPA.
                            validationOutcomes:
                              type: array
                              items:
                                type: object
                                properties:
                                  category:
                                    type: string
                                    enum:
                                      - UK_CONFIRMATION_OF_PAYEE
                                  categoryResult:
                                    type: object
                                    properties:
                                      match:
                                        type: string
                                        description: >-
                                          The result of matching performed by the
                                          UK Confirmation of Payee responder
                                        enum:
                                          - EXACT_MATCH
                                          - CLOSE_MATCH
                                          - NO_MATCH
                                      reasonCode:
                                        type: string
                                        description: >
                                          The reason why the matching failed at
                                          the UK Confirmation of Payee responder:

                                            - ANNM: The CoP responder confirms that the account `name` provided does not match;
                                            - MBAM: The CoP responder indicates that the account `name` provided closely matches the actual account in its records, the actual account name is returned in the `accountName` field;
                                            - BANM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that the actual account matching the `name` provided is actually BUSINESS;
                                            - PANM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that the actual account matching the `name` provided is actually PERSONAL;
                                            - BAMM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that an account closely matching the `name` provided is BUSINESS;
                                            - PAMM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that an account closely matching the `name` provided is PERSONAL;
                                            - AC01: The account does not exist in the CoP responders books, the `accountNumber` specified is likely incorrect; 
                                            - IVCR: The CoP responder was unable to locate an account based on the `secondaryReference` field;
                                            - ACNS: The account is not supported for CoP by the CoP responder;
                                            - OPTO: The owner of the account has opted out of CoP service by the CoP responder;
                                            - CASS: The account has been switched using the Current Account Switch Service;
                                            - SCNS: The `sortCode` provided is not supported at endpoint;
                                        enum:
                                          - ANNM
                                          - MBAM
                                          - BANM
                                          - PANM
                                          - BAMM
                                          - PAMM
                                          - AC01
                                          - IVCR
                                          - ACNS
                                          - OPTO
                                          - CASS
                                          - SCNS
                                      accountName:
                                        type: string
                                        description: >-
                                          Returned when there is `match` is a
                                          `CLOSE_MATCH` and the `reasonCode` is
                                          MBAM, BAMM or PAMM
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  linkedAccountWatch:
    post:
      description: Notification of the status update for a linked Account.
      summary: Linked Account Update
      operationId: webhookLinkedAccountWatch
      security: []
      tags:
        - Linked Accounts Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        description: Payment run event triggered when the status changes
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - payload
              properties:
                type:
                  type: string
                  enum:
                    - linkedAccountWatch
                payload:
                  type: object
                  title: Linked Account Status
                  oneOf:
                    - type: object
                      required:
                        - id
                        - accountIdentification
                        - currency
                        - institution
                        - consent
                        - status
                        - buyerId
                        - userId
                      properties:
                        id:
                          description: The unique identifier of the linked account
                          type: string
                          pattern: ^[0-9a-fA-F]{24}$
                          example: 652d25b73541d8084a88a38d
                        accountIdentification:
                          description: >-
                            The bank details that uniquely identify the account
                            on the banking systems.
                          oneOf:
                            - title: FasterPaymentsBankDetails
                              required:
                                - accountNumber
                                - sortCode
                              type: object
                              description: >-
                                Bank details used in case the wire transfer is
                                executed over Faster Payments.
                              properties:
                                accountNumber:
                                  type: string
                                  minLength: 8
                                  maxLength: 8
                                  pattern: ^[0-9]{8}$
                                  description: >-
                                    Account number, required for wire transfer
                                    over Faster Payments.
                                sortCode:
                                  type: string
                                  minLength: 6
                                  maxLength: 6
                                  pattern: ^[0-9]{6}$
                                  description: >-
                                    Sort code, required for wire transfer over
                                    Faster Payments.
                                secondaryReference:
                                  type: string
                                  description: Secondary reference data if applicable.
                            - title: SepaBankDetails
                              required:
                                - iban
                              type: object
                              description: >-
                                Bank details used in case the wire transfer is
                                executed over SEPA.
                              properties:
                                iban:
                                  type: string
                                  minLength: 15
                                  maxLength: 34
                                  pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                  description: >-
                                    International Bank Account Number, required
                                    for wire transfer over SEPA.
                                bankIdentifierCode:
                                  type: string
                                  minLength: 8
                                  maxLength: 11
                                  pattern: >-
                                    ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                  description: BIC, for wire transfer over SEPA.
                        currency:
                          type: string
                          description: The primary currency associated with the account
                          maxLength: 3
                          minLength: 3
                          enum:
                            - GBP
                            - EUR
                        institution:
                          type: object
                          required:
                            - countries
                          properties:
                            displayName:
                              description: >-
                                The name to be used when displaying the
                                institution to users on user interfaces
                              type: string
                            countries:
                              type: array
                              description: The institution's supported countries
                              items:
                                type: string
                                maxLength: 2
                                minLength: 2
                                pattern: ^[A-Z]+$
                                enum:
                                  - GB
                                  - AT
                                  - BE
                                  - BG
                                  - HR
                                  - CY
                                  - CZ
                                  - DK
                                  - EE
                                  - FI
                                  - FR
                                  - DE
                                  - GI
                                  - GR
                                  - HU
                                  - IS
                                  - IE
                                  - IT
                                  - LV
                                  - LI
                                  - LT
                                  - LU
                                  - MT
                                  - NL
                                  - 'NO'
                                  - PL
                                  - PT
                                  - RO
                                  - SK
                                  - SI
                                  - ES
                                  - SE
                            images:
                              type: object
                              description: >-
                                The images that should be used when displaying
                                the institution
                              properties:
                                icon:
                                  type: string
                                logo:
                                  type: string
                            info:
                              type: object
                              properties:
                                loginUrl:
                                  type: string
                                helplinePhoneNumber:
                                  type: string
                        consent:
                          type: object
                          required:
                            - expiresAt
                            - expiresIn
                            - status
                          properties:
                            expiresAt:
                              type: string
                              format: date-time
                            expiresIn:
                              type: integer
                            status:
                              type: string
                              enum:
                                - ACTIVE
                                - EXPIRED
                                - REVOKED
                        status:
                          type: string
                          description: >
                            The status of the linked account. The status can be
                            one of the following:


                            - `PENDING_CHALLENGE`: The Linked Account is pending
                            challenge

                            - `PENDING_VERIFICATION`: The Linked Account is
                            pending the completion of the required verification
                            steps

                            - `PENDING_FUNDING`: Awaiting a wire transfer as
                            part of the verification process when adding an
                            account without Open Banking

                            - `REJECTED`: The Linked Account did not pass one or
                            more verification steps and is not eligible for use

                            - `LINKED`: The linked account is linked and ready
                            for use

                            - `UNLINKED`: The linked account is not linked and
                            cannot be used
                          enum:
                            - LINKED
                            - UNLINKED
                            - PENDING_CHALLENGE
                            - PENDING_FUNDING
                            - PENDING_VERIFICATION
                            - REJECTED
                        friendlyName:
                          type: string
                          maxLength: 80
                          description: A user-friendly name for the linked account
                        buyerId:
                          description: >-
                            The id of the buyer that this linked account belongs
                            to.
                          type: string
                        userId:
                          description: >-
                            The id of the user who initially created this linked
                            account.
                          type: string
                    - title: StatusErrorDuplicatedAccount
                      type: object
                      required:
                        - status
                      allOf:
                        - type: object
                          title: Linked Account Info
                          required:
                            - accountIdentification
                            - currency
                            - institution
                          properties:
                            accountIdentification:
                              description: >-
                                The bank details that uniquely identify the
                                account on the banking systems.
                              oneOf:
                                - title: FasterPaymentsBankDetails
                                  required:
                                    - accountNumber
                                    - sortCode
                                  type: object
                                  description: >-
                                    Bank details used in case the wire transfer
                                    is executed over Faster Payments.
                                  properties:
                                    accountNumber:
                                      type: string
                                      minLength: 8
                                      maxLength: 8
                                      pattern: ^[0-9]{8}$
                                      description: >-
                                        Account number, required for wire
                                        transfer over Faster Payments.
                                    sortCode:
                                      type: string
                                      minLength: 6
                                      maxLength: 6
                                      pattern: ^[0-9]{6}$
                                      description: >-
                                        Sort code, required for wire transfer
                                        over Faster Payments.
                                    secondaryReference:
                                      type: string
                                      description: Secondary reference data if applicable.
                                - title: SepaBankDetails
                                  required:
                                    - iban
                                  type: object
                                  description: >-
                                    Bank details used in case the wire transfer
                                    is executed over SEPA.
                                  properties:
                                    iban:
                                      type: string
                                      minLength: 15
                                      maxLength: 34
                                      pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                      description: >-
                                        International Bank Account Number,
                                        required for wire transfer over SEPA.
                                    bankIdentifierCode:
                                      type: string
                                      minLength: 8
                                      maxLength: 11
                                      pattern: >-
                                        ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                      description: BIC, for wire transfer over SEPA.
                            currency:
                              type: string
                              description: The primary currency associated with the account
                              maxLength: 3
                              minLength: 3
                              enum:
                                - GBP
                                - EUR
                            institution:
                              type: object
                              required:
                                - countries
                              properties:
                                displayName:
                                  description: >-
                                    The name to be used when displaying the
                                    institution to users on user interfaces
                                  type: string
                                countries:
                                  type: array
                                  description: The institution's supported countries
                                  items:
                                    type: string
                                    maxLength: 2
                                    minLength: 2
                                    pattern: ^[A-Z]+$
                                    enum:
                                      - GB
                                      - AT
                                      - BE
                                      - BG
                                      - HR
                                      - CY
                                      - CZ
                                      - DK
                                      - EE
                                      - FI
                                      - FR
                                      - DE
                                      - GI
                                      - GR
                                      - HU
                                      - IS
                                      - IE
                                      - IT
                                      - LV
                                      - LI
                                      - LT
                                      - LU
                                      - MT
                                      - NL
                                      - 'NO'
                                      - PL
                                      - PT
                                      - RO
                                      - SK
                                      - SI
                                      - ES
                                      - SE
                                images:
                                  type: object
                                  description: >-
                                    The images that should be used when
                                    displaying the institution
                                  properties:
                                    icon:
                                      type: string
                                    logo:
                                      type: string
                                info:
                                  type: object
                                  properties:
                                    loginUrl:
                                      type: string
                                    helplinePhoneNumber:
                                      type: string
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - ERROR_DUPLICATED_ACCOUNT
                    - title: StatusRejected
                      type: object
                      required:
                        - status
                        - consent
                      properties:
                        status:
                          type: string
                          enum:
                            - REJECTED
                        consent:
                          type: object
                          required:
                            - status
                          properties:
                            status:
                              type: string
                              enum:
                                - REJECTED
                    - type: object
                      title: StatusRejectedMultipleLinkedAccounts
                      required:
                        - status
                        - consent
                      properties:
                        status:
                          type: string
                          enum:
                            - CANNOT_LINK_MULTIPLE_ACCOUNTS
                        consent:
                          type: object
                          required:
                            - status
                          properties:
                            status:
                              type: string
                              enum:
                                - REJECTED
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  linkedAccountExpiringSoonWatch:
    post:
      description: Notification when a linked account is expiring soon.
      summary: Linked Account Expiring Soon
      operationId: linkedAccountExpiringSoonWatch
      security: []
      tags:
        - Linked Accounts Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        description: Payment run event triggered when the status changes
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - payload
              properties:
                type:
                  type: string
                  enum:
                    - linkedAccountExpiringSoonWatch
                payload:
                  type: object
                  title: Linked Account Status
                  oneOf:
                    - type: object
                      required:
                        - id
                        - accountIdentification
                        - currency
                        - institution
                        - consent
                        - status
                        - buyerId
                        - userId
                      properties:
                        id:
                          description: The unique identifier of the linked account
                          type: string
                          pattern: ^[0-9a-fA-F]{24}$
                          example: 652d25b73541d8084a88a38d
                        accountIdentification:
                          description: >-
                            The bank details that uniquely identify the account
                            on the banking systems.
                          oneOf:
                            - title: FasterPaymentsBankDetails
                              required:
                                - accountNumber
                                - sortCode
                              type: object
                              description: >-
                                Bank details used in case the wire transfer is
                                executed over Faster Payments.
                              properties:
                                accountNumber:
                                  type: string
                                  minLength: 8
                                  maxLength: 8
                                  pattern: ^[0-9]{8}$
                                  description: >-
                                    Account number, required for wire transfer
                                    over Faster Payments.
                                sortCode:
                                  type: string
                                  minLength: 6
                                  maxLength: 6
                                  pattern: ^[0-9]{6}$
                                  description: >-
                                    Sort code, required for wire transfer over
                                    Faster Payments.
                                secondaryReference:
                                  type: string
                                  description: Secondary reference data if applicable.
                            - title: SepaBankDetails
                              required:
                                - iban
                              type: object
                              description: >-
                                Bank details used in case the wire transfer is
                                executed over SEPA.
                              properties:
                                iban:
                                  type: string
                                  minLength: 15
                                  maxLength: 34
                                  pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                  description: >-
                                    International Bank Account Number, required
                                    for wire transfer over SEPA.
                                bankIdentifierCode:
                                  type: string
                                  minLength: 8
                                  maxLength: 11
                                  pattern: >-
                                    ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                  description: BIC, for wire transfer over SEPA.
                        currency:
                          type: string
                          description: The primary currency associated with the account
                          maxLength: 3
                          minLength: 3
                          enum:
                            - GBP
                            - EUR
                        institution:
                          type: object
                          required:
                            - countries
                          properties:
                            displayName:
                              description: >-
                                The name to be used when displaying the
                                institution to users on user interfaces
                              type: string
                            countries:
                              type: array
                              description: The institution's supported countries
                              items:
                                type: string
                                maxLength: 2
                                minLength: 2
                                pattern: ^[A-Z]+$
                                enum:
                                  - GB
                                  - AT
                                  - BE
                                  - BG
                                  - HR
                                  - CY
                                  - CZ
                                  - DK
                                  - EE
                                  - FI
                                  - FR
                                  - DE
                                  - GI
                                  - GR
                                  - HU
                                  - IS
                                  - IE
                                  - IT
                                  - LV
                                  - LI
                                  - LT
                                  - LU
                                  - MT
                                  - NL
                                  - 'NO'
                                  - PL
                                  - PT
                                  - RO
                                  - SK
                                  - SI
                                  - ES
                                  - SE
                            images:
                              type: object
                              description: >-
                                The images that should be used when displaying
                                the institution
                              properties:
                                icon:
                                  type: string
                                logo:
                                  type: string
                            info:
                              type: object
                              properties:
                                loginUrl:
                                  type: string
                                helplinePhoneNumber:
                                  type: string
                        consent:
                          type: object
                          required:
                            - expiresAt
                            - expiresIn
                            - status
                          properties:
                            expiresAt:
                              type: string
                              format: date-time
                            expiresIn:
                              type: integer
                            status:
                              type: string
                              enum:
                                - ACTIVE
                                - EXPIRED
                                - REVOKED
                        status:
                          type: string
                          description: >
                            The status of the linked account. The status can be
                            one of the following:


                            - `PENDING_CHALLENGE`: The Linked Account is pending
                            challenge

                            - `PENDING_VERIFICATION`: The Linked Account is
                            pending the completion of the required verification
                            steps

                            - `PENDING_FUNDING`: Awaiting a wire transfer as
                            part of the verification process when adding an
                            account without Open Banking

                            - `REJECTED`: The Linked Account did not pass one or
                            more verification steps and is not eligible for use

                            - `LINKED`: The linked account is linked and ready
                            for use

                            - `UNLINKED`: The linked account is not linked and
                            cannot be used
                          enum:
                            - LINKED
                            - UNLINKED
                            - PENDING_CHALLENGE
                            - PENDING_FUNDING
                            - PENDING_VERIFICATION
                            - REJECTED
                        friendlyName:
                          type: string
                          maxLength: 80
                          description: A user-friendly name for the linked account
                        buyerId:
                          description: >-
                            The id of the buyer that this linked account belongs
                            to.
                          type: string
                        userId:
                          description: >-
                            The id of the user who initially created this linked
                            account.
                          type: string
                    - title: StatusErrorDuplicatedAccount
                      type: object
                      required:
                        - status
                      allOf:
                        - type: object
                          title: Linked Account Info
                          required:
                            - accountIdentification
                            - currency
                            - institution
                          properties:
                            accountIdentification:
                              description: >-
                                The bank details that uniquely identify the
                                account on the banking systems.
                              oneOf:
                                - title: FasterPaymentsBankDetails
                                  required:
                                    - accountNumber
                                    - sortCode
                                  type: object
                                  description: >-
                                    Bank details used in case the wire transfer
                                    is executed over Faster Payments.
                                  properties:
                                    accountNumber:
                                      type: string
                                      minLength: 8
                                      maxLength: 8
                                      pattern: ^[0-9]{8}$
                                      description: >-
                                        Account number, required for wire
                                        transfer over Faster Payments.
                                    sortCode:
                                      type: string
                                      minLength: 6
                                      maxLength: 6
                                      pattern: ^[0-9]{6}$
                                      description: >-
                                        Sort code, required for wire transfer
                                        over Faster Payments.
                                    secondaryReference:
                                      type: string
                                      description: Secondary reference data if applicable.
                                - title: SepaBankDetails
                                  required:
                                    - iban
                                  type: object
                                  description: >-
                                    Bank details used in case the wire transfer
                                    is executed over SEPA.
                                  properties:
                                    iban:
                                      type: string
                                      minLength: 15
                                      maxLength: 34
                                      pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                      description: >-
                                        International Bank Account Number,
                                        required for wire transfer over SEPA.
                                    bankIdentifierCode:
                                      type: string
                                      minLength: 8
                                      maxLength: 11
                                      pattern: >-
                                        ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                      description: BIC, for wire transfer over SEPA.
                            currency:
                              type: string
                              description: The primary currency associated with the account
                              maxLength: 3
                              minLength: 3
                              enum:
                                - GBP
                                - EUR
                            institution:
                              type: object
                              required:
                                - countries
                              properties:
                                displayName:
                                  description: >-
                                    The name to be used when displaying the
                                    institution to users on user interfaces
                                  type: string
                                countries:
                                  type: array
                                  description: The institution's supported countries
                                  items:
                                    type: string
                                    maxLength: 2
                                    minLength: 2
                                    pattern: ^[A-Z]+$
                                    enum:
                                      - GB
                                      - AT
                                      - BE
                                      - BG
                                      - HR
                                      - CY
                                      - CZ
                                      - DK
                                      - EE
                                      - FI
                                      - FR
                                      - DE
                                      - GI
                                      - GR
                                      - HU
                                      - IS
                                      - IE
                                      - IT
                                      - LV
                                      - LI
                                      - LT
                                      - LU
                                      - MT
                                      - NL
                                      - 'NO'
                                      - PL
                                      - PT
                                      - RO
                                      - SK
                                      - SI
                                      - ES
                                      - SE
                                images:
                                  type: object
                                  description: >-
                                    The images that should be used when
                                    displaying the institution
                                  properties:
                                    icon:
                                      type: string
                                    logo:
                                      type: string
                                info:
                                  type: object
                                  properties:
                                    loginUrl:
                                      type: string
                                    helplinePhoneNumber:
                                      type: string
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - ERROR_DUPLICATED_ACCOUNT
                    - title: StatusRejected
                      type: object
                      required:
                        - status
                        - consent
                      properties:
                        status:
                          type: string
                          enum:
                            - REJECTED
                        consent:
                          type: object
                          required:
                            - status
                          properties:
                            status:
                              type: string
                              enum:
                                - REJECTED
                    - type: object
                      title: StatusRejectedMultipleLinkedAccounts
                      required:
                        - status
                        - consent
                      properties:
                        status:
                          type: string
                          enum:
                            - CANNOT_LINK_MULTIPLE_ACCOUNTS
                        consent:
                          type: object
                          required:
                            - status
                          properties:
                            status:
                              type: string
                              enum:
                                - REJECTED
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  loginWatch:
    post:
      summary: Login attempt
      description: >
        Notification that a login attempt was completed successfully or
        declined.
      operationId: webhook-login-watch
      tags:
        - Tokens Webhooks
      security: []
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - loginWatch
                payload:
                  required:
                    - credential
                    - publishedTimestamp
                    - status
                    - type
                  type: object
                  properties:
                    credential:
                      required:
                        - type
                        - id
                      type: object
                      properties:
                        type:
                          maxLength: 50
                          pattern: ^[a-zA-Z0-9_-]+$
                          type: string
                          enum:
                            - ROOT
                            - USER
                          description: The type of user.
                        id:
                          type: string
                          pattern: ^[0-9]+$
                          description: The identifier of the user.
                    buyerId:
                      type: string
                      pattern: ^[0-9]+$
                      description: The buyer id whose beneficiary has triggered this event.
                    type:
                      type: string
                      description: >-
                        Login type can be with password or with auth/access
                        token
                    status:
                      type: string
                      enum:
                        - VERIFIED
                        - DECLINED
                        - EXPIRED
                    publishedTimestamp:
                      type: string
                      pattern: ^[0-9]+$
                      description: Epoch timestamp using millisecond precision.
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  stepupWatch:
    post:
      summary: Step-up status
      description: Notification that a step-up has been completed or declined.
      operationId: stepup_watch
      security: []
      tags:
        - Stepup Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - stepupWatch
                payload:
                  required:
                    - challengeId
                    - credential
                    - identity
                    - publishedTimestamp
                    - status
                    - type
                  type: object
                  properties:
                    credential:
                      required:
                        - type
                        - id
                      type: object
                      properties:
                        type:
                          maxLength: 50
                          pattern: ^[a-zA-Z0-9_-]+$
                          type: string
                          enum:
                            - ROOT
                            - USER
                          description: The type of user.
                        id:
                          type: string
                          pattern: ^[0-9]+$
                          description: The identifier of the user.
                    buyerId:
                      type: string
                      pattern: ^[0-9]+$
                      description: The buyer id whose beneficiary has triggered this event.
                    challengeId:
                      type: string
                      pattern: ^[0-9]+$
                    type:
                      type: string
                    status:
                      type: string
                      enum:
                        - VERIFIED
                        - DECLINED
                        - EXPIRED
                    publishedTimestamp:
                      type: string
                      pattern: ^[0-9]+$
                      description: Epoch timestamp using millisecond precision.
                    authToken:
                      type: string
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  authenticationFactorsWatch:
    post:
      summary: Enrolment status
      description: Notification that an enrolment has been accepted or declined.
      operationId: authentication_factors_watch
      tags:
        - Authentication Factors Webhooks
      security: []
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - authenticationFactorsWatch
                payload:
                  required:
                    - credentialId
                    - publishedTimestamp
                    - status
                    - type
                  type: object
                  properties:
                    credential:
                      required:
                        - type
                        - id
                      type: object
                      properties:
                        type:
                          maxLength: 50
                          pattern: ^[a-zA-Z0-9_-]+$
                          type: string
                          enum:
                            - ROOT
                            - USER
                          description: The type of user.
                        id:
                          type: string
                          pattern: ^[0-9]+$
                          description: The identifier of the user.
                    type:
                      type: string
                    status:
                      type: string
                      enum:
                        - ACTIVE
                        - INACTIVE
                    publishedTimestamp:
                      type: string
                      pattern: ^[0-9]+$
                      description: Epoch timestamp using millisecond precision.
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  sweepingWatch:
    post:
      summary: Sweeping status update
      description: >
        Notification that the sweeping status has been updated.


        Sweeping represents transactions that return money to the source
        account. It may be triggered by unmatched incoming transaction or by
        failed payment run payments.
      operationId: sweeping_watch
      security: []
      tags:
        - Transactions Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - payload
              properties:
                type:
                  type: string
                  enum:
                    - sweepingWatch
                payload:
                  type: object
                  required:
                    - buyerId
                    - sweepingId
                    - transactionAmount
                    - transactionDate
                    - status
                    - destination
                  properties:
                    buyerId:
                      type: string
                      description: Buyer id.
                    sweepingId:
                      type: string
                      description: Sweeping id.
                      example: 654cea294f19c7598987cc84
                    reference:
                      type: string
                      description: Sweeping transaction reference.
                    transactionDate:
                      type: string
                      format: date-time
                      example: 2023-09-23T11:34:45Z00
                      description: Date for when sweeping transaction happened
                    transactionAmount:
                      description: Sweeping transaction amount
                      required:
                        - currency
                        - amount
                      type: object
                      properties:
                        currency:
                          type: string
                          description: The currency expressed in ISO-4217 code.
                          maxLength: 3
                          minLength: 3
                          enum:
                            - GBP
                            - EUR
                        amount:
                          type: integer
                          format: int64
                          example: 454321
                          description: >
                            The monetary amount, scaled to the lowest
                            denomination of the currency.


                            Example, an amount of 1000 for a GBP currency is
                            actually 1000 pennies or GBP 10.00.
                    status:
                      type: string
                      description: >
                        The status of the sweeping transaction, as follows:


                        - SUBMITTED: Sweeping has been initiated.

                        - REJECTED: Sweeping submitted was rejected.

                        - APPROVED: Sweeping submission was approved.

                        - FAILED: There was an issue with the sweeping, and the
                        transaction has failed.

                        - COMPLETED: The requested funds have been sent.

                        - RETURNED: Sweeping has been returned to the sender
                      enum:
                        - SUBMITTED
                        - REJECTED
                        - APPROVED
                        - FAILED
                        - COMPLETED
                        - RETURNED
                    destination:
                      description: Sweeping destination bank account details
                      type: object
                      required:
                        - linkedAccountId
                        - bankAccountDetails
                      properties:
                        linkedAccountId:
                          description: The unique identifier of the linked account
                          type: string
                          pattern: ^[0-9a-fA-F]{24}$
                          example: 652d25b73541d8084a88a38d
                        bankAccountDetails:
                          description: >-
                            Details of the destination bank account, depending
                            on the type of linked account.
                          oneOf:
                            - title: SepaBankDetails
                              required:
                                - iban
                              type: object
                              description: >-
                                Bank details used in case the wire transfer is
                                executed over SEPA.
                              properties:
                                iban:
                                  type: string
                                  minLength: 15
                                  maxLength: 34
                                  pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                  description: >-
                                    International Bank Account Number, required
                                    for wire transfer over SEPA.
                                bankIdentifierCode:
                                  type: string
                                  minLength: 8
                                  maxLength: 11
                                  pattern: >-
                                    ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                  description: BIC, for wire transfer over SEPA.
                            - title: FasterPaymentsBankDetails
                              required:
                                - accountNumber
                                - sortCode
                              type: object
                              description: >-
                                Bank details used in case the wire transfer is
                                executed over Faster Payments.
                              properties:
                                accountNumber:
                                  type: string
                                  minLength: 8
                                  maxLength: 8
                                  pattern: ^[0-9]{8}$
                                  description: >-
                                    Account number, required for wire transfer
                                    over Faster Payments.
                                sortCode:
                                  type: string
                                  minLength: 6
                                  maxLength: 6
                                  pattern: ^[0-9]{6}$
                                  description: >-
                                    Sort code, required for wire transfer over
                                    Faster Payments.
                                secondaryReference:
                                  type: string
                                  description: Secondary reference data if applicable.
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
  paymentRunGroupNotFunded:
    post:
      description: Notification that a group expecting funds has not been funded.
      summary: Payment Run Group Not Funded
      operationId: webhookpaymentRunGroupNotFunded
      security: []
      tags:
        - Payment runs Webhooks
      parameters:
        - name: call-ref
          in: header
          description: >
            A call reference generated by the caller and unique to the caller

            to provide correlation between the caller and system with a maximum
            length

            of 255
          required: false
          style: simple
          explode: false
          schema:
            type: string
        - name: published-timestamp
          in: header
          description: >-
            The timestamp, expressed in Epoch timestamp using millisecond
            precision, when this event was published.
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
        - name: signature
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `published-timestamp` using your
            API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: signature-v2
          in: header
          description: >-
            The signature to verify the authenticity of this request.  This is
            the base64 hash (HmacSHA256) of the `call-ref` header, the request
            body, and the `published-timestamp` header, all concatenated without
            spaces, and signed using your API key.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        description: Event triggered when the status of a payment run payment changes
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - paymentRunGroupNotFunded
                payload:
                  allOf:
                    - type: object
                      properties:
                        paymentRunId:
                          type: string
                    - type: object
                      required:
                        - reference
                        - totalAmount
                        - status
                        - payments
                      properties:
                        reference:
                          type: string
                          description: >-
                            The reference to be used to initialise the PIS UX
                            Component
                        totalAmount:
                          description: >-
                            The total amount of the group of payments in the
                            currency of the group.
                          required:
                            - currency
                            - amount
                          type: object
                          properties:
                            currency:
                              type: string
                              description: The currency expressed in ISO-4217 code.
                              maxLength: 3
                              minLength: 3
                              enum:
                                - GBP
                                - EUR
                            amount:
                              type: integer
                              format: int64
                              example: 454321
                              description: >
                                The monetary amount, scaled to the lowest
                                denomination of the currency.


                                Example, an amount of 1000 for a GBP currency is
                                actually 1000 pennies or GBP 10.00.
                        status:
                          type: string
                          description: The status of the funding instruction
                          enum:
                            - PENDING_FUNDING
                            - AWAITING_FUNDS
                            - CANCELLED
                            - EXECUTING
                            - COMPLETED
                            - COMPLETED_WITH_ERRORS
                        fundingDate:
                          type: string
                          format: date-time
                          description: The date of when the group was funded
                        payments:
                          type: array
                          description: >-
                            The group of payments within the payment run that
                            are funded with this funding instruction
                          items:
                            type: object
                            title: Payment
                            required:
                              - id
                              - status
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                    description: The unique identifier of the payment line
                                    readOnly: true
                                  status:
                                    type: string
                                    enum:
                                      - QUEUED
                                      - CANCELLED
                                      - COMPLETED
                                      - FAILED
                                      - PENDING_CHALLENGE
                                      - PENDING_CONFIRMATION
                                      - PENDING_FUNDING
                                      - RETURNED
                                      - AWAITING_FUNDS
                                      - EXECUTING
                                      - SCA_FAILED
                                    description: >
                                      The status of the payment


                                      - `QUEUED`: The payment run creation is an
                                      asynchronous process. This status
                                      indicates that the payment run is
                                      currently being validated

                                      - `PENDING_CHALLENGE`: Waiting for the
                                      payment run to complete the SCA challenge

                                      - `PENDING_FUNDING`: Pending until the
                                      necessary funds are initiated. Initiate
                                      the funding process via the
                                      `/payment_runs/{id}/fund` endpoint

                                      - `AWAITING_FUNDS`: Waiting for the
                                      required funds to be available to execute
                                      payment

                                      - `EXECUTING`: Payment is being executed
                                      and awaiting final status confirmation

                                      - `COMPLETED`: Payment executed
                                      successfully

                                      - `FAILED`: Payment executed, but failed

                                      - `CANCELLED`: Payment cancelled, because
                                      payment run was cancelled

                                      - `PENDING_CONFIRMATION`: Payment run is
                                      pending confirmation by a `CONTROLLER`
                                      user

                                      - `RETURNED`: Payment sent, but was
                                      returned back

                                      - `SCA_FAILED`: Payment run failed due to
                                      SCA either expiring or max attempts
                                      reached. You can restart the payment run
                                      by calling the /payment_runs/{id}/restart
                                      endpoint
                                    readOnly: true
                              - type: object
                                title: Payment
                                required:
                                  - amount
                                  - currency
                                  - reference
                                  - payee
                                  - paymentAmount
                                  - supplier
                                properties:
                                  externalRef:
                                    type: string
                                    example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                                    description: >-
                                      The unique identifier by which you
                                      identify the associated payable on your
                                      system.
                                  paymentRef:
                                    type: string
                                    example: c99cd66c-82fc-4a01-977b-61a2f5a247a1
                                    description: >-
                                      The unique identifier by which you
                                      identify this payment on your system.
                                  paymentAmount:
                                    description: >-
                                      The currency and amount to be paid to the
                                      supplier.
                                    allOf:
                                      - description: >-
                                          The object representing a monetary
                                          amount in a particular currency
                                        required:
                                          - currency
                                          - amount
                                        type: object
                                        properties:
                                          currency:
                                            type: string
                                            description: The currency expressed in ISO-4217 code.
                                            maxLength: 3
                                            minLength: 3
                                            enum:
                                              - GBP
                                              - EUR
                                          amount:
                                            type: integer
                                            format: int64
                                            example: 454321
                                            description: >
                                              The monetary amount, scaled to the
                                              lowest denomination of the currency.


                                              Example, an amount of 1000 for a GBP
                                              currency is actually 1000 pennies or GBP
                                              10.00.
                                      - type: object
                                        properties:
                                          amount:
                                            type: integer
                                            minimum: 1
                                  reference:
                                    type: string
                                    maxLength: 18
                                    minLength: 1
                                    pattern: ^[0-9a-zA-Z.-]{1,18}$
                                    description: >
                                      The long form description of the payment.
                                      This information is also shared with the
                                      supplier. The allowed length is dependent
                                      on the payment type:

                                      `SEPA` and `SWIFT` <= 35 characters

                                      `Faster Payments` <= 18 characters
                                  supplier:
                                    required:
                                      - bankAccountDetails
                                      - name
                                    type: object
                                    description: >-
                                      Represent the supplier bank account
                                      typically used in Outgoing Wire Transfer
                                      transactions.
                                    properties:
                                      name:
                                        type: string
                                        minLength: 1
                                        maxLength: 140
                                        pattern: >-
                                          ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$
                                        description: >
                                          The supplier name. The allowed length
                                          and pattern is dependent on the
                                          `bankAccountDetails` type:

                                          * with `SepaBankDetails`: >= `1`
                                          character and <= `150` characters

                                          * with `FasterPaymentsBankDetails`: >=
                                          `1` character and <= `140` characters
                                          with a pattern of
                                          `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

                                          (please note that the `’` symbol is the
                                          unicode value U+2019 (right single
                                          quotation mark) and not the unicode
                                          value U+0027 (apostrophe))
                                      address:
                                        maxLength: 150
                                        minLength: 1
                                        type: string
                                        description: The supplier's address.
                                      bankName:
                                        type: string
                                        description: The supplier's bank name.
                                      bankAddress:
                                        maxLength: 150
                                        minLength: 1
                                        type: string
                                        description: The supplier's bank address.
                                      bankCountry:
                                        type: string
                                        description: >-
                                          The supplier's bank country in ISO 3166
                                          alpha-2 format.
                                        maxLength: 2
                                        minLength: 2
                                        pattern: ^[A-Z]{2}$
                                      type:
                                        type: string
                                        description: >-
                                          The type of supplier account. Required
                                          only when FasterPaymentsBankDetails are
                                          specified.
                                        enum:
                                          - PERSONAL
                                          - BUSINESS
                                      bankAccountDetails:
                                        description: >-
                                          Details of the supplier bank account,
                                          depending on the type of transfer
                                          chosen.
                                        oneOf:
                                          - title: FasterPaymentsBankDetails
                                            required:
                                              - accountNumber
                                              - sortCode
                                            type: object
                                            description: >-
                                              Bank details used in case the wire
                                              transfer is executed over Faster
                                              Payments.
                                            properties:
                                              accountNumber:
                                                type: string
                                                minLength: 8
                                                maxLength: 8
                                                pattern: ^[0-9]{8}$
                                                description: >-
                                                  Account number, required for wire
                                                  transfer over Faster Payments.
                                              sortCode:
                                                type: string
                                                minLength: 6
                                                maxLength: 6
                                                pattern: ^[0-9]{6}$
                                                description: >-
                                                  Sort code, required for wire transfer
                                                  over Faster Payments.
                                              secondaryReference:
                                                type: string
                                                description: Secondary reference data if applicable.
                                          - title: SepaBankDetails
                                            required:
                                              - iban
                                            type: object
                                            description: >-
                                              Bank details used in case the wire
                                              transfer is executed over SEPA.
                                            properties:
                                              iban:
                                                type: string
                                                minLength: 15
                                                maxLength: 34
                                                pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
                                                description: >-
                                                  International Bank Account Number,
                                                  required for wire transfer over SEPA.
                                              bankIdentifierCode:
                                                type: string
                                                minLength: 8
                                                maxLength: 11
                                                pattern: >-
                                                  ^[a-zA-Z0-9]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[a-zA-Z0-9]{0,3}$
                                                description: BIC, for wire transfer over SEPA.
                                  validationOutcomes:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        category:
                                          type: string
                                          enum:
                                            - UK_CONFIRMATION_OF_PAYEE
                                        categoryResult:
                                          type: object
                                          properties:
                                            match:
                                              type: string
                                              description: >-
                                                The result of matching performed by the
                                                UK Confirmation of Payee responder
                                              enum:
                                                - EXACT_MATCH
                                                - CLOSE_MATCH
                                                - NO_MATCH
                                            reasonCode:
                                              type: string
                                              description: >
                                                The reason why the matching failed at
                                                the UK Confirmation of Payee responder:

                                                  - ANNM: The CoP responder confirms that the account `name` provided does not match;
                                                  - MBAM: The CoP responder indicates that the account `name` provided closely matches the actual account in its records, the actual account name is returned in the `accountName` field;
                                                  - BANM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that the actual account matching the `name` provided is actually BUSINESS;
                                                  - PANM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that the actual account matching the `name` provided is actually PERSONAL;
                                                  - BAMM: The account `type` that the user specified is 'PERSONAL', but the CoP responder indicates that an account closely matching the `name` provided is BUSINESS;
                                                  - PAMM: The account `type` that the user specified is 'BUSINESS', but the CoP responder indicates that an account closely matching the `name` provided is PERSONAL;
                                                  - AC01: The account does not exist in the CoP responders books, the `accountNumber` specified is likely incorrect; 
                                                  - IVCR: The CoP responder was unable to locate an account based on the `secondaryReference` field;
                                                  - ACNS: The account is not supported for CoP by the CoP responder;
                                                  - OPTO: The owner of the account has opted out of CoP service by the CoP responder;
                                                  - CASS: The account has been switched using the Current Account Switch Service;
                                                  - SCNS: The `sortCode` provided is not supported at endpoint;
                                              enum:
                                                - ANNM
                                                - MBAM
                                                - BANM
                                                - PANM
                                                - BAMM
                                                - PAMM
                                                - AC01
                                                - IVCR
                                                - ACNS
                                                - OPTO
                                                - CASS
                                                - SCNS
                                            accountName:
                                              type: string
                                              description: >-
                                                Returned when there is `match` is a
                                                `CLOSE_MATCH` and the `reasonCode` is
                                                MBAM, BAMM or PAMM
        required: true
      responses:
        '200':
          description: >-
            Return a 200 status to indicate that the data was received
            successfully
security:
  - apiKey: []
    authToken: []
components:
  schemas:
    IdentityId:
      type: object
      required:
        - type
        - id
      properties:
        type:
          enum:
            - CONSUMER
            - CORPORATE
          type: string
          description: Indicates the identity type.
        id:
          type: string
          pattern: ^[0-9]+$
          description: The identifier for the identity.
    Nonce:
      type: string
      description: A randomly generated one-time use code.
      minLength: 6
      maxLength: 6
      pattern: ^[0-9]*$
    PasswordInfo:
      type: object
      required:
        - buyerId
      description: Additional information related to the user's password.
      properties:
        buyerId:
          type: string
          pattern: ^[0-9]+$
          description: The buyer to which the user's password information belongs to.
        expiryDate:
          minimum: 0
          type: integer
          format: int64
          description: >-
            The millisecond timestamp indicating when the password will expire.
            If 0, then this password will not expire.
    SCAOtpChannel:
      type: string
      enum:
        - SMS
      description: '- "SMS": The one-time-password is sent as a text message'
    SensitivePassword:
      type: object
      description: >
        The user's password or passcode used to log in a user.

        Passwords must be:
          - between 8 and 30 characters
          - include a lowercase character
          - include an uppercase character
          - include a digit and a special character
          - different from any of the 5 last such passwords used.

        For non-PCI compliant integrations, the password submitted must be
        **tokenised**.
      required:
        - value
      properties:
        value:
          minLength: 1
          maxLength: 100
          type: string
          format: password
    TransactionState:
      type: string
      description: Status of the transaction.
      enum:
        - INITIALISED
        - COMPLETED
        - REJECTED
        - FAILED
        - PENDING
    UserId:
      type: string
      pattern: ^[0-9]+$
      example: '110747174434373672'
    VerificationCode:
      type: string
      description: >-
        A randomly generated one-time use code used to verify the user's email
        address or mobile number.
      minLength: 6
      maxLength: 6
      pattern: ^[0-9]+$
    BeneficiaryTrustLevel:
      type: string
      description: The value that determines whether a Supplier is trusted or not.
      enum:
        - TRUSTED
    BusinessSupplierType:
      required:
        - businessName
      type: object
      properties:
        businessName:
          type: string
          description: >
            The business supplier name. The allowed length and pattern is
            dependent on the `supplierDetails.bankAccountDetails` type:


            * with `SepaBankDetails`: >= `1` character and <= `150` characters


            * with `FasterPaymentsBankDetails`: >= `1` character and <= `140`
            characters with a pattern of
            `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

            (please note that the `’` symbol is the unicode value U+2019 (right
            single quotation mark) and not the unicode value U+0027
            (apostrophe))
    ConsumerSupplierType:
      required:
        - fullName
      type: object
      properties:
        fullName:
          type: string
          description: >
            The person supplier name. The allowed length and pattern is
            dependent on the supplier details type:


            `BankAccountDetailsBeneficiary` with `SepaBankDetails`: >= `1`
            character and <= `150` characters


            `BankAccountDetailsBeneficiary` with `FasterPaymentsBankDetails`: >=
            `1` character and <= `140` characters with a pattern of
            `^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$`

            (please note that the `’` symbol is the unicode value U+2019 (right
            single quotation mark) and not the unicode value U+0027
            (apostrophe))
  securitySchemes:
    apiKey:
      name: api-key
      type: apiKey
      in: header
      description: >-
        The API Key representing your Weavr account. You can find your API Key
        in your Weavr Portal in the API Credentials page.
    authToken:
      type: http
      description: >-
        The authentication token representing the user. This will be included in
        the login response object.
      scheme: bearer
      bearerFormat: JWT
tags:
  - name: Payment runs
    description: >
      A Payment run contains a list of supplier payments. A Payment run can be 

      - created by a user with a `CREATOR` role 

      - confirmed by a user with a `CONTROLLER` role

      - funded by a user with a `CONTROLLER` role


      Note that the Controller user must have their mobile device enrolled to
      SCA. 


      Before a payment run can be executed, it must be funded. Users with the
      `CONTROLLER` role must link their company's bank account(s) that are
      represented as Linked Accounts, which than can be used as the funding
      source for a payment run.


      Depending on the bank's constraints it may not be possible to deposit the
      total amount of funds required for a payment run, in which case the
      payment run will be automatically split into funding groups. All funding
      groups must be funded and executed for the payment run to be marked as
      completed. 


      Note that even if the payment is created successfully, you still need to
      check its status in order to determine if it is `completed` or`failed`.
  - name: Payment runs Webhooks
    description: Notification that the Payment Run and payment statuses have been updated.
    x-displayName: Payment runs
  - name: Buyers
    description: >
      Buyers are identities representing a business


      Once on-boarded, Buyers can create payment runs and pay their suppliers in
      your application.
  - name: Linked Accounts
    description: >-
      Linked accounts represent bank accounts that the buyer has with other
      banks. Once set up, they are used to fund payment runs.
  - name: Institutions
    description: Institutions supported by Embedded Payment Run.
  - name: Buyers Webhooks
    description: >-
      Buyers are identities representing companies. Once on-boarded, Buyers can
      create and manage their own instruments via your application.
    x-displayName: Buyers
  - name: Access Webhooks
    description: Access
    x-displayName: Access
  - name: Tokens Webhooks
    description: Tokens webhooks
    x-displayName: Login
  - name: Stepup Webhooks
    description: Notification that a step-up has been completed or declined.
    x-displayName: Stepup
  - name: Authentication Factors Webhooks
    description: >-
      Notification of the Authentication Factors that are used for the
      `Identity`.
    x-displayName: Authentication Factors
  - name: Linked Accounts Webhooks
    description: Notification that the status of a Linked Account has been updated.
    x-displayName: Linked Accounts
  - name: Simulator
    description: >
      Simulators enable you to trigger processes in Sandbox that in Production
      are triggered from an external action rather than from your application.
      this way you can test scenarios that otherwise you would only encounter in
      the Live environment.


      *Note: These endpoints are only available on Sandbox and won’t work in the
      Live environment.*
  - name: Buyer Authorised Users
    description: >
      Buyers can invite authorised users to access their account. Once
      on-boarded, authorised users can transact on behalf of the identity they
      are on-boarded with.


      Authorised users are typically employees who have access to company's
      banking accounts.


      Note that `/users` endpoints are to be used only for performing operations
      related to authorised users - getting or updating the details of _admin_
      users is to be done via `/buyers` endpoints.
  - name: Transactions Webhooks
    description: Notification that the status of a transaction has been updated.
    x-displayName: Transactions
x-tagGroups:
  - name: Authentication
    tags:
      - Tokens
      - Passwords
  - name: Authorisation
    tags:
      - Additional Factors
      - Step up
  - name: Identities
    tags:
      - Buyers
      - Buyer Authorised Users
  - name: Payment runs
    tags:
      - Payment runs
  - name: Instruments
    tags:
      - Linked Accounts
  - name: Institutions
    tags:
      - Institutions
  - name: Simulators
    tags:
      - Simulator
  - name: Events
    tags:
      - Buyers Webhooks
      - Payment runs Webhooks
      - Linked Accounts Webhooks
      - Tokens Webhooks
      - Stepup Webhooks
      - Authentication Factors Webhooks
      - Transactions Webhooks
