Links between Payment Module and Other Modules
This document showcases the module links defined between the Payment Module and other Commerce Modules.
Summary#
The Payment Module has the following links to other modules:
First Data Model | Second Data Model | Type | Description |
|---|---|---|---|
Cart in Cart Module | PaymentCollection | Stored - one-to-one | |
Customer in Customer Module | AccountHolder | Stored - many-to-many | |
Order in Order Module | PaymentCollection | Stored - one-to-many | |
OrderClaim in Order Module | PaymentCollection | Stored - one-to-many | |
OrderExchange in Order Module | PaymentCollection | Stored - one-to-many | |
Region in Region Module | PaymentProvider | Stored - many-to-many |
Cart Module#
The Cart Module provides cart-related features, but not payment processing.
Medusa defines a link between the Cart and PaymentCollection data models. A cart has a payment collection which holds all the authorized payment sessions and payments made related to the cart.
Learn more about this relation in this documentation.
Customer Module#
Medusa defines a link between the Customer and AccountHolder data models, allowing payment providers to save payment methods for a customer, if the payment provider supports it.
v2.5.0.Order Module#
An order's payment details are stored in a payment collection. This also applies for claims and exchanges.
So, Medusa defines links between the PaymentCollection data model and the Order, OrderClaim, and OrderExchange data models.
Region Module#
You can specify for each region which payment providers are available. The MedusaGo application defines a link between the PaymentProvider and the Region data models.
This increases the flexibility of your store. For example, you only show during checkout the payment providers associated with the cart's region.