Skip to content

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.

class PaystackAdapter implements VoltaxProvider<PaystackPaymentDTO> {
async initiatePayment(payload: PaystackPaymentDTO): Promise<VoltaxPaymentResponse> { ... }
async verifyTransaction(reference: string): Promise<VoltaxPaymentResponse> { ... }
async getPaymentStatus(reference: string): Promise<PaymentStatus> { ... }
}

TPaymentDTO

The provider-specific payment payload type

getPaymentStatus(reference): Promise<PaymentStatus>

Defined in: packages/node/src/core/interfaces.ts:49

Gets the status of a payment.

string

The transaction reference

Promise<PaymentStatus>

The payment status


initiatePayment(payload): Promise<VoltaxPaymentResponse>

Defined in: packages/node/src/core/interfaces.ts:35

Initiates a payment transaction.

TPaymentDTO

The provider-specific payment details

Promise<VoltaxPaymentResponse>

A standardized payment response


verifyTransaction(reference): Promise<VoltaxPaymentResponse>

Defined in: packages/node/src/core/interfaces.ts:42

Verifies a transaction by its reference.

string

The transaction reference

Promise<VoltaxPaymentResponse>

A standardized payment response with updated status