The Payment Company Logo

Transactions

Pay-In History

This guide explains how to retrieve transaction records from The Payment Company API. The endpoint supports both live and test transaction data.

SectionTransactions
Topics09
Pathtransactions / payinTransactions

API Endpoints

Live APIProduction environment
GEThttps://api.thepayment.company/api/v1/live-transactions
Test APISandbox environment
GEThttps://api.thepayment.company/api/v1/test-transactions

Authentication

All API requests must be authenticated with your secret key in the Authorization header.

Authorization: Bearer YOUR_SECRET_KEY

Query Parameters

Supported query parameters for transaction filtering and pagination are listed below:

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://api.thepayment.company/api/v1/live-transactions?transaction_start_date=2023-05-01&transaction_end_date=2023-05-15'   --header 'Authorization: Bearer YOUR_SECRET_KEY'
  

Response Format

The API response returns transaction data together with pagination metadata.

{
  "message": "Transactions fetched successfully",
  "data": [ ... array of transaction objects ... ],
  "meta": {
    "hasNextPage": true,
    "hasPreviousPage": false,
    "nextCursor": "NTQ1",
    "prevCursor": "NTY0",
    "totalCount": 144
  }
}

Transaction Object Fields

Each transaction object in the response includes the following fields:

PropertyTypeDescription
first_nameStringCustomer first name
last_nameStringCustomer last name
converted_amountStringTransaction amount converted into the display currency
converted_currencyStringCurrency code for the converted amount
transaction_idStringUnique transaction identifier
amountStringOriginal transaction amount
currencyStringOriginal transaction currency
statusStringTransaction status, such as SUCCESS or FAILED
card_typeStringCard brand or type used, such as VISA or MASTERCARD
card_numberStringMasked card number
transaction_typeStringTransaction category, such as CARD or APM
order_idStringUnique order ID, if supplied
countryStringCountry code for the transaction origin
emailStringCustomer email address
created_atStringTimestamp when the transaction was created
transaction_dateStringTimestamp when the transaction was processed
chargeback_dateStringChargeback date, if applicable
refund_dateStringRefund date, if applicable
suspicious_dateStringDate when the transaction was flagged as suspicious
merchant_connectorObjectPayment processor information
userObjectMerchant user details

Sample Responses

{
"message": "Transactions fetched successfully",
"data": [
  {
    "first_name": "James",
    "last_name": "Karlo",
    "converted_amount": "200",
    "converted_currency": "USD",
    "transaction_id": "TPC3060287394219373",
    "amount": "200",
    "currency": "USD",
    "status": "SUCCESS",
    "card_type": null,
    "card_number": null,
    "transaction_type": "APM",
    "order_id": null,
    "country": "IN",
    "email": "james.karlo@gmail.com",
    "created_at": "2025-05-13T10:03:22.878Z",
    "transaction_date": "2025-05-13T10:03:22.886Z",
    "chargeback_date": null,
    "refund_date": null,
    "suspicious_date": null,
    "merchant_connector": {
      "name": "test MID"
    },
    "user": {
      "name": "James dean",
      "user_kyc": {
        "name": "James dean"
      }
    }
  }
],
"meta": {
  "hasNextPage": true,
  "hasPreviousPage": false,
  "nextCursor": "NTQ1",
  "prevCursor": "NTY0",
  "totalCount": 144
}
}

Pagination

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

  • hasNextPage: Indicates whether more transactions exist after the current page
  • hasPreviousPage: Indicates whether earlier transactions exist before the current page
  • nextCursor: Cursor value used to request the next page of results with the nextCursor parameter
  • prevCursor: Cursor value used to request the previous page of results with the prevCursor parameter
  • totalCount: Total number of transactions matching the current filters

Example: Loading the Next Page

const nextPageUrl = 'https://api.thepayment.company/api/v1/live-transactions?nextCursor=NTQ1';

fetch(nextPageUrl, {
headers: {
  'Authorization': 'Bearer YOUR_SECRET_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));

On this page