chore: reorganize docs apps (#7228)
* reorganize docs apps * add README * fix directory * add condition for old docs
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
export const metadata = {
|
||||
title: `Payment Collection`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
In this document, you’ll learn what a payment collection is and how to use it with the Cart Module.
|
||||
|
||||
## What's a Payment Collection?
|
||||
|
||||
A payment collection stores payment details related to a resource, such as a cart or an order. It’s represented by the `PaymentCollection` data model.
|
||||
|
||||
Every purchase or request for payment starts with a payment collection. The collection holds details necessary to complete the payment, including:
|
||||
|
||||
- The payment sessions that represents the payment amount to authorize.
|
||||
- The payments that are created when a payment session is authorized. They can be captured and refunded.
|
||||
- The payment providers that handle the processing of each payment session, including the authorization, capture, and refund.
|
||||
|
||||
---
|
||||
|
||||
## Usage with the Cart Module
|
||||
|
||||
The Cart Module provides cart management features. However, it doesn’t provide any features related to accepting payment.
|
||||
|
||||
With the Payment Module, you can create a payment collection for the cart and handle the payment functionalities.
|
||||
|
||||
The Medusa application creates a link between the `PaymentCollection` and `Cart` data models. It also implements the payment flow during checkout as explained in [this documentation](../payment-flow/page.mdx).
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Multiple Payments
|
||||
|
||||
The payment collection supports multiple payment sessions and payments. You can use this to accept payments in increments or split payments across payment providers.
|
||||
|
||||

|
||||
Reference in New Issue
Block a user