Skip to main content

Get Transactions

The Get Transactions operation allows you to retrieve details of transactions associated with a Fondy account. This operation requires the provision of a unique transaction reference or filtering criteria such as date range, status, and transaction type.

This page will guide you through using this operation. See the following sections for more details.

Encrypted Requests

All requests into the stack are performed using the Encrypted Endpoint, where the request and response of the operation are encrypted. See How to Integrate Fondy API to learn how to encrypt your operations and send them through the endpoint.

Request

The request process of this operation consists of the following two steps:

  1. Create the payload
  2. Make the encrypted request

See the sections below for more details on each step.

Step 1: Create the payload

The required information must be sent in the payload. See the example below:

{
"transaction_reference": "TXN1234567890",
"filters": {
"date_from": "2024-01-01T00:00:00.000Z",
"date_to": "2024-01-31T23:59:59.999Z",
"status": "COMPLETED",
"type": "PAYMENT"
}
}

Where:

ParameterDescription
transaction_referenceThe unique reference ID for the transaction.
filters.date_fromThe start date for filtering transactions (ISO 8601 format).
filters.date_toThe end date for filtering transactions (ISO 8601 format).
filters.statusThe status of the transactions to retrieve (e.g., PENDING, COMPLETED).
filters.typeThe type of transaction (PAYMENT, REFUND, WITHDRAWAL).

Once you create the payload, it has to be encrypted. See the following section for more details.

Step 2: Make the encrypted request

To retrieve the transaction details, follow the steps below:

  1. Follow the steps in How to Integrate Fondy API to encrypt your request into the stack.
  2. Send the encrypted operation using Encrypted Endpoint. See an example below:
{
"encrypted_payload": ENCRYPTED(transactionRequest),
"encrypted_user": ENCRYPTED(<username>),
"encrypted_url": ENCRYPTED("/transactions"),
"method": "GET"
}

In the request, ENCRYPTED(transactionRequest) is the payload previously created, which is now encrypted.

Response

A successful request will return the encrypted response, as shown below:

{
"encrypted_payload": ENCRYPTED(transactionDetails),
"encrypted_url": null,
"method": null,
"nonce": null
}

This response has to be decrypted using the process explained in How to Integrate Fondy API. Once it is decrypted, the unencrypted payload is as follows:

{
"transaction_reference": "TXN1234567890",
"amount": {
"currency": "GBP",
"value": 150
},
"status": "COMPLETED",
"transaction_type": "PAYMENT",
"created_date_time": "2024-01-10T12:45:00.000Z",
"updated_date_time": "2024-01-10T13:15:00.000Z",
"counterparty": {
"name": "ExampleMerchant",
"account_number": "98765432",
"sort_code": "65432"
}
}

Where:

ParameterDescription
transaction_referenceThe unique reference ID for the transaction.
amount.currencyThe currency of the transaction.
amount.valueThe amount of the transaction in minor units.
statusThe current status of the transaction (PENDING, COMPLETED).
transaction_typeThe type of transaction (PAYMENT, REFUND, WITHDRAWAL).
created_date_timeThe date and time when the transaction was created.
updated_date_timeThe date and time when the transaction was last updated.
counterparty.nameThe name of the counterparty in the transaction.
counterparty.account_numberThe account number of the counterparty.
counterparty.sort_codeThe sort code of the counterparty's bank.