|
1
|
export const metadata = { |
|
2
|
title: `Payment Collection`, |
|
3
|
} |
|
4
|
|
|
5
|
# {metadata.title} |
|
6
|
|
|
7
|
In this document, you’ll learn what a payment collection is and how the Medusa application uses it with the Cart Module. |
|
8
|
|
|
9
|
## What's a Payment Collection? |
|
10
|
|
|
11
|
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](/references/payment/models/PaymentCollection). |
|
12
|
|
|
13
|
Every purchase or request for payment starts with a payment collection. The collection holds details necessary to complete the payment, including: |
|
14
|
|
|
15
|
- The [payment sessions](../payment-session/page.mdx) that represent the payment amount to authorize. |
|
16
|
- The [payments](../payment/page.mdx) that are created when a payment session is authorized. They can be captured and refunded. |
|
17
|
- The [payment providers](../payment-provider/page.mdx) that handle the processing of each payment session, including the authorization, capture, and refund. |
|
18
|
|
|
19
|
--- |
|
20
|
|
|
21
|
## Multiple Payments |
|
22
|
|
|
23
|
The payment collection supports multiple payment sessions and payments. |
|
24
|
|
|
25
|
You can use this to accept payments in increments or split payments across payment providers. |
|
26
|
|
|
27
|
 |
|
28
|
|
|
29
|
--- |
|
30
|
|
|
31
|
## Usage with the Cart Module |
|
32
|
|
|
33
|
The Cart Module provides cart management features. However, it doesn’t provide any features related to accepting payment. |
|
34
|
|
|
35
|
During checkout, the Medusa application links a cart to a payment collection, which will be used for further payment processing. It also implements the [payment flow](../payment-flow/page.mdx) during checkout. |
|
36
|
|
|
37
|
 |