Files
medusa-store/www/apps/resources/app/commerce-modules/payment/payment-provider/page.mdx
Shahed Nasser 95eef899f7 docs: add notes + missing links for user guide (#11621)
* docs: add notes + missing links for user guide

* fix build errors

* fixes
2025-02-26 15:28:18 +02:00

68 lines
2.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { CardList } from "docs-ui"
export const metadata = {
title: `Payment Module Provider`,
}
# {metadata.title}
In this document, youll learn what a payment module provider is.
<Note title="Looking for no-code docs?">
Refer to this [Medusa Admin User Guide](!user-guide!/settings/regions) to learn how to manage the payment providers available in a region using the dashboard.
</Note>
## 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
<CardList
items={[
{
href: "/commerce-modules/payment/payment-provider/stripe",
title: "Stripe"
}
]}
/>
---
## System Payment Provider
The Payment Module provides a `system` payment provider that acts as a placeholder payment provider.
It doesnt 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](/references/payment/provider) 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](../module-options/page.mdx#providers).
---
## 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 its installed in the application.