latestOpenAPI 3.0.1raw.githubusercontent.com2026-01-20203250.6 KB

10ffeffca918

Transactions

Search transactions by query params. Same endpoint can be used to download CSV (with Accept header="text/csv"). Refer to code for details

get/v1/transaction

Query parameters

status_versioninteger

Set to '2' to return failed transaction states FAILED_REJECTED/FAILED_EXPIRED/FAILED_CANCELLED mapped to declined/timedout/cancelled external status respectively.Otherwise these transaction states will all be mapped to failed status

exact_reference_matchboolean

Set to 'true' to search for transactions by exact reference. Otherwise reference is partially matched

emailstring
referencestring
cardholder_namestring
last_digits_card_numberstring
first_digits_card_numberstring
notEmptyboolean
parametersstring[]
rawStringstring

Comma delimited payment states.

statestring
notEmptyboolean
parametersstring[]
rawStringstring

Comma delimited refund states.

notEmptyboolean
parametersstring[]
rawStringstring

Comma delimited card brands.

from_datestring

From date of transactions to be searched (this date is inclusive).

to_datestring

To date of transactions to be searched (this date is inclusive).

transaction_type'PAYMENT' | 'REFUND' | 'DISPUTE'
gateway_payout_idstring
from_settled_datestring

From date of transactions settled date to be searched (this date is inclusive).

to_settled_datestring

To date of transactions settled date to be searched (this date is inclusive).

metadata_valuestring
agreement_idstring
pageinteger
display_sizeinteger
limit_totalboolean

Set to 'true' to limit the search counting the total number of transactions to 'limit_total_size' param

limit_total_sizeinteger
gateway_transaction_idstring
notEmptyboolean
parametersstring[]
rawStringstring

Comma delimited dispute states.

override_account_id_restrictionboolean

Set to true to list transactions for all accounts.

account_idstring

Comma delimited gateway account IDs. Required except when override_account_id_restriction=true

Response

OK

countinteger
pageinteger
totalinteger

Example response

[
  {
    "_links": {
      "first_page": {
        "href": "https://an.example.link"
      },
      "last_page": {
        "href": "https://an.example.link"
      },
      "next_page": {
        "href": "https://an.example.link"
      },
      "prev_page": {
        "href": "https://an.example.link"
      },
      "self": {
        "href": "https://an.example.link"
      }
    },
    "results": [
      {
        "agreement_payment_type": "recurring",
        "amount": 1000,
        "authorisation_mode": "web",
        "authorisation_summary": {
          "three_d_secure": {
            "required": true,
            "version": "2.1.0"
          }
        },
        "card_details": {
          "billing_address": {
            "city": "London",
            "country": "GB",
            "county": "county",
            "line1": "address line 1",
            "line2": "address line 2",
            "postcode": "Ex 8RR"
          },
          "card_brand": "Visa",
          "card_type": "credit",
          "cardholder_name": "J Doe",
          "expiry_date": "11/43",
          "first_digits_card_number": "424242",
          "last_digits_card_number": "4242"
        },
        "credential_external_id": "7a7a718cb8b0401f8b8f4cdda9804073",
        "description": "New passport application",
        "email": "citizen@example.org",
        "exemption": {
          "outcome": {
            "result": "honoured"
          },
          "requested": true,
          "type": "corporate"
        },
        "fee": 2,
        "gateway_account_id": "1",
        "gateway_payout_id": "po_mdoiu23jkdj1kj23sd",
        "gateway_transaction_id": "fd21-1mdknkls1-2121-csdf",
        "language": "en",
        "net_amount": -2,
        "parent_transaction_id": "4dfdhapsdgftgkpp029d5kdfau5f",
        "payment_provider": "sandbox",
        "reason": "fraudulent",
        "reference": "payment reference",
        "refund_summary": {
          "status": "unavailable"
        },
        "refunded_by": "dj8923eihsdih23hkjfe8d",
        "refunded_by_user_email": "test@example.org",
        "return_url": "https://service-name.gov.uk/transactions/12345",
        "service_id": "baea0585e30d4acbb438524fca82b51e",
        "settlement_summary": {
          "settled_date": "2022-01-26"
        },
        "source": "CARD_API",
        "state": {
          "can_retry": true,
          "code": "P0030",
          "finished": true,
          "message": "Payment was cancelled by the user",
          "status": "cancelled"
        },
        "total_amount": 1000,
        "transaction_id": "9np5pocnotgkpp029d5kdfau5f",
        "transaction_type": "PAYMENT",
        "wallet_type": "APPLE_PAY"
      }
    ]
  }
]