Skip to main content
Skip to main content

PaymentProcessor

The new payment service plugin interface This work is still experimental and can be changed until it becomes stable

Methods

authorizePayment

Authorize an existing session if it is not already authorized

Parameters

paymentSessionDataRecord<string, unknown>Required
contextRecord<string, unknown>Required

Returns

PromisePromise<PaymentProcessorError | object>Required

cancelPayment

Cancel an existing session

Parameters

paymentSessionDataRecord<string, unknown>Required

Returns

PromisePromise<Record<string, unknown> | PaymentProcessorError>Required

capturePayment

Capture an existing session

Parameters

paymentSessionDataRecord<string, unknown>Required

Returns

PromisePromise<Record<string, unknown> | PaymentProcessorError>Required

deletePayment

Delete an existing session

Parameters

paymentSessionDataRecord<string, unknown>Required

Returns

PromisePromise<Record<string, unknown> | PaymentProcessorError>Required

getIdentifier

Return a unique identifier to retrieve the payment plugin provider

Returns

stringstring

getPaymentStatus

Return the status of the session

Parameters

paymentSessionDataRecord<string, unknown>Required

Returns

PromisePromise<PaymentSessionStatus>Required

initiatePayment

Initiate a payment session with the external provider

Parameters

Returns


refundPayment

Refund an existing session

Parameters

paymentSessionDataRecord<string, unknown>Required
refundAmountnumberRequired

Returns

PromisePromise<Record<string, unknown> | PaymentProcessorError>Required

retrievePayment

Retrieve an existing session

Parameters

paymentSessionDataRecord<string, unknown>Required

Returns

PromisePromise<Record<string, unknown> | PaymentProcessorError>Required

updatePayment

Update an existing payment session

Parameters

Returns


updatePaymentData

Update the session data for a payment session

Parameters

sessionIdstringRequired
dataRecord<string, unknown>Required

Returns

PromisePromise<Record<string, unknown> | PaymentProcessorError>Required
Was this section helpful?