Skip to main content

Overview

The Transaction class provides methods for interacting with Paystack’s Transaction API. This module allows you to initialize transactions, verify payments, list transactions, charge saved authorizations, and more.

Methods

initialize

Initializes a transaction from your backend.
TxnInitializeInput
required
The transaction details to initialize.
object
Example Usage:

verify

Confirms the status of a transaction.
string
required
The transaction reference to verify
object
Example Usage:

list

Lists transactions carried out on your integration.
TxnListInput
required
Query parameters for listing transactions.
array
Array of transaction objects
object
Example Usage:

getTransactionById

Retrieves details of a transaction carried out on your integration.
number
required
The ID of the transaction
object
Complete transaction object with all details (same structure as verify response)
Example Usage:

chargeAuthorization

Charges an authorization marked as reusable.
TxnChargeInput
required
The charge details.
object
Example Usage:

viewTxnTimeline

Views the timeline of a transaction.
string
required
The ID or reference of the transaction
object
Example Usage:

getTxnTotals

Retrieves the total volume of transactions received on your integration.
GenericInput
required
Query parameters for transaction totals.
object
Example Usage:

exportTxns

Exports a list of transactions carried out on your integration.
TxnExportInput
required
Query parameters for exporting transactions.
object
Example Usage:

partialDebit

Retrieves part of a payment from a customer.
TxnPartialDebitInput
required
The partial debit details.
object
Example Usage: