Files
medusa-store/www/apps/resources/app/commerce-modules/payment/relations-to-other-modules/page.mdx
Shahed Nasser 2c5ba408d4 docs: edits and fixes to commerce module docs (#7468)
Apply edits and fixes to the commerce modules docs
2024-05-29 11:08:06 +00:00

34 lines
1.4 KiB
Plaintext

export const metadata = {
title: `Relations between Payment Module and Other Modules`,
}
# {metadata.title}
This document showcases the link modules defined between the Payment Module and other commerce modules.
## Cart Module
The Payment Module can be used with the Cart Module to accept payment for the cart during checkout.
Learn more about this relation in [this documentation](../payment-collection/page.mdx#usage-with-the-cart-module).
---
## Order Module
An order's payment is stored in a payment collection. Medusa defines a link module that builds a relationship between the `Order` and `PaymentCollection` data models.
![A diagram showcasing an example of how data models from the Order and Payment modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1716554726/Medusa%20Resources/order-payment_ubdwok.jpg)
---
## Region Module
You can specify for each region which payment providers are available. The Medusa application forms a relation between the `PaymentProvider` and the `Region` data models.
![A diagram showcasing an example of how resources from the Payment and Region modules are linked](https://res.cloudinary.com/dza7lstvk/image/upload/v1711569520/Medusa%20Resources/payment-region_jyo2dz.jpg)
This increases the flexibility of your store.
For example, paired with other modules, such as the Cart Module, you only show during checkout the payment providers associated with the cart's region.