openapi: 3.0.1
info:
  title: Payment Queries
  version: '1'
  x-metadata:
    category:
      - Query Payments
    business:
      - Enterprise
    catalog-list: true
    generated: false
  description: >-
    Query your payments data based on a variety of parameters


    __Authentication__ 


    Set your headers:

      ```
        Authorization: {your_credentials}
        Accept: application/vnd.worldpay.payment-queries-v1.hal+json
      ```
    Replace `{your_credentials}` with your base64-encoded Basic Auth username
    and password.


    <br><br>

    __DNS Whitelisting__


    Whitelist the following URLs:

    * `https://try.access.worldpay.com/`

    * `https://access.worldpay.com/`


    Please ensure you use DNS whitelisting, not explicit IP whitelisting.
servers:
  - url: https://try.access.worldpay.com
    description: testing (try)
  - url: https://access.worldpay.com
    description: live
paths:
  /paymentQueries/payments:
    get:
      summary: Query payments
      description: >-
        Query payments within a specified date time range.


        These payments can be filtered by currency, minAmount, maxAmount,
        last4Digits & receivedEvents.


        The API returns data for payments processed after 25 June 2024. For
        payments processed before then use our [query for historical
        payments](/products/payment-queries/@v1/query-archive.md).
      operationId: queryByDateRange
      parameters:
        - in: header
          name: Accept
          required: true
          schema:
            type: string
            example: application/vnd.worldpay.payment-queries-v1.hal+json
        - name: startDate
          in: query
          description: >-
            An ISO 8601 date-time supplied as a string. Filters for payments
            that occurred after the specified date-time. Must be supplied
            alongside endDate.
          required: true
          schema:
            type: string
            example: '2024-04-28T21:30:20Z'
        - name: endDate
          in: query
          description: >-
            An ISO 8601 date-time supplied as a string. Filters for payments
            that occurred below the specified date-time. Must be supplied
            alongside startDate.
          required: true
          schema:
            type: string
            example: '2024-05-31T21:30:20Z'
        - name: pageSize
          in: query
          description: >-
            The maximum number of payments to be returned in the response (max
            300).
          required: false
          schema:
            maxLength: 300
            type: integer
            example: 10
        - name: currency
          in: query
          description: The three digit currency code.
          required: false
          schema:
            type: string
            example: GBP
        - name: minAmount
          in: query
          description: >-
            This is a whole number including the currency exponent (e.g. GBP has
            an exponent of 2, so for £2.50 supply:`250`).
          required: false
          schema:
            type: integer
            example: 0
        - name: maxAmount
          in: query
          description: >-
            This is a whole number including the currency exponent (e.g. GBP has
            an exponent of 2, so for £2.50 supply:`250`).
          required: false
          schema:
            type: integer
            example: 1000
        - name: last4Digits
          in: query
          description: The last four digits of the card number.
          required: false
          schema:
            type: string
            example: '1111'
        - name: entityReferences
          in: query
          description: Your entity reference(s).
          required: false
          schema:
            type: string
            example: entityReference1,entityReference2
        - name: receivedEvents
          in: query
          description: Name of the event.
          required: false
          schema:
            type: string
            example: authorizationRequested, authorizationSucceeded
        - name: transactionReference
          in: query
          description: >-
            A unique reference generated by you, used to identify a payment
            throughout its lifecycle. This shouldn't be used in conjunction with
            the above fields. Use it as a single parameter to query data.
          required: false
          schema:
            type: string
            example: Memory265-13/08/1876
      responses:
        '200':
          description: >-
            Summary information of list of payments within a specified date
            range.
          content:
            application/vnd.worldpay.payment-queries-v1.hal+json:
              schema:
                $ref: '#/components/schemas/pq_querybydaterange_200_response'
              examples:
                Query payments within a specified date time range:
                  description: Query payments within a specified date time range
                  value:
                    _links:
                      self:
                        href: >-
                          /paymentQueries/payments?startDate=2025-07-05T21:30:20Z&endDate=2025-07-08T21:30:20Z&pageSize=10
                    _embedded:
                      payments:
                        - timestamp: '2025-07-07T12:09:36.984Z'
                          transactionReference: Memory265-13/08/1876
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          paymentInstrument:
                            type: card/plain
                          value:
                            currency: GBP
                            amount: 500
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay4u_lHl2jobU5S1T2pWkq10
                        - timestamp: '2025-07-07T12:05:01.134Z'
                          transactionReference: Memory266
                          transactionType: oneTime
                          authorizationType: sale
                          entity: default
                          issuer:
                            authorizationCode: '948295'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/plain+masked
                            card:
                              number:
                                last4Digits: '1111'
                                cardBin: '444433'
                              brand: visa
                              expiryDate:
                                month: 5
                                year: 2035
                              fundingType: credit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 500
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay3f7oMDb3cCr2z-e_5L4vt0
                        - timestamp: '2025-07-07T11:07:38.731Z'
                          transactionReference: adb83260-cf42-439f-bd71-4ccdbc01d020
                          transactionType: cardOnFile
                          authorizationType: authorization
                          entity: default
                          paymentInstrument:
                            type: card/plain
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay7Ge3tsYs4rrt-ieK2A3Pi0
                        - timestamp: '2025-07-07T10:22:19.844Z'
                          transactionReference: 897b8357-0c45-4529-93ce-136dbeac562f
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '478296'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/a71b92c5-da14-4043-8083-76e7b3d23680
                        - timestamp: '2025-07-07T10:21:28.717Z'
                          transactionReference: 93c3df1f-d5c9-4b6b-8f76-8334bae9b0e4
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '737147'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/2a4d37cb-03b1-48c0-a588-dc1a00a83c5f
                        - timestamp: '2025-07-07T10:21:12.755Z'
                          transactionReference: 75c40ad1-3945-4c48-a6ad-043e346072be
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '995350'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/e638cfbd-5df9-40da-9996-938bb636e299
                Query payments within a specified date time range filtered by currency:
                  description: >-
                    Query payments within a specified date time range filtered
                    by currency
                  value:
                    _links:
                      self:
                        href: >-
                          /paymentQueries/payments?startDate=2025-07-05T21:30:20Z&endDate=2025-07-08T21:30:20Z&currency=GBP&pageSize=10
                    _embedded:
                      payments:
                        - timestamp: '2025-07-07T12:09:36.984Z'
                          transactionReference: Memory265-13/08/1876
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          paymentInstrument:
                            type: card/plain
                          value:
                            currency: GBP
                            amount: 500
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay4u_lHl2jobU5S1T2pWkq10
                        - timestamp: '2025-07-07T12:05:01.134Z'
                          transactionReference: Memory266
                          transactionType: oneTime
                          authorizationType: sale
                          entity: default
                          issuer:
                            authorizationCode: '948295'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/plain+masked
                            card:
                              number:
                                last4Digits: '1111'
                                cardBin: '444433'
                              brand: visa
                              expiryDate:
                                month: 5
                                year: 2035
                              fundingType: credit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 500
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay3f7oMDb3cCr2z-e_5L4vt0
                        - timestamp: '2025-07-07T11:07:38.731Z'
                          transactionReference: adb83260-cf42-439f-bd71-4ccdbc01d020
                          transactionType: cardOnFile
                          authorizationType: authorization
                          entity: default
                          paymentInstrument:
                            type: card/plain
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay7Ge3tsYs4rrt-ieK2A3Pi0
                        - timestamp: '2025-07-07T10:22:19.844Z'
                          transactionReference: 897b8357-0c45-4529-93ce-136dbeac562f
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '478296'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/a71b92c5-da14-4043-8083-76e7b3d23680
                        - timestamp: '2025-07-07T10:21:28.717Z'
                          transactionReference: 93c3df1f-d5c9-4b6b-8f76-8334bae9b0e4
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '737147'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/2a4d37cb-03b1-48c0-a588-dc1a00a83c5f
                        - timestamp: '2025-07-07T10:21:12.755Z'
                          transactionReference: 75c40ad1-3945-4c48-a6ad-043e346072be
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '995350'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/e638cfbd-5df9-40da-9996-938bb636e299
                Query payments within a specified date time range filtered by currency, amount:
                  description: >-
                    Query payments within a specified date time range filtered
                    by currency, amount
                  value:
                    _links:
                      self:
                        href: >-
                          /paymentQueries/payments?startDate=2025-07-05T21:30:20Z&endDate=2025-07-08T21:30:20Z&minAmount=250&maxAmount=300&pageSize=20
                    _embedded:
                      payments:
                        - timestamp: '2025-07-07T11:07:38.731Z'
                          transactionReference: adb83260-cf42-439f-bd71-4ccdbc01d020
                          transactionType: cardOnFile
                          authorizationType: authorization
                          entity: default
                          paymentInstrument:
                            type: card/plain
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay7Ge3tsYs4rrt-ieK2A3Pi0
                        - timestamp: '2025-07-07T10:22:19.844Z'
                          transactionReference: 897b8357-0c45-4529-93ce-136dbeac562f
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '478296'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/a71b92c5-da14-4043-8083-76e7b3d23680
                        - timestamp: '2025-07-07T10:21:28.717Z'
                          transactionReference: 93c3df1f-d5c9-4b6b-8f76-8334bae9b0e4
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '737147'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/2a4d37cb-03b1-48c0-a588-dc1a00a83c5f
                        - timestamp: '2025-07-07T10:21:12.755Z'
                          transactionReference: 75c40ad1-3945-4c48-a6ad-043e346072be
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '995350'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/e638cfbd-5df9-40da-9996-938bb636e299
                Query payments within a specified date time range filtered by last4Digits:
                  description: >-
                    Query payments within a specified date time range filtered
                    by last4Digits
                  value:
                    _links:
                      self:
                        href: >-
                          /paymentQueries/payments?startDate=2025-07-05T21:30:20Z&endDate=2025-07-08T21:30:20Z&minAmount=250&maxAmount=300&last4Digits=9224&pageSize=20
                    _embedded:
                      payments:
                        - timestamp: '2025-07-07T10:22:19.844Z'
                          transactionReference: 897b8357-0c45-4529-93ce-136dbeac562f
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '478296'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/a71b92c5-da14-4043-8083-76e7b3d23680
                        - timestamp: '2025-07-07T10:21:28.717Z'
                          transactionReference: 93c3df1f-d5c9-4b6b-8f76-8334bae9b0e4
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '737147'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/2a4d37cb-03b1-48c0-a588-dc1a00a83c5f
                        - timestamp: '2025-07-07T10:21:12.755Z'
                          transactionReference: 75c40ad1-3945-4c48-a6ad-043e346072be
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '995350'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/e638cfbd-5df9-40da-9996-938bb636e299
                Query payments within a specified date time range filtered by receivedEvents:
                  description: >-
                    Query payments within a specified date time range filtered
                    by receivedEvents
                  value:
                    _links:
                      self:
                        href: >-
                          /paymentQueries/payments?startDate=2025-07-05T21:30:20Z&endDate=2025-07-08T21:30:20Z&receivedEvents=authorizationRequested&pageSize=20
                    _embedded:
                      payments:
                        - timestamp: '2025-07-07T12:09:36.984Z'
                          transactionReference: Memory265-13/08/1876
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          paymentInstrument:
                            type: card/plain
                          value:
                            currency: GBP
                            amount: 500
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay4u_lHl2jobU5S1T2pWkq10
                        - timestamp: '2025-07-07T11:07:38.731Z'
                          transactionReference: adb83260-cf42-439f-bd71-4ccdbc01d020
                          transactionType: cardOnFile
                          authorizationType: authorization
                          entity: default
                          paymentInstrument:
                            type: card/plain
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay7Ge3tsYs4rrt-ieK2A3Pi0
                        - timestamp: '2025-07-07T10:22:19.844Z'
                          transactionReference: 897b8357-0c45-4529-93ce-136dbeac562f
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '478296'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/a71b92c5-da14-4043-8083-76e7b3d23680
                        - timestamp: '2025-07-07T10:21:28.717Z'
                          transactionReference: 93c3df1f-d5c9-4b6b-8f76-8334bae9b0e4
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '737147'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/2a4d37cb-03b1-48c0-a588-dc1a00a83c5f
                        - timestamp: '2025-07-07T10:21:12.755Z'
                          transactionReference: 75c40ad1-3945-4c48-a6ad-043e346072be
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '995350'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/e638cfbd-5df9-40da-9996-938bb636e299
                Query payments within a specified date time range filtered by entityReferences:
                  description: >-
                    Query payments within a specified date time range filtered
                    by entityReferences
                  value:
                    _links:
                      self:
                        href: >-
                          /paymentQueries/payments?startDate=2025-07-05T21:30:20Z&endDate=2025-07-08T21:30:20Z&minAmount=250&maxAmount=300&entityReferences=default&pageSize=20
                    _embedded:
                      payments:
                        - timestamp: '2025-07-07T11:07:38.731Z'
                          transactionReference: adb83260-cf42-439f-bd71-4ccdbc01d020
                          transactionType: cardOnFile
                          authorizationType: authorization
                          entity: default
                          paymentInstrument:
                            type: card/plain
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay7Ge3tsYs4rrt-ieK2A3Pi0
                        - timestamp: '2025-07-07T10:22:19.844Z'
                          transactionReference: 897b8357-0c45-4529-93ce-136dbeac562f
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '478296'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/a71b92c5-da14-4043-8083-76e7b3d23680
                        - timestamp: '2025-07-07T10:21:28.717Z'
                          transactionReference: 93c3df1f-d5c9-4b6b-8f76-8334bae9b0e4
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '737147'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/2a4d37cb-03b1-48c0-a588-dc1a00a83c5f
                        - timestamp: '2025-07-07T10:21:12.755Z'
                          transactionReference: 75c40ad1-3945-4c48-a6ad-043e346072be
                          transactionType: oneTime
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: '995350'
                          scheme:
                            reference: '060720116005062'
                          paymentInstrument:
                            type: card/network+masked
                            card:
                              number:
                                last4Digits: '9224'
                                cardBin: '483196'
                              brand: visa
                              expiryDate:
                                month: 12
                                year: 2028
                              countryCode: SG
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 250
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/e638cfbd-5df9-40da-9996-938bb636e299
                Query payments by transactionReference:
                  description: Querying a payment by a transactionReference
                  value:
                    _links:
                      self:
                        href: >-
                          /paymentQueries/payments?transactionReference=7JulyNIDb
                    _embedded:
                      payments:
                        - timestamp: '2025-07-07T12:42:49.180Z'
                          transactionReference: 7JulyNIDb
                          narrative:
                            line1: narrativeline1
                            line2: narrativeline2
                          transactionType: cardOnFile
                          authorizationType: authorization
                          entity: default
                          issuer:
                            authorizationCode: A12345
                          scheme:
                            reference: '060720116005062'
                          updatedPaymentInstrument:
                            type: card/plain+masked
                            card:
                              number:
                                last4Digits: '0275'
                                cardBin: '478901'
                              brand: visa
                              expiryDate:
                                month: 10
                                year: 2036
                              countryCode: GB
                              fundingType: credit
                            accountUpdaterMessage: The account number was changed
                          paymentInstrument:
                            type: card/plain
                            card:
                              number:
                                last4Digits: '0274'
                                cardBin: '478900'
                              brand: visa
                              expiryDate:
                                month: 9
                                year: 2035
                              countryCode: GB
                              fundingType: debit
                              issuerName: UNKNOWN
                              paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                              category: consumer
                          value:
                            currency: GBP
                            amount: 1120
                          _links:
                            self:
                              href: >-
                                /paymentQueries/payments/pay--S12bK--A-m30q---__w0
                Query payments by transactionReference (no results):
                  description: >-
                    Querying a payment by a transactionReference, with no
                    matching results found
                  value:
                    _links:
                      self:
                        href: >-
                          /paymentQueries/payments?transactionReference=Memory267
                      paymentQueries:queryArchive:
                        href: >-
                          /paymentQueries/archivedPayments?Memory267&entityReference=default
                        templated: true
                    _embedded:
                      payments: []
        '400':
          description: Bad request
          content:
            application/vnd.worldpay.payment-queries-v1.hal+json:
              schema:
                $ref: '#/components/schemas/pq_querybydaterange_400_response'
              examples:
                Invalid parameter (pageSize):
                  description: Invalid page size
                  value:
                    errorName: invalidPageSize
                    message: Provided page size is not valid.
                Invalid parameter (Start date too old):
                  description: Start date must not be older than one year
                  value:
                    errorName: startDateTooOld
                    message: Provided start date must not be older than 1 year.
                Invalid parameter (last4Digits):
                  description: Exactly 4 integers must be provided
                  value:
                    errorName: invalidLast4Digits
                    message: Provided last 4 digits are not valid.
  /paymentQueries/payments/{paymentId}:
    get:
      summary: Retrieve a payment
      description: >-
        Retrieve a single payment by payment ID.


        The API returns detailed data for payments processed after 25 June 2024.
        For payments processed before then use our [query for historical
        payments](/products/payment-queries/@v1/query-archive.md).
      operationId: retrieveByPaymentId
      parameters:
        - in: header
          name: Accept
          required: true
          schema:
            type: string
            example: application/vnd.worldpay.payment-queries-v1.hal+json
        - name: paymentId
          in: path
          required: true
          description: >-
            Unique identifier generated for each payment. Historic `paymentId`
            values in UUID format.
          example: payv0A4Hx2eY1-5P2_CpV7qy0
          schema:
            type: string
      responses:
        '200':
          description: >-
            Retrieve complete details of a single payment including the event
            history & next action links.
          content:
            application/vnd.worldpay.payment-queries-v1.hal+json:
              schema:
                $ref: '#/components/schemas/pq_querybypaymentid_200_response'
              examples:
                Retrieve a payment by paymentId (authorization succeeded):
                  description: >-
                    Retrieve a single payment using the paymentId where the
                    requested authorization succeeded
                  value:
                    timestamp: '2025-06-08T16:11:13.164Z'
                    transactionReference: 89197aeb-c94a-456e-8014-1272fbcb64eb
                    narrative:
                      line1: trading name
                      line2: order number
                    transactionType: oneTime
                    authorizationType: authorization
                    entity: default
                    issuer:
                      authorizationCode: T31306
                    scheme:
                      reference: 'MCCOLXT1C0104  '
                    paymentInstrument:
                      type: card/plain+masked
                      card:
                        number:
                          last4Digits: '1111'
                          cardBin: '444433'
                        brand: visa
                        expiryDate:
                          month: 5
                          year: 2030
                        countryCode: GB
                        fundingType: credit
                        issuerName: AN ISSUING BANK LTD
                        paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                        category: consumer
                    value:
                      currency: GBP
                      amount: 1200
                    events:
                      - eventName: authorizationRequested
                        timestamp: '2025-06-08T16:11:13.164Z'
                      - eventName: authorizationSucceeded
                        timestamp: '2025-06-08T16:11:14.229Z'
                        outcome: authorized
                    _links:
                      self:
                        href: /paymentQueries/payments/payv0A4Hx2eY1-5P2_CpV7qy0
                      cardPayments:cancel:
                        href: >-
                          https://access.worldpay.com/payments/authorizations/cancellations/{linkData}
                      cardPayments:settle:
                        href: >-
                          https://access.worldpay.com/payments/settlements/full/{linkData}
                      cardPayments:partialSettle:
                        href: >-
                          https://access.worldpay.com/payments/settlements/partials/{linkData}
                      cardPayments:events:
                        href: https://access.worldpay.com/payments/events/{linkData}
                      cardPayments:partialCancel:
                        href: >-
                          https://access.worldpay.com/payments/authorizations/cancellations/partials/{linkData}
                      cardPayments:reverse:
                        href: >-
                          https://access.worldpay.com/payments/authorizations/reversals/{linkData}
                Retrieve a payment by paymentId (authorization refused):
                  description: >-
                    Retrieve a single payment using the paymentId where the
                    requested authorization was refused by the issuer
                  value:
                    timestamp: '2025-06-08T16:19:24.365Z'
                    transactionReference: db38791b-7735-449a-b118-16b2419926ab
                    narrative:
                      line1: trading name
                    transactionType: oneTime
                    authorizationType: authorization
                    entity: AccessWP
                    paymentInstrument:
                      type: card/plain+masked
                      card:
                        number:
                          last4Digits: '1111'
                          cardBin: '444433'
                        brand: visa
                        fundingType: credit
                        issuerName: UNKNOWN
                        category: consumer
                    value:
                      currency: GBP
                      amount: 1200
                    events:
                      - eventName: authorizationRequested
                        timestamp: '2025-06-08T16:19:24.365Z'
                      - eventName: authorizationRefused
                        timestamp: '2025-06-08T16:19:24.801Z'
                        description: Do not honour
                        code: '5'
                        outcome: refused
                    _links:
                      self:
                        href: /paymentQueries/payments/payBnu__aoOVW2p4D2ztI0NM0
                Retrieve a payment by paymentId (authorization failed):
                  description: >-
                    Retrieve a single payment using the paymentId where the
                    requested authorization failed
                  value:
                    timestamp: '2025-06-08T16:06:03.266Z'
                    transactionReference: 45297dcb-344a-123e-2914-9243fbde55fa
                    narrative:
                      line1: trading name
                    transactionType: oneTime
                    authorizationType: authorization
                    entity: AccessWP
                    paymentInstrument:
                      type: card/plain
                    value:
                      currency: GBP
                      amount: 10
                    events:
                      - eventName: authorizationRequested
                        timestamp: '2025-06-08T16:06:03.266Z'
                      - eventName: authorizationFailed
                        timestamp: '2025-06-08T16:06:03.398Z'
                        error:
                          name: internalErrorOccurred
                          message: Bad request reported downstream
                    _links:
                      self:
                        href: /paymentQueries/payments/payT2xg9cnwFBSwCNGmi-r3b0
                Retrieve a payment by paymentId (authorization requested):
                  description: >-
                    Retrieve a single payment using the paymentId where an
                    authorization was requested, but no outcome has yet been
                    received
                  value:
                    timestamp: '2025-07-07T11:07:38.731Z'
                    transactionReference: 428c0aed-230c-46cc-9897-b6f935378078
                    narrative:
                      line1: trading name
                    transactionType: cardOnFile
                    authorizationType: authorization
                    entity: default
                    paymentInstrument:
                      type: card/plain
                    value:
                      currency: GBP
                      amount: 250
                    events:
                      - eventName: authorizationRequested
                        timestamp: '2025-07-07T11:07:38.731Z'
                    _links:
                      self:
                        href: /paymentQueries/payments/paycGeAtsYssrrtgieKBA3Pi0
                Retrieve a payment by paymentId (authorization succeeded, settled, refunded):
                  description: >-
                    Retrieve a single payment using the paymentId where the
                    requested authorization succeeded and was subsequently
                    settled and refunded
                  value:
                    timestamp: '2025-06-08T16:11:13.164Z'
                    transactionReference: 89197aeb-c94a-456e-8014-1272fbcb64eb
                    narrative:
                      line1: trading name
                      line2: order number
                    transactionType: oneTime
                    authorizationType: authorization
                    entity: default
                    issuer:
                      authorizationCode: T31306
                    scheme:
                      reference: 'MCCOLXT1C0104  '
                    paymentInstrument:
                      type: card/plain+masked
                      card:
                        number:
                          last4Digits: '1111'
                          cardBin: '444433'
                        brand: visa
                        expiryDate:
                          month: 5
                          year: 2030
                        countryCode: GB
                        fundingType: credit
                        issuerName: AN ISSUING BANK LTD
                        paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                        category: consumer
                    value:
                      currency: GBP
                      amount: 1200
                    events:
                      - eventName: authorizationRequested
                        timestamp: '2025-06-08T16:11:13.164Z'
                      - eventName: authorizationSucceeded
                        timestamp: '2025-06-08T16:11:14.229Z'
                        outcome: authorized
                      - eventName: settlementRequested
                        timestamp: '2025-06-09T08:14:23.138Z'
                        type: partialSettlement
                        settlementReference: mySettleRef
                        value:
                          currency: GBP
                          amount: 1000
                      - eventName: settlementRequestSubmitted
                        timestamp: '2025-06-09T08:14:23.224Z'
                      - eventName: refundRequested
                        timestamp: '2025-07-01T09:14:28.009Z'
                        type: partialRefund
                        refundReference: myRefundRef
                        value:
                          currency: GBP
                          amount: 1000
                      - eventName: refundRequestSubmitted
                        timestamp: '2025-07-01T09:14:28.151Z'
                    _links:
                      self:
                        href: /paymentQueries/payments/payVGX28GOT7iDY5qanttPWF0
                      payments:events:
                        href: https://access.worldpay.com/payments/events/{linkData}
                      payments:partialRefund:
                        href: >-
                          https://access.worldpay.com/payments/settlements/refunds/partials/{linkData}
        '404':
          description: The payment was not found.
          content:
            application/vnd.worldpay.payment-queries-v1.hal+json:
              schema:
                $ref: '#/components/schemas/pq_querybypaymentid_404_response'
              examples:
                paymentId not found:
                  description: The payment was not found.
                  value:
                    errorName: paymentNotFound
                    message: The payment you are trying to access does not exist.
  /paymentQueries/archivedPayments:
    get:
      summary: Query historical payments
      description: >-
        Query payments processed before 25 June 2024.


        Provide a `transactionReference` and `entityReference` for a payment to
        find the matching payment in the archive.
      operationId: queryArchivedPayments
      parameters:
        - in: header
          name: Accept
          required: true
          schema:
            type: string
            example: application/vnd.worldpay.payment-queries-v1.hal+json
        - name: transactionReference
          in: query
          description: >-
            A unique reference generated by you, used to identify a payment
            throughout its lifecycle.
          required: true
          schema:
            type: string
            example: 89197aeb-c94a-456e-8014-1272fbcb64eb
        - name: entityReference
          in: query
          description: A merchant entity.
          required: true
          schema:
            type: string
            example: default
      responses:
        '200':
          description: Summary information of a payment.
          content:
            application/vnd.worldpay.payment-queries-v1.hal+json:
              schema:
                $ref: '#/components/schemas/pq_queryhistoricalpayments_200_response'
              examples:
                Query historical payments:
                  description: >-
                    Query historical payments with a transactionReference &
                    entityReference
                  value:
                    _embedded:
                      payments:
                        - lastEvent: Authorized
                          value:
                            amount: 500
                            currency: GBP
                          paymentInstrument:
                            type: card/plain
                            card:
                              number:
                                last4Digits: '1111'
                              brand: visa
                          _links:
                            payments:cancel:
                              href: >-
                                https://try.access.worldpay.com/payments/authorizations/cancellations/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:miQ42Na870582T9ERg+1ZUryhkE+qW88hu1DdDl2T76sf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHa6q9jMukzvEX+SLmppl6itAGDMxqvmBKsIqEipLj126
                            payments:settle:
                              href: >-
                                https://try.access.worldpay.com/payments/settlements/full/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:miQ42Na870582T9ERg+1ZUryhkE+qW88hu1DdDl2T76sf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHa6q9jMukzvEX+SLmppl6itAGDMxqvmBKsIqEipLj126
                            payments:partialSettle:
                              href: >-
                                https://try.access.worldpay.com/payments/settlements/partials/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:miQ42Na870582T9ERg+1ZUryhkE+qW88hu1DdDl2T76sf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHa6q9jMukzvEX+SLmppl6itAGDMxqvmBKsIqEipLj126
                    _links:
                      self:
                        href: >-
                          /paymentQueries/archivedPayments?entityReference=default&transactionReference=Test123
        '400':
          description: Bad request
          content:
            application/vnd.worldpay.payment-queries-v1.hal+json:
              schema:
                $ref: '#/components/schemas/pq_queryhistoricalpayments_400_response'
              examples:
                Entity not configured:
                  description: Entity not configured
                  value:
                    errorName: entityIsNotConfigured
                    message: Entity is not configured to use this resource
components:
  schemas:
    authorizationRequested:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Worldpay has received your authorization request.
          enum:
            - authorizationRequested
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    authorizationSucceeded:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: >-
            Your authorization request was successfully approved by the card
            issuer.
          enum:
            - authorizationSucceeded
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
        outcome:
          type: string
          description: >-
            Outcome of the event. For every requested event there can be a
            successful or refused event outcome.
          enum:
            - authorized
    authorizationRefused:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your authorization request was refused by the card issuer.
          enum:
            - authorizationRefused
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
        outcome:
          type: string
          description: >-
            Outcome of the event. For every requested event there can be a
            successful or refused event outcome.
          enum:
            - refused
        code:
          type: string
          description: The response code, used to identify the refusal reason.
          example: '65'
        description:
          type: string
          description: The description of the refusal reason.
          example: Authentication Requested
    authorizationFailed:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your authorization request failed.
          enum:
            - authorizationFailed
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
        error:
          type: object
          description: All Failed events return error object with name and message.
          properties:
            name:
              type: string
              description: Example values are,
              enum:
                - internalErrorOccurred
                - transactionReferenceIsADuplicate
                - transactionHasAlreadyBeenProcessed
                - channelIsNotSupported
                - currencyIsNotSupported
                - paymentInstrumentIsNotSupported
                - fieldHasInvalidValue
                - fieldIsEmpty
                - cardNumberIsNotRecognized
                - underlyingPaymentInstrumentHasExpired
                - entityIsNotConfigured
            message:
              type: string
              description: Example values are,
              enum:
                - Payment failed to be authorized
                - Token is unrecognized
                - The transaction reference is a duplicate
                - The transaction has already been processed
                - Currency not supported
    authorizationTimedOut:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your authorization request timed out.
          enum:
            - authorizationTimedOut
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    saleRequested:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Worldpay has received your sale request.
          enum:
            - saleRequested
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    saleSucceeded:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: >-
            Your authorization request was successfully approved by the card
            issuer.
          enum:
            - saleSucceeded
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
        outcome:
          type: string
          description: >-
            Outcome of the event. For every requested event there can be a
            successful or refused event outcome.
          enum:
            - authorized
    saleRefused:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your sale request was refused by the card issuer.
          enum:
            - saleRefused
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
        outcome:
          type: string
          description: >-
            Outcome of the event. For every requested event there can be a
            successful or refused event outcome.
          enum:
            - refused
        code:
          type: string
          description: The response code, used to identify the refusal reason.
          example: '65'
        description:
          type: string
          description: The description of the refusal reason.
          example: Authentication Requested
    saleFailed:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your sale request failed.
          enum:
            - saleFailed
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
        error:
          type: object
          description: All Failed events return error object with name and message.
          properties:
            name:
              type: string
              description: Example values are,
              enum:
                - internalErrorOccurred
                - transactionReferenceIsADuplicate
                - transactionHasAlreadyBeenProcessed
                - channelIsNotSupported
                - currencyIsNotSupported
                - paymentInstrumentIsNotSupported
                - fieldHasInvalidValue
                - fieldIsEmpty
                - cardNumberIsNotRecognized
                - underlyingPaymentInstrumentHasExpired
                - entityIsNotConfigured
            message:
              type: string
              description: Example values are,
              enum:
                - Payment failed to be authorized
                - Token is unrecognized
                - The transaction reference is a duplicate
                - The transaction has already been processed
                - Currency not supported
    saleTimedOut:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your sale request timed out.
          enum:
            - saleTimedOut
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    settlementRequested:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Worldpay has received your settlement request.
          enum:
            - settlementRequested
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
        type:
          type: string
          enum:
            - fullSettlement
            - partialSettlement
        settlementReference:
          type: string
          description: Your settlement reference
        value:
          required:
            - amount
            - currency
          type: object
          description: >-
            An object that contains the amount and currency requested for
            settlement.
          properties:
            amount:
              type: integer
              description: >-
                This is a whole number including the currency exponent (e.g. GBP
                has an exponent of 2, so for £2.50 supply:`250`)
            currency:
              type: string
              description: The 3 digit currency code.
    settlementRequestSubmitted:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your settlement request was successfully sent for processing.
          enum:
            - settlementRequestSubmitted
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    settlementFailed:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your settlement request failed.
          enum:
            - settlementFailed
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    settlementTimedOut:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your settlement request timed out.
          enum:
            - settlementTimedOut
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    refundRequested:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Worldpay has received your refund request.
          enum:
            - refundRequested
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
        type:
          type: string
          enum:
            - fullRefund
            - partialRefund
        refundReference:
          type: string
          description: Your refund reference
        value:
          required:
            - amount
            - currency
          type: object
          description: >-
            An object that contains the amount and currency requested for
            refund.
          properties:
            amount:
              type: integer
              description: >-
                This is a whole number including the currency exponent (e.g. GBP
                has an exponent of 2, so for £2.50 supply:`250`)
            currency:
              type: string
              description: The 3 digit currency code.
    refundRequestSubmitted:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your refund request was successfully sent for processing.
          enum:
            - refundRequestSubmitted
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    refundFailed:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your refund request failed.
          enum:
            - refundFailed
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    refundTimedOut:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your refund request timed out.
          enum:
            - refundTimedOut
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    cancellationRequested:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Worldpay has received your cancellation request.
          enum:
            - cancellationRequested
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    cancellationRequestSubmitted:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your cancellation request was successfully sent for processing.
          enum:
            - cancellationRequestSubmitted
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    cancellationFailed:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your cancellation request failed.
          enum:
            - cancellationFailed
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    cancellationTimedOut:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your cancellation request timed out.
          enum:
            - cancellationTimedOut
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    reversalRequested:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Worldpay has received your reversal request.
          enum:
            - reversalRequested
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
        value:
          required:
            - amount
            - currency
          type: object
          description: >-
            An object that contains the amount and currency requested for
            reversal.
          properties:
            amount:
              type: integer
              description: >-
                This is a whole number including the currency exponent (e.g. GBP
                has an exponent of 2, so for £2.50 supply:`250`)
            currency:
              type: string
              description: The 3 digit currency code.
    reversalRequestSubmitted:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your reversal request was successfully sent for processing.
          enum:
            - reversalRequestSubmitted
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    reversalFailed:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your reversal request failed.
          enum:
            - reversalFailed
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    reversalTimedOut:
      required:
        - eventName
      type: object
      properties:
        eventName:
          type: string
          description: Your reversal request timed out.
          enum:
            - reversalTimedOut
        timestamp:
          type: string
          description: The ISO 8601 date-time at which the event was created.
    pq_querybypaymentid_200_response:
      type: object
      properties:
        timestamp:
          type: string
          description: Payment initial authorization time.
          example: '2024-05-30T09:49:45.962Z'
        transactionReference:
          maxLength: 64
          minLength: 1
          pattern: ^[-A-Za-z0-9_!@#$%()*=.:;?\[\]{}~`/+]*$
          type: string
          description: >-
            A unique reference generated by you, used to identify a payment
            throughout its lifecycle.
        narrative:
          required:
            - line1
          type: object
          description: >-
            The text that appears on your customer's statement. Used to identify
            the merchant.
          properties:
            line1:
              type: string
              description: >-
                The first line of the narrative which appears on your customer's
                statement (24 characters max. If character is not supported it
                is replaced with a space).
            line2:
              type: string
              description: >-
                Additional details about the payment e.g. order number,
                telephone number.
        transactionType:
          enum:
            - oneTime
            - cardOnFile
            - recurring
          type: string
          description: The transaction type of the payment.
        authorizationType:
          enum:
            - authorization
            - sale
          type: string
          description: The authorization type of the payment.
        entity:
          maxLength: 32
          minLength: 1
          pattern: ^([A-Za-z0-9]+[A-Za-z0-9 ]*)?$
          type: string
          description: Merchant entity name.
          example: default
        scheme:
          required:
            - reference
          type: object
          description: An object containing information returned by the card scheme.
          properties:
            reference:
              type: string
              description: >-
                The reference returned by the scheme for this particular payment
                authorization.
              example: 'MCCOLXT1C0104  '
        issuer:
          required:
            - authorizationCode
          type: object
          description: An object containing information returned by the issuer.
          properties:
            authorizationCode:
              pattern: ^[a-zA-Z0-9]+$
              type: string
              description: >-
                A code returned by the card issuer for a successful
                authorization. Used in reconciliation and dispute management.
              example: T31306
        paymentInstrument:
          type: object
          description: The payment instrument supplied in the authorization request.
          properties:
            type:
              enum:
                - card/plain
                - card/network
                - card/networkToken
                - card/networkToken+applepay
                - card/networkToken+googlepay
                - card/plain+masked
              type: string
              description: >-
                The type of payment instrument supplied in the authorization
                request.
            card:
              type: object
              description: An object that contains information about the card used.
              properties:
                number:
                  type: object
                  description: An object that contains information about the card number.
                  properties:
                    cardBin:
                      pattern: ^[0-9*]+$
                      type: string
                      description: >-
                        The card BIN (Bank Identification Number) is the first 6
                        or 8 digits of the card number, and can be used to
                        identify the card issuer, the card brand(s) (eg Visa,
                        Cartes Bancaires), and the country. Card BINs are used
                        to route transactions, check card capabilities, and in
                        fraud assessments.
                      example: '444433'
                    last4Digits:
                      pattern: ^[0-9*]+$
                      type: string
                      description: >-
                        The last four digits of the card. Some characters may be
                        obfuscated with a `*` if the PAN length is less than 16
                        characters.
                      example: '1111'
                category:
                  type: string
                  description: >-
                    Whether the card is classed as a consumer card or a card for
                    commercial use.
                  enum:
                    - commercial
                    - consumer
                countryCode:
                  maxLength: 2
                  minLength: 2
                  pattern: ^[A-Z]+$
                  type: string
                  description: >-
                    The [ISO 3166-1 Alpha-2
                    format](/products/reference/supported-countries-currencies#iso-country-codes)
                    country code that the card was issued in. May return `N/A`
                    where the country is unknown.
                  example: GB
                expiryDate:
                  type: object
                  description: >-
                    The expiry date of the card or network token (where the
                    supplied paymentInstrument was `card/wallet+applepay`,
                    `card/wallet+googlepay`, `card/networkToken`,
                    `card/networkToken+applepay` or
                    `card/networkToken+googlepay`)
                  properties:
                    month:
                      type: integer
                    year:
                      type: integer
                issuerName:
                  type: string
                  description: The name of the card issuer.
                  example: AN ISSUING BANK LTD
                fundingType:
                  type: string
                  description: How the card is funded.
                  enum:
                    - credit
                    - debit
                    - prepaid
                    - chargeCard
                    - deferredDebit
                brand:
                  type: string
                  description: >-
                    The card brand that the transaction was processed with.
                    Sometimes referred to as the network or scheme.
                  example: visa
                paymentAccountReference:
                  type: string
                  description: >-
                    The payment account reference (PAR) is a non-financial
                    reference that uniquely identifies the underlying cardholder
                    account. This allows you to correlate payments made from the
                    same account with differing instruments (e.g. `card/plain`
                    and `card/wallet+applepay`), where the same account funds
                    the transaction. A PAR cannot be used to initiate a payment.
                  example: Q1HJZ28RKA1EBL470G9XYG90R5D3E
        updatedPaymentInstrument:
          type: object
          description: The payment instrument supplied in the authorization request.
          properties:
            type:
              enum:
                - card/networkToken
                - card/plain+masked
              type: string
              description: >-
                The type of payment instrument supplied in the authorization
                request.
            card:
              type: object
              description: An object that contains information about the card used.
              properties:
                number:
                  type: object
                  description: An object that contains information about the card number.
                  properties:
                    cardBin:
                      pattern: ^[0-9*]+$
                      type: string
                      description: >-
                        The card BIN (Bank Identification Number) is the first 6
                        or 8 digits of the card number, and can be used to
                        identify the card issuer, the card brand(s) (eg Visa,
                        Cartes Bancaires), and the country. Card BINs are used
                        to route transactions, check card capabilities, and in
                        fraud assessments.
                      example: '444433'
                    last4Digits:
                      pattern: ^[0-9*]+$
                      type: string
                      description: >-
                        The last four digits of the card. Some characters may be
                        obfuscated with a `*` if the PAN length is less than 16
                        characters.
                      example: '1111'
                expiryDate:
                  type: object
                  description: >-
                    The expiry date of the card or network token (where the
                    supplied paymentInstrument was `card/wallet+applepay`,
                    `card/wallet+googlepay`, `card/networkToken`,
                    `card/networkToken+applepay` or
                    `card/networkToken+googlepay`)
                  properties:
                    month:
                      type: integer
                    year:
                      type: integer
                fundingType:
                  type: string
                  description: How the card is funded.
                  enum:
                    - credit
                    - debit
                    - prepaid
                    - chargeCard
                    - deferredDebit
                brand:
                  type: string
                  description: >-
                    The card brand that the transaction was processed with.
                    Sometimes referred to as the network or scheme.
                  example: visa
            accountUpdaterMessage:
              type: string
              description: Details on the type of payment instrument update.
              enum:
                - The merchant is not registered in the update program
                - The account number was changed
                - The account was closed
                - The expiry was changed
                - The issuing bank does not participate in the update program
                - Contact the cardholder for updated information
                - No match found
                - No changes found
              x-enumDescriptions:
                The merchant is not registered in the update program: >-
                  Returned for Real Time Account Updater only. Contact Worldpay
                  to enroll in the service.
                The account number was changed: A new card has been issued with a change in the card number.
                The account was closed: >-
                  The account is closed and the card is no longer valid. Ask
                  your customer for an alternative payment method.
                The expiry was changed: >-
                  A new card has been issued with an updated expiry date. In
                  most cases the card number remains unchanged.
                The issuing bank does not participate in the update program: >-
                  Returned for Real Time Account Updater only. It is not known
                  whether an account update is available.
                Contact the cardholder for updated information: >-
                  A match was found but you may need to contact the cardholder
                  for updated card details. This could be due to cardholder
                  opt-out or other reasons.
                No match found: >-
                  The BIN range is enrolled for account updates, but no match
                  was found for the card account. One reason for this may be
                  that the card issuer has recently changed.
                No changes found: No changes to the card account were found.
        value:
          required:
            - amount
            - currency
          type: object
          description: An object that contains payment amount and currency.
          properties:
            amount:
              type: integer
              description: >-
                This is a whole number including the currency exponent (e.g. GBP
                has an exponent of 2, so for £2.50 supply:`250`)
            currency:
              type: string
              description: The 3 digit currency code.
        events:
          required:
            - eventName
            - timestamp
          type: array
          description: An array that contains the history of events of a payment.
          items:
            type: object
            description: Name of the event.
            oneOf:
              - $ref: '#/components/schemas/authorizationRequested'
              - $ref: '#/components/schemas/authorizationSucceeded'
              - $ref: '#/components/schemas/authorizationRefused'
              - $ref: '#/components/schemas/authorizationFailed'
              - $ref: '#/components/schemas/authorizationTimedOut'
              - $ref: '#/components/schemas/saleRequested'
              - $ref: '#/components/schemas/saleSucceeded'
              - $ref: '#/components/schemas/saleRefused'
              - $ref: '#/components/schemas/saleFailed'
              - $ref: '#/components/schemas/saleTimedOut'
              - $ref: '#/components/schemas/settlementRequested'
              - $ref: '#/components/schemas/settlementRequestSubmitted'
              - $ref: '#/components/schemas/settlementFailed'
              - $ref: '#/components/schemas/settlementTimedOut'
              - $ref: '#/components/schemas/refundRequested'
              - $ref: '#/components/schemas/refundRequestSubmitted'
              - $ref: '#/components/schemas/refundFailed'
              - $ref: '#/components/schemas/refundTimedOut'
              - $ref: '#/components/schemas/cancellationRequested'
              - $ref: '#/components/schemas/cancellationRequestSubmitted'
              - $ref: '#/components/schemas/cancellationFailed'
              - $ref: '#/components/schemas/cancellationTimedOut'
              - $ref: '#/components/schemas/reversalRequested'
              - $ref: '#/components/schemas/reversalRequestSubmitted'
              - $ref: '#/components/schemas/reversalFailed'
              - $ref: '#/components/schemas/reversalTimedOut'
            discriminator:
              propertyName: eventName
              mapping:
                authorizationRequested: '#/components/schemas/authorizationRequested'
                authorizationSucceeded: '#/components/schemas/authorizationSucceeded'
                authorizationRefused: '#/components/schemas/authorizationRefused'
                authorizationFailed: '#/components/schemas/authorizationFailed'
                authorizationTimedOut: '#/components/schemas/authorizationTimedOut'
                saleRequested: '#/components/schemas/saleRequested'
                saleSucceeded: '#/components/schemas/saleSucceeded'
                saleRefused: '#/components/schemas/saleRefused'
                saleFailed: '#/components/schemas/saleFailed'
                saleTimedOut: '#/components/schemas/saleTimedOut'
                settlementRequested: '#/components/schemas/settlementRequested'
                settlementRequestSubmitted: '#/components/schemas/settlementRequestSubmitted'
                settlementFailed: '#/components/schemas/settlementFailed'
                settlementTimedOut: '#/components/schemas/settlementTimedOut'
                refundRequested: '#/components/schemas/refundRequested'
                refundRequestSubmitted: '#/components/schemas/refundRequestSubmitted'
                refundFailed: '#/components/schemas/refundFailed'
                refundTimedOut: '#/components/schemas/refundTimedOut'
                cancellationRequested: '#/components/schemas/cancellationRequested'
                cancellationRequestSubmitted: '#/components/schemas/cancellationRequestSubmitted'
                cancellationFailed: '#/components/schemas/cancellationFailed'
                cancellationTimedOut: '#/components/schemas/cancellationTimedOut'
                reversalRequested: '#/components/schemas/reversalRequested'
                reversalRequestSubmitted: '#/components/schemas/reversalRequestSubmitted'
                reversalFailed: '#/components/schemas/reversalFailed'
                reversalTimedOut: '#/components/schemas/reversalTimedOut'
        _links:
          required:
            - self
          type: object
          description: Self link and next action links.
          properties:
            self:
              type: object
              description: Self link to the page.
              properties:
                href:
                  type: string
                  description: Self link to the page.
            payments:cancel:
              type: object
              description: Next action links.
              properties:
                href:
                  type: string
                  description: Next action links.
            payments:events:
              type: object
              description: Next action links.
              properties:
                href:
                  type: string
                  description: Next action links.
            payments:settle:
              type: object
              description: Next action links.
              properties:
                href:
                  type: string
                  description: Next action links.
            payments:partialSettle:
              type: object
              description: Next action links.
              properties:
                href:
                  type: string
                  description: Next action links.
    pq_querybypaymentid_404_response:
      type: object
      properties:
        errorName:
          type: string
          example: paymentNotFound
        message:
          type: string
          example: The payment you are trying to access does not exist.
    pq_querybydaterange_200_response:
      required:
        - _links
        - _embedded
      type: object
      properties:
        _links:
          required:
            - self
          type: object
          description: links to the pages.
          properties:
            self:
              type: object
              description: Self link to the page.
              properties:
                href:
                  type: string
                  description: First page as per the pageSize.
            next:
              type: object
              description: Next page link if the response contains more pages.
              properties:
                href:
                  type: string
                  description: Second page as per the pageSize.
        _embedded:
          type: object
          properties:
            payments:
              type: array
              required:
                - timestamp
                - transactionReference
                - entity
              description: Array of payments within the date range.
              items:
                type: object
                properties:
                  timestamp:
                    type: string
                    description: Payment initial authorization time.
                  transactionReference:
                    type: string
                    description: >-
                      A unique reference generated by you, used to identify a
                      payment throughout its lifecycle.
                  narrative:
                    type: object
                    description: >-
                      An object that contains identification and further details
                      of the merchant.
                    properties:
                      line1:
                        type: string
                        description: >-
                          First line of text that appears on your customer's
                          statement.
                      line2:
                        type: string
                        description: >-
                          Second line of text that appears on your customer's
                          statement.
                  transactionType:
                    enum:
                      - oneTime
                      - cardOnFile
                      - recurring
                    type: string
                    description: An object that contains transaction type.
                  authorizationType:
                    enum:
                      - authorization
                      - sale
                    type: string
                    description: An object that contains authorization type.
                  entity:
                    type: string
                    description: Merchant entity name.
                  scheme:
                    required:
                      - reference
                    type: object
                    description: >-
                      An object containing information returned by the card
                      scheme.
                    properties:
                      reference:
                        type: string
                        description: >-
                          The reference returned by the scheme for this
                          particular payment authorization.
                        example: 'MCCOLXT1C0104  '
                  issuer:
                    required:
                      - authorizationCode
                    type: object
                    description: An object containing information returned by the issuer.
                    properties:
                      authorizationCode:
                        pattern: ^[a-zA-Z0-9]+$
                        type: string
                        description: >-
                          A code returned by the card issuer for a successful
                          authorization. Used in reconciliation and dispute
                          management.
                        example: T31306
                  paymentInstrument:
                    type: object
                    description: >-
                      The payment instrument supplied in the authorization
                      request.
                    properties:
                      type:
                        type: string
                        enum:
                          - card/plain
                          - card/network
                          - card/networkToken
                          - card/networkToken+applepay
                          - card/networkToken+googlepay
                          - card/plain+masked
                        description: >-
                          The type of payment instrument supplied in the
                          authorization request.
                      card:
                        type: object
                        description: >-
                          An object that contains information about the card
                          used.
                        properties:
                          number:
                            type: object
                            description: >-
                              An object that contains information about the card
                              number.
                            properties:
                              cardBin:
                                pattern: ^[0-9*]+$
                                type: string
                                description: >-
                                  The card BIN (Bank Identification Number) is
                                  the first 6 or 8 digits of the card number,
                                  and can be used to identify the card issuer,
                                  the card brand(s) (eg Visa, Cartes Bancaires),
                                  and the country. Card BINs are used to route
                                  transactions, check card capabilities, and in
                                  fraud assessments.
                                example: '444433'
                              last4Digits:
                                pattern: ^[0-9*]+$
                                type: string
                                description: >-
                                  The last four digits of the card. Some
                                  characters may be obfuscated with a `*` if the
                                  PAN length is less than 16 characters.
                                example: '1111'
                          category:
                            type: string
                            description: >-
                              Whether the card is classed as a consumer card or
                              a card for commercial use.
                            enum:
                              - commercial
                              - consumer
                          countryCode:
                            maxLength: 2
                            minLength: 2
                            pattern: ^[A-Z]+$
                            type: string
                            description: >-
                              The [ISO 3166-1 Alpha-2
                              format](/products/reference/supported-countries-currencies#iso-country-codes)
                              country code that the card was issued in. May
                              return `N/A` where the country is unknown.
                            example: GB
                          expiryDate:
                            type: object
                            description: >-
                              The expiry date of the card or network token
                              (where the supplied paymentInstrument was
                              `card/wallet+applepay`, `card/wallet+googlepay`,
                              `card/networkToken`, `card/networkToken+applepay`
                              or `card/networkToken+googlepay`)
                            properties:
                              month:
                                type: integer
                              year:
                                type: integer
                          issuerName:
                            type: string
                            description: The name of the card issuer.
                            example: AN ISSUING BANK LTD
                          fundingType:
                            type: string
                            description: How the card is funded.
                            enum:
                              - credit
                              - debit
                              - prepaid
                              - chargeCard
                              - deferredDebit
                          brand:
                            type: string
                            description: >-
                              The card brand that the transaction was processed
                              with. Sometimes referred to as the network or
                              scheme.
                            example: visa
                          paymentAccountReference:
                            type: string
                            description: >-
                              The payment account reference (PAR) is a
                              non-financial reference that uniquely identifies
                              the underlying cardholder account. This allows you
                              to correlate payments made from the same account
                              with differing instruments (e.g. `card/plain` and
                              `card/wallet+applepay`), where the same account
                              funds the transaction. A PAR cannot be used to
                              initiate a payment.
                            example: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                  value:
                    required:
                      - amount
                      - currency
                    type: object
                    description: An object that contains payment amount and currency.
                    properties:
                      amount:
                        type: integer
                        description: >-
                          This is a whole number including the currency exponent
                          (e.g. GBP has an exponent of 2, so for £2.50
                          supply:`250`)
                      currency:
                        type: string
                        description: The 3 digit currency code.
                  _links:
                    required:
                      - self
                    type: object
                    description: link to retrieveByPaymentId.
                    properties:
                      self:
                        type: object
                        description: Self link to retrieveByPaymentId.
                        properties:
                          href:
                            type: string
                            description: >-
                              RetrieveByPaymentId provides event history and
                              next action links.
    pq_querybydaterange_400_response:
      required:
        - errorName
        - message
      type: object
      properties:
        errorName:
          type: string
          description: The type of error
          example: invalidPageSize
        message:
          type: string
          description: A description of the error
          example: Provided page size is not valid.
    pq_queryhistoricalpayments_200_response:
      required:
        - _links
        - _embedded
      type: object
      properties:
        _links:
          required:
            - self
          type: object
          description: >-
            Self link and next action links.The Next action links are dependent
            on the lastEvent, refer to 'query for historical payments Response'
            section for more details.
          properties:
            self:
              type: object
              description: Self link to the page.
              properties:
                href:
                  type: string
                  description: Self link to the page.
            payments:cancel:
              type: object
              description: Next action links.
              properties:
                href:
                  type: string
                  description: Next action links.
            payments:settle:
              type: object
              description: Next action links.
              properties:
                href:
                  type: string
                  description: Next action links.
            payments:partialSettle:
              type: object
              description: Next action links.
              properties:
                href:
                  type: string
                  description: Next action links.
        _embedded:
          type: object
          properties:
            payments:
              type: array
              description: Array of payments.
              items:
                type: object
                properties:
                  lastEvent:
                    type: string
                    description: >-
                      The last event of a payment. Possible event values
                      are:<ul><li>`Authorized`</li><li>`Refused`</li><li>`Sent
                      for Cancellation`</li><li>`Sent for Refund`</li><li>`Sent
                      for Settlement`</li><li>`Unknown`</li></ul>
                  paymentInstrument:
                    type: object
                    description: >-
                      An object that contains information about the payment
                      type.
                    properties:
                      type:
                        enum:
                          - card/plain
                          - card/network
                          - card/networkToken
                          - card/networkToken+applepay
                          - card/networkToken+googlepay
                          - card/plain+masked
                        type: string
                        description: >-
                          An object that contains information about the payment
                          type.
                      card:
                        type: object
                        description: >-
                          An object that contains information about the card
                          used.
                        properties:
                          number:
                            type: object
                            description: >-
                              An object that contains information about the card
                              number.
                            properties:
                              last4Digits:
                                type: string
                                description: last4Digits of the card number used.
                          brand:
                            type: object
                            description: >-
                              An object that contains information about the
                              brand. The brand values can be Visa, Mastercard
                              etc.
                  value:
                    required:
                      - amount
                      - currency
                    type: object
                    description: An object that contains payment amount and currency.
                    properties:
                      amount:
                        type: integer
                        description: >-
                          This is a whole number including the currency exponent
                          (e.g. GBP has an exponent of 2, so for £2.50
                          supply:`250`)
                      currency:
                        type: string
                        description: The 3 digit currency code.
    pq_queryhistoricalpayments_400_response:
      required:
        - errorName
        - message
      type: object
      properties:
        errorName:
          type: string
          description: The type of error
          example: entityIsNotConfigured
        message:
          type: string
          description: A description of the error
          example: Entity is not configured to use this resource
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
security:
  - BasicAuth: []
