PayAgency Logo
Transactions

Wallet Transactions API

This document provides a comprehensive guide to fetch your payout wallet transaction data from Pay Agency's API.

API Endpoints

GET https://backend.pay.agency/api/v1/live-wallet-transactions

Authentication

All API requests require authentication using your secret key in the Authorization header.

Authorization: Bearer YOUR_SECRET_KEY

Query Parameters

The API supports the following query parameters to filter and paginate transaction data:

ParameterTypeDescriptionRequired
transaction_start_dateStringStart date for filtering transactions (YYYY-MM-DD format)No
transaction_end_dateStringEnd date for filtering transactions (YYYY-MM-DD format)No
nextCursorStringCursor for next page of resultsNo
prevCursorStringCursor for previous page of resultsNo

Example Request

curl --location 'https://backend.pay.agency/api/v1/live-wallet-transactions?transaction_start_date=2023-05-01&transaction_end_date=2023-05-15' \
--header 'Authorization: Bearer YOUR_SECRET_KEY'

Response Structure

{
  "message": "Transactions fetched successfully ",
  "data": [ ... array of wallet transaction objects ... ],
  "meta": {
    "hasNextPage": false,
    "hasPreviousPage": false,
    "nextCursor": "MQ==",
    "prevCursor": "MTI=",
    "totalCount": 12
  }
}

Wallet Transaction Object Properties

Note: The wallet_id and transaction_date fields are not available in test wallet transactions. These fields are only present in live wallet transactions.

PropertyTypeDescription
wallet_idStringUnique identifier for the wallet
first_nameStringFirst name of the account holder
last_nameStringLast name of the account holder
transaction_idStringUnique identifier for the transaction
amountStringTransaction amount
addressStringAddress associated with the wallet (if any)
currencyStringCurrency code for the transaction
statusStringStatus of the transaction (SUCCESS, FAILED, etc.)
card_typeStringType of card used (e.g., MASTER)
card_numberStringMasked card number
card_expiry_monthStringCard expiry month
card_expiry_yearStringCard expiry year
transaction_typeStringType of transaction (CARD, APM, etc.)
order_idStringUnique order ID (if provided)
messageStringTransaction message or remark
phone_numberStringPhone number associated with the transaction
feeStringFee charged for the transaction
countryStringCountry code
emailStringEmail address
created_atStringTransaction creation timestamp
transaction_dateStringTransaction processing timestamp

Example Response

{
  "message": "Transactions fetched successfully ",
  "data": [
    {
      "wallet_id": "WAL7447284777737475",
      "first_name": "James",
      "last_name": "Dean",
      "transaction_id": "REF_PA8373919316726292",
      "amount": "31.82",
      "address": "64 Hertingfordbury Rd",
      "currency": "EUR",
      "status": "SUCCESS",
      "card_type": "MASTER",
      "card_number": "551928XXXXXX0000",
      "card_expiry_month": "12",
      "card_expiry_year": "2027",
      "transaction_type": "CARD",
      "order_id": null,
      "message": "Refund processed for failed payout",
      "phone_number": "7654233212",
      "fee": "1.82",
      "country": "US",
      "email": "james@gmail.com",
      "created_at": "2025-05-16T08:22:19.217Z",
      "transaction_date": "2025-05-16T08:22:20.148Z"
    },
    // ...more transactions...
  ],
  "meta": {
    "hasNextPage": false,
    "hasPreviousPage": false,
    "nextCursor": "MQ==",
    "prevCursor": "MTI=",
    "totalCount": 12
  }
}

Pagination

The API response includes pagination metadata that can be used to fetch additional pages of transaction data:

  • hasNextPage: Boolean indicating if there are more transactions available after this page
  • hasPreviousPage: Boolean indicating if there are transactions available before this page
  • nextCursor: Cursor string to fetch the next page of results (use with nextCursor parameter)
  • prevCursor: Cursor string to fetch the previous page of results (use with prevCursor parameter)
  • totalCount: Total number of transactions matching the current filter criteria

Example: Fetching the Next Page

const nextPageUrl = 'https://backend.pay.agency/api/v1/live-wallet-transactions?nextCursor=MQ==';
 
fetch(nextPageUrl, {
  headers: {
    'Authorization': 'Bearer YOUR_SECRET_KEY'
  }
})
.then(response => response.json())
.then(data => console.log(data));

Error Responses

{
  "message": "Authentication token is missing or invalid."
}
{
  "message": "Authentication Secret Key is missing."
}
{
  "message": "Invalid Live Secret Key."
}

On this page