chore: reorganize docs apps (#7228)
* reorganize docs apps * add README * fix directory * add condition for old docs
This commit is contained in:
1 parent
224ebb2154
commit
4fe28f5a95
6187 files changed
+601447
-598226
No files matched your search
@@ -0,0 +1,35 @@
|
||||
export const metadata = {
|
||||
title: `Payment Session`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
In this document, you’ll learn what a payment session is.
|
||||
|
||||
## What's a Payment Session?
|
||||
|
||||
A payment session, represented by the `PaymentSession` data model, is a payment amount to be authorized. It’s associated with a payment provider that handles authorizing it.
|
||||
|
||||
A payment collection can have multiple payment sessions. For example, during checkout, when a customer chooses between paying with Stripe or PayPal, each of these payment options is a payment session associated with a payment provider (Stripe or PayPal).
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## data field
|
||||
|
||||
Payment providers may need some additional data to process the payment later. The `PaymentSession` data model has a `data` field used to store that data.
|
||||
|
||||
For example, for Stripe, you must pass Stripe’s customer ID when processing the payment. So, when you create a payment session, the Stripe payment provider creates the customer in Stripe and stores the ID in the `data` field.
|
||||
|
||||
---
|
||||
|
||||
## Payment Session Status
|
||||
|
||||
The `status` field of a payment session indicates its current status. Its value can be:
|
||||
|
||||
- `pending`: The payment session is awaiting authorization.
|
||||
- `requires_more`: The payment session requires an action before it’s authorized. For example, to enter a 3DS code.
|
||||
- `authorized`: The payment session is authorized.
|
||||
- `error`: An error occurred while authorizing the payment.
|
||||
- `canceled`: The authorization of the payment session has been canceled.
|
||||
Reference in new issue
Block a user