LibertePayAdapter
Defined in: packages/node/src/providers/libertepay/libertepay.adapter.ts:16
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 LibertePayAdapter(
__namedParameters):LibertePayAdapter
Defined in: packages/node/src/providers/libertepay/libertepay.adapter.ts:19
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”LibertePayConfig
Returns
Section titled “Returns”LibertePayAdapter
Methods
Section titled “Methods”getPaymentStatus()
Section titled “getPaymentStatus()”getPaymentStatus(
reference):Promise<PaymentStatus>
Defined in: packages/node/src/providers/libertepay/libertepay.adapter.ts:85
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/libertepay/libertepay.adapter.ts:33
Initiates a payment transaction.
Parameters
Section titled “Parameters”payload
Section titled “payload”The provider-specific payment details
amount
Section titled “amount”number = ...
callbackUrl?
Section titled “callbackUrl?”string = ...
currency
Section titled “currency”Currency = ...
description?
Section titled “description?”string = ...
string = ...
metadata?
Section titled “metadata?”Record<string, any> = ...
mobileNumber?
Section titled “mobileNumber?”string = ...
paymentSlug?
Section titled “paymentSlug?”string = ...
reference?
Section titled “reference?”string = ...
Returns
Section titled “Returns”Promise<VoltaxPaymentResponse>
A standardized payment response
Implementation of
Section titled “Implementation of”VoltaxProvider.initiatePayment
verifyTransaction()
Section titled “verifyTransaction()”verifyTransaction(
reference):Promise<VoltaxPaymentResponse>
Defined in: packages/node/src/providers/libertepay/libertepay.adapter.ts:64
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