MoolreAdapter
Defined in: packages/node/src/providers/moolre/moolre.adapter.ts:17
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 MoolreAdapter(
__namedParameters):MoolreAdapter
Defined in: packages/node/src/providers/moolre/moolre.adapter.ts:21
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”MoolreAdapterOptions
Returns
Section titled “Returns”MoolreAdapter
Methods
Section titled “Methods”getPaymentStatus()
Section titled “getPaymentStatus()”getPaymentStatus(
reference):Promise<PaymentStatus>
Defined in: packages/node/src/providers/moolre/moolre.adapter.ts:121
Gets the status of a payment.
Parameters
Section titled “Parameters”reference
Section titled “reference”string
The transaction reference
Returns
Section titled “Returns”Promise<PaymentStatus>
The payment status
Implementation of
Section titled “Implementation of”VoltaxProvider.getPaymentStatus
initiatePayment()
Section titled “initiatePayment()”initiatePayment(
payload):Promise<VoltaxPaymentResponse>
Defined in: packages/node/src/providers/moolre/moolre.adapter.ts:53
Initiate a payment with Moolre
Parameters
Section titled “Parameters”payload
Section titled “payload”Payment details including amount, email, currency, and Moolre-specific options
accountNumberOverride?
Section titled “accountNumberOverride?”string = ...
amount
Section titled “amount”number = ...
callbackUrl
Section titled “callbackUrl”string = ...
currency
Section titled “currency”Currency = ...
description?
Section titled “description?”string = ...
string = ...
linkReusable?
Section titled “linkReusable?”boolean = ...
metadata?
Section titled “metadata?”Record<string, any> = ...
redirectUrl
Section titled “redirectUrl”string = ...
reference
Section titled “reference”string = ...
Returns
Section titled “Returns”Promise<VoltaxPaymentResponse>
Promise
Example
Section titled “Example”const moolre = Voltax('moolre', { apiUser: '...', accountNumber: '...', apiPublicKey: '...' });const response = await moolre.initiatePayment({ amount: 100, email: 'customer@example.com', currency: Currency.GHS, reference: 'unique-ref', callbackUrl: 'https://example.com/callback', // Moolre-specific options (flat, not nested) redirectUrl: 'https://example.com/redirect', linkReusable: false,});Implementation of
Section titled “Implementation of”VoltaxProvider.initiatePayment
verifyTransaction()
Section titled “verifyTransaction()”verifyTransaction(
reference):Promise<VoltaxPaymentResponse>
Defined in: packages/node/src/providers/moolre/moolre.adapter.ts:96
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