Skip to main content
Skip to main content

authorizePaymentSession - Payment Module Reference

This documentation provides a reference to the authorizePaymentSession method. This belongs to the Payment Module.

This method authorizes a payment session using its associated payment provider. This creates a payment that can later be captured.

Learn more about the payment flow in this guide

Example

const payment =
await paymentModuleService.authorizePaymentSession(
"payses_123",
{}
)

Parameters

idstringRequired
The payment session's ID.
contextRecord<string, unknown>Required
Context data to pass to the associated payment provider.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<PaymentDTO>Required
The created payment.
Was this section helpful?