Transaction Attributes
Every transaction contains the following key attributes:-
Basic Details
id
: Unique identifier for the transaction.payment_intent_id
: ID of the associated payment intent.amount
: Total transaction amount.currency
: Currency in which the transaction was processed.status
: Indicates transaction status; options arepending
,completed
,failed
,refunded
, andcancelled
.type
: Type of transaction, such aspayment
,subscription
, orinvoice
.transaction_reference
: Unique identifier for tracking the transaction.
-
Payment and Customer Information
payment_account
: Account used for processing.payment_method
: Method used by the customer.customer_name
,customer_phone
,customer_email
: Basic contact details for the customer.account_id
: ID of the account processing the transaction.business_id
: Associated business ID for the transaction.
-
Timestamps and Metadata
createdAt
andupdatedAt
: Creation and last update timestamps.custom_fields_values
: Additional information collected for the transaction.metadata
: Any developer-provided metadata.- Associated Objects
PaymentGateway
: The gateway used for processing.Customer
: Associated customer object, if available.
Retrieve a Transaction
Useretrieve
to get the complete details of a specific transaction by its ID. This is useful for checking the outcome, reviewing customer details, or troubleshooting any issues tied to a specific transaction.
List All Transactions
Thelist
function returns all transactions, helping you monitor overall payment activity. This method is ideal for generating reports, reconciling payments, and tracking transaction volume over a given period.
List All Transactions with Filtering Options
This flexibility is especially useful for generating tailored reports, narrowing down search results, or reviewing specific timeframes.List Options
TheTransactionListOption
allows the following filtering and pagination options:
limit
(optional): Specifies the maximum number of transactions to return in a single call, enabling pagination of results.search
(optional): A search term that filters results based on:- Currency: Matches transactions processed in the specified currency.
- Reference: Filters by transaction reference for easy tracking.
- Payment Method: Filters by the payment method used, such as credit card or bank transfer.
- Customer: Filters based on customer details.
timeframe
(optional): Defines a duration in minutes to limit transactions to those created within the specified timeframe. This is helpful for retrieving recent activity or analyzing transactions over short intervals.