VoltaxProvider
Defined in: packages/node/src/core/interfaces.ts:29
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> { ... }}Type Parameters
Section titled “Type Parameters”TPaymentDTO
Section titled “TPaymentDTO”TPaymentDTO
The provider-specific payment payload type
Methods
Section titled “Methods”getPaymentStatus()
Section titled “getPaymentStatus()”getPaymentStatus(
reference):Promise<PaymentStatus>
Defined in: packages/node/src/core/interfaces.ts:49
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
initiatePayment()
Section titled “initiatePayment()”initiatePayment(
payload):Promise<VoltaxPaymentResponse>
Defined in: packages/node/src/core/interfaces.ts:35
Initiates a payment transaction.
Parameters
Section titled “Parameters”payload
Section titled “payload”TPaymentDTO
The provider-specific payment details
Returns
Section titled “Returns”Promise<VoltaxPaymentResponse>
A standardized payment response
verifyTransaction()
Section titled “verifyTransaction()”verifyTransaction(
reference):Promise<VoltaxPaymentResponse>
Defined in: packages/node/src/core/interfaces.ts:42
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