docs: improve commerce modules [3/n] (#9510)

Improve and add docs for Order and Payment modules

[3/n]

Closes DOCS-966
Closes #9485
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-10-14 07:20:35 +00:00
1 parent 74b286b701
commit 11120a8b7e
30 files changed
+662 -314

No files matched your search

@@ -10,10 +10,12 @@ In this document, you’ll learn about an order’s transactions and its use.
## What is a Transaction?
A transaction represents any order payment process, such as capturing or refunding an amount. It’s represented by the [Transaction data model](/references/order/models/Transaction).
A transaction represents any order payment process, such as capturing or refunding an amount. It’s represented by the [OrderTransaction data model](/references/order/models/OrderTransaction).
The transaction’s main purpose is to ensure a correct balance between paid and outstanding amounts.
Transactions are also associated with returns, claims, and exchanges if additional payment or refund is required.
---
## Checking Outstanding Amount
@@ -79,11 +81,13 @@ To check the outstanding amount of the order, its transaction amounts are summed
</Table.Body>
</Table>
---
## Transaction Reference
The Order Module doesn’t provide payment processing functionalities, so it doesn’t store payments that can be processed. Payment functionalities are provided by the [Payment Module](../../payment/page.mdx).
The `Transaction` data model has two properties that determine which data model and record holds the actual payment’s details:
The `OrderTransaction` data model has two properties that determine which data model and record holds the actual payment’s details:
- `reference`: indicates the table’s name in the database. For example, `payment` from the Payment Module.
- `reference_id`: indicates the ID of the record in the table. For example, `pay_123`.