Available Endpoints
Transaction Types
- Payment: Customer payments (incoming)
- Payout: Funds sent to you (outgoing)
- Refund: Returns to customers
Transaction Object
TheTransaction model represents a single financial event in the system.It is used for payments, payouts, refunds, and other monetary operations.
Each transaction records its lifecycle, monetary value, currency token, and ownership context.
Fields
id
- Type:
String - Primary Key
- Default:
cuid() - Database Field:
_id - Description:
Unique identifier for the transaction.
type
- Type:
TransactionType - Description:
Specifies the kind of transaction (e.g. payment, payout, refund).
status
- Type:
TransactionStatus - Default:
PENDING - Description:
Current state of the transaction lifecycle, such as pending, completed, or failed.
amount
- Type:
Float - Description:
Monetary value of the transaction, expressed in NGN.
amountInUSDC
- Type:
Float - Description:
Amount equivalent, expressed in USDT.
mode
- Type:
Mode - Description:
Indicates how the transaction was initiated (for example: live or test).
token
- Type:
Token - Default:
USDC - Description:
Currency or digital asset used for the transaction.
createdAt
- Type:
DateTime - Default:
now() - Description:
Timestamp indicating when the transaction record was created.
confirmedAt
- Type:
DateTime? - Nullable
- Description:
Timestamp indicating when the transaction was confirmed or finalized.
date
- Type:
DateTime - Default:
now() - Description:
Logical transaction date, used for reporting and reconciliation.
profileId
- Type:
String - Description:
Identifier of the business profile that owns this transaction.
customerId
- Type:
String? - Nullable
- Description:
Identifier of the customer associated with the transaction, if applicable.
webhookDeliveryId
- Type:
String? - Nullable
- Description:
Optional identifier linking the transaction to webhook delivery tracking.
Relationships (High-Level)
These relationships exist for ownership and traceability but are not required for basic transaction reads.
-
Business Profile
Each transaction belongs to a single business profile. -
Customer (Optional)
A transaction may be associated with a customer. -
Payment / Payout / Refund
A transaction can be linked to one of these entities depending on its type. -
Webhook Deliveries
Tracks webhook notifications related to the transaction lifecycle.
Notes
- The
Transactionmodel is the single source of truth for financial events. - Related entities (payment, payout, refund) extend the transaction but do not replace it.
- Status and timestamps should be used to determine transaction finality.
Retrieving Transactions
Get all transactions:
Filter Parameters
type
- Type:
string - Allowed Values:
PAYMENT,PAYOUT,REFUND - Description:
Filters transactions by their transaction type.
status
- Type:
string - Allowed Values:
PENDING,COMPLETED,FAILED - Description:
Filters transactions based on their current processing status.
token
- Type:
string - Allowed Values:
USDC,BTC,ETH,EUR,USD - Description:
Filters transactions by the currency or token used.
mode
- Type:
string - Allowed Values:
test,live - Optional
- Description:
Specifies whether the transaction was created in test or live mode.
Date Filtering
date
- Type:
object - Description:
Defines how transactions should be filtered by date.
This parameter must be passed as a JSON-encoded object when used in query strings.
date.type
- Type:
string - Required
- Allowed Values:
preset,range - Description:
Determines whether a predefined date interval or a custom date range is used.
Preset Date Filtering
Used whendate.type = "preset".
date.interval
- Type:
string - Required
- Allowed Values:
todayyesterdaylast7dayslast30daysthisMonthlastMonththisYear
- Description:
Applies a predefined time window for filtering transactions.
Custom Date Range Filtering
Used whendate.type = "range".
date.startDate
- Type:
date - Required
- Description:
The start date for the transaction query range.
date.endDate
- Type:
date - Required
- Description:
The end date for the transaction query range.
Additional Filters
paymentLinkId
- Type:
string - Description:
Filters transactions associated with a specific payment link.
paymentMethod
- Type:
string - Allowed Values:
PAYMENT_LINK,HOSTED_CHECKOUT - Description:
Filters transactions by the payment method used.
customerId
- Type:
string - Description:
Filters transactions belonging to a specific customer.
Pagination
limit
- Type:
number - Default:
20 - Description:
Maximum number of transactions returned per request.
cursor
- Type:
string - Description:
Cursor used for pagination.
When provided, results start after the referenced transaction.
Notes
- The
dateparameter must be valid JSON when passed as a query string. - Invalid date structures or formats will result in a
400 Bad Request. - Pagination uses cursor-based pagination for consistency and performance.
Example
Get specific transaction:
Parameters
transactionId
- Required
- Description Unique identifier for transaction
