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 | Stored - one-to-one | ||
Stored - many-to-many | |||
Stored - one-to-many | |||
Stored - one-to-many | |||
Stored - one-to-many | |||
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.
Retrieve with Query#
To retrieve the cart associated with the payment collection with Query, pass cart.*
in fields
:
Manage with Link#
To manage the payment collection of a cart, use Link:
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
.Retrieve with Query#
To retrieve the customer associated with an account holder with Query, pass customer.*
in fields
:
Manage with Link#
To manage the account holders of a customer, use Link:
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.
Retrieve with Query#
To retrieve the order of a payment collection with Query, pass order.*
in fields
:
Manage with Link#
To manage the payment collections of an order, use Link:
Region Module#
You can specify for each region which payment providers are available. The Medusa 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.
Retrieve with Query#
To retrieve the regions of a payment provider with Query, pass regions.*
in fields
:
Manage with Link#
To manage the payment providers in a region, use Link: