Payment Module Provider

In this document, you’ll learn what a payment module provider is.

What's a Payment Module Provider?#

A payment module provider registers a payment provider that handles payment processing in the Medusa application. It integrates third-party payment providers, such as Stripe.

To authorize a payment amount with a payment provider, a payment session is created and associated with that payment provider. The payment provider is then used to handle the authorization.

After the payment session is authorized, the payment provider is associated with the resulting payment and handles its payment processing, such as to capture or refund payment.

List of Payment Module Providers#

Stripe

System Payment Provider#

The Payment Module provides a system payment provider that acts as a placeholder payment provider.

It doesn’t handle payment processing and delegates that to the merchant. It acts similarly to a cash-on-delivery (COD) payment method.


How are Payment Providers Created?#

A payment provider is a module whose main service extends the AbstractPaymentProvider imported from @medusajs/framework/utils.

Refer to this guide on how to create a payment provider for the Payment Module.


Configure Payment Providers#

The Payment Module accepts a providers option that allows you to register providers in your application.

Learn more about this option in this documentation.


PaymentProvider Data Model#

When the Medusa application starts and registers the payment providers, it also creates a record of the PaymentProvider data model if none exists.

This data model is used to reference a payment provider and determine whether it’s installed in the application.

Was this page helpful?
Edit this page
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