Payment Module Options

In this document, you'll learn about the options you can pass to the Payment Module.

All Module Options#

OptionDescriptionRequiredDefault

webhook_delay

A number indicating the delay in milliseconds before processing a webhook event.

No

5000

webhook_retries

The number of times to retry the webhook event processing in case of an error.

No

3

providers

An array of payment providers to install and register. Learn more in this section.

No

-


providers Option#

The providers option is an array of payment module providers to be registered in your Medusa application.

When the Medusa application starts, these providers are registered and can be used to process payments.

For example:

medusa-config.ts
1import { Modules } from "@medusajs/framework/utils"2
3// ...4
5module.exports = defineConfig({6  // ...7  modules: [8    {9      resolve: "@medusajs/medusa/payment",10      options: {11        providers: [12          {13            resolve: "@medusajs/medusa/payment-stripe",14            id: "stripe",15            options: {16              // ...17            },18          },19        ],20      },21    },22  ],23})

The providers option is an array of objects that accept the following properties:

  • resolve: A string indicating the package name of the module provider or the path to it.
  • id: A string indicating the provider's unique name or ID.
  • options: An optional object of the module provider's options.

Refer to the Payment Module Providers documentation to learn more.

Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break