FlutterwaveAdapter
Defined in: packages/node/src/providers/flutterwave/flutterwave.adapter.ts:11
Interface that all Voltax payment providers must implement. The generic type TPaymentDTO allows each provider to define its own payment payload type.
Example
Section titled “Example”class PaystackAdapter implements VoltaxProvider<PaystackPaymentDTO> { async initiatePayment(payload: PaystackPaymentDTO): Promise<VoltaxPaymentResponse> { ... } async verifyTransaction(reference: string): Promise<VoltaxPaymentResponse> { ... } async getPaymentStatus(reference: string): Promise<PaymentStatus> { ... }}Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FlutterwaveAdapter(
__namedParameters):FlutterwaveAdapter
Defined in: packages/node/src/providers/flutterwave/flutterwave.adapter.ts:14
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”FlutterwaveConfig
Returns
Section titled “Returns”FlutterwaveAdapter
Methods
Section titled “Methods”getPaymentStatus()
Section titled “getPaymentStatus()”getPaymentStatus(
reference):Promise<PaymentStatus>
Defined in: packages/node/src/providers/flutterwave/flutterwave.adapter.ts:146
Helper to get status directly.
Parameters
Section titled “Parameters”reference
Section titled “reference”string
Returns
Section titled “Returns”Promise<PaymentStatus>
Implementation of
Section titled “Implementation of”VoltaxProvider.getPaymentStatus
initiatePayment()
Section titled “initiatePayment()”initiatePayment(
payload):Promise<VoltaxPaymentResponse>
Defined in: packages/node/src/providers/flutterwave/flutterwave.adapter.ts:49
Initiate a payment with Flutterwave
Parameters
Section titled “Parameters”payload
Section titled “payload”Payment details including amount, email, currency, and Flutterwave-specific options
amount
Section titled “amount”number = ...
callbackUrl?
Section titled “callbackUrl?”string = ...
currency
Section titled “currency”Currency = ...
customerName?
Section titled “customerName?”string = ...
description?
Section titled “description?”string = ...
string = ...
linkExpiration?
Section titled “linkExpiration?”Date = ...
logoUrl?
Section titled “logoUrl?”string = ...
maxRetryAttempts?
Section titled “maxRetryAttempts?”number = ...
metadata?
Section titled “metadata?”Record<string, any> = ...
mobileNumber?
Section titled “mobileNumber?”string = ...
pageTitle?
Section titled “pageTitle?”string = ...
paymentOptions?
Section titled “paymentOptions?”string = ...
paymentPlan?
Section titled “paymentPlan?”number = ...
reference
Section titled “reference”string = ...
sessionDuration?
Section titled “sessionDuration?”number = ...
subaccounts?
Section titled “subaccounts?”object[] = ...
Returns
Section titled “Returns”Promise<VoltaxPaymentResponse>
Promise
Example
Section titled “Example”const flutterwave = Voltax('flutterwave', { secretKey: '...' });const response = await flutterwave.initiatePayment({ amount: 100, email: 'customer@example.com', currency: Currency.NGN, reference: 'unique-ref', callbackUrl: 'https://example.com/callback', // Flutterwave-specific options (flat, not nested) customerName: 'John Doe', pageTitle: 'My Store', logoUrl: 'https://example.com/logo.png',});Implementation of
Section titled “Implementation of”VoltaxProvider.initiatePayment
verifyTransaction()
Section titled “verifyTransaction()”verifyTransaction(
reference):Promise<VoltaxPaymentResponse>
Defined in: packages/node/src/providers/flutterwave/flutterwave.adapter.ts:122
Verifies a transaction by its reference.
Parameters
Section titled “Parameters”reference
Section titled “reference”string
The transaction reference
Returns
Section titled “Returns”Promise<VoltaxPaymentResponse>
A standardized payment response with updated status