Skip to main content
Skip to main content

processEvent - Payment Module Reference

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

This method handles a webhook event with the associated payment provider.

Learn more about handling webhook events in this guide

Example

In the following example, req is an instance of MedusaRequest:

await paymentModuleService.processEvent({
provider: "stripe",
payload: {
data: req.body,
rawData: req.rawBody,
headers: req.headers,
},
})

Parameters

The webhook event's details.

Returns

PromisePromise<void>Required
Resolves when the webhook event is handled successfully.
Was this section helpful?