Transactions
Transactions API
This document provides a comprehensive guide to fetch your transaction data from The Payment Company's API. The API allows you to retrieve both live and test transaction data.
API Endpoints
GET
https://api.thepayment.company/api/v1/live-transactionsAuthentication
All API requests require authentication using your secret key in the Authorization header.
Query Parameters
The API supports the following query parameters to filter and paginate transaction data:
| Parameter | Type | Description | Required |
|---|---|---|---|
transaction_start_date | String | Start date for filtering transactions (YYYY-MM-DD format) | No |
transaction_end_date | String | End date for filtering transactions (YYYY-MM-DD format) | No |
nextCursor | String | Cursor for next page of results | No |
prevCursor | String | Cursor for previous page of results | No |
Example Request
Response Structure
The API response contains transaction data along with metadata for pagination.
Transaction Object Properties
Each transaction object in the response contains the following properties:
| Property | Type | Description |
|---|---|---|
first_name | String | First name of the customer |
last_name | String | Last name of the customer |
converted_amount | String | Transaction amount converted to display currency |
converted_currency | String | Currency code for the converted amount |
transaction_id | String | Unique identifier for the transaction |
amount | String | Original transaction amount |
currency | String | Original currency code |
status | String | Status of the transaction (SUCCESS, FAILED, etc.) |
card_type | String | Type of card used (VISA, MASTERCARD, etc.) |
card_number | String | Masked card number |
transaction_type | String | Type of transaction (CARD, APM, etc.) |
order_id | String | Unique order ID (if provided) |
country | String | Country code of the transaction origin |
email | String | Customer email address |
created_at | String | Transaction creation timestamp |
transaction_date | String | Transaction processing timestamp |
chargeback_date | String | Chargeback date (if applicable) |
refund_date | String | Refund date (if applicable) |
suspicious_date | String | Date when transaction was marked suspicious (if any) |
merchant_connector | Object | Information about the payment processor |
user | Object | Merchant user information |
Example Response
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 pagehasPreviousPage: Boolean indicating if there are transactions available before this pagenextCursor: Cursor string to fetch the next page of results (use withnextCursorparameter)prevCursor: Cursor string to fetch the previous page of results (use withprevCursorparameter)totalCount: Total number of transactions matching the current filter criteria
Example: Fetching the Next Page
Error Responses
The API may return the following error responses: