Skip to content

basalt / subscriptions-proxypay/src / ProxyPayGateway

Class: ProxyPayGateway ​

Defined in: subscriptions-proxypay/src/index.ts:87

Payment gateway driver contract for one-off / reference / mobile-money charges. The app talks to Basalt; only drivers talk to ProxyPay / EMIS / etc. A driver translates raw webhook payloads into PaymentEvent.

Implements ​

Constructors ​

Constructor ​

> new ProxyPayGateway(options): ProxyPayGateway

Defined in: subscriptions-proxypay/src/index.ts:97

Parameters ​

options ​

ProxyPayOptions

Returns ​

ProxyPayGateway

Properties ​

name ​

> readonly name: "proxypay" = 'proxypay'

Defined in: subscriptions-proxypay/src/index.ts:88

Implementation of ​

PaymentGateway.name

Methods ​

createPayment() ​

> createPayment(request): Promise<PaymentInstruction>

Defined in: subscriptions-proxypay/src/index.ts:137

Create a payment — returns a reference, a redirect URL, or a push.

Parameters ​

request ​

PaymentRequest

Returns ​

Promise<PaymentInstruction>

Implementation of ​

PaymentGateway.createPayment


verifyWebhook() ​

> verifyWebhook(rawBody, signature): PaymentEvent | null

Defined in: subscriptions-proxypay/src/index.ts:173

Verifies the signature and translates the payload. Throws WebhookInvalidError on a bad signature; returns null for a verified event that isn't a payment (gateways emit event types we don't act on).

Parameters ​

rawBody ​

string

signature ​

string | undefined

Returns ​

PaymentEvent | null

Implementation of ​

PaymentGateway.verifyWebhook

Released under the MIT License.