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
2024-10-14 07:20:35 +00:00
committed by GitHub
parent 74b286b701
commit 11120a8b7e
30 changed files with 662 additions and 314 deletions
@@ -10,10 +10,12 @@ In this document, youll learn about an orders transactions and its use.
## What is a Transaction?
A transaction represents any order payment process, such as capturing or refunding an amount. Its represented by the [Transaction data model](/references/order/models/Transaction).
A transaction represents any order payment process, such as capturing or refunding an amount. Its represented by the [OrderTransaction data model](/references/order/models/OrderTransaction).
The transactions 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 doesnt provide payment processing functionalities, so it doesnt 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 payments details:
The `OrderTransaction` data model has two properties that determine which data model and record holds the actual payments details:
- `reference`: indicates the tables 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`.