Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Expand payments docs a little, fix few typos

Pacu206a255f6a74b
diff --git a/docs/architecture/payments.rst b/docs/architecture/payments.rst
index 8649988807..bf298029ed 100644
--- a/docs/architecture/payments.rst
+++ b/docs/architecture/payments.rst
@@ -1,10 +1,59 @@
Payments
========
+Saleor uses the concept of Payment Methods and Transactions to fulfill the payment process.
+
+Payment Methods
+---------------
+
+Represents transactable payment information such as credit card details,
+gift card information or a customer's authorization to charge their PayPal account.
+
+All payment process related pieces of information are stored at the gateway level,
+we are operating on the reusable token which is a unique identifier
+of the customer for given gateway.
+
+Payment methods belong to a customer, one can use several payments method within a single order.
+
+Payment method has 3 possible charge statuses:
+
++----------------+-------------------+------------------------------------------------------------------------------------------------------+
+| Code | GraphQL API value | Description |
++----------------+-------------------+------------------------------------------------------------------------------------------------------+
+| charged | CHARGED | Funds were taken off the customer founding source, partly or completely covering the payment amount. |
++----------------+-------------------+------------------------------------------------------------------------------------------------------+
+| not-charged | NOT_CHARGED | No funds were take off the customer founding source yet. |
++----------------+-------------------+------------------------------------------------------------------------------------------------------+
+| fully-refunded | FULLY_REFUNDED | All charged funds were returned to the customer. |
++----------------+-------------------+------------------------------------------------------------------------------------------------------+
+
+Transactions
+------------
+
+Transactions represent attempts to transfer money between your store
+and your customers, within a chosen payment method.
+
+There are 5 possible transaction types:
+
++---------+-------------------+----------------------------------------------------------------------------------------------------------------------------+
+| Code | GraphQL API value | Description |
++---------+-------------------+----------------------------------------------------------------------------------------------------------------------------+
+| auth | AUTH | An amount reserved against the customer's funding source. Money does not change hands until the authorization is captured. |
++---------+-------------------+----------------------------------------------------------------------------------------------------------------------------+
+| capture | CAPTURE | A transfer of the money that was reserved during the authorization stage. |
++---------+-------------------+----------------------------------------------------------------------------------------------------------------------------+
+| charge | CHARGE | Authorization and capture in a single step. |
++---------+-------------------+----------------------------------------------------------------------------------------------------------------------------+
+| void | VOID | A cancellation of a pending authorization or capture. |
++---------+-------------------+----------------------------------------------------------------------------------------------------------------------------+
+| refund | REFUND | Full or partial return of captured funds to the customer. |
++---------+-------------------+----------------------------------------------------------------------------------------------------------------------------+
+
+
Supported Gateways
------------------
-Default configuration uses the *dummy* backend.
+The default configuration uses the *dummy* backend.
It's meant to allow developers to easily simulate different payment results.
Here is a list of supported payment providers:
@@ -17,21 +66,21 @@ Here is a list of supported payment providers:
This is very useful for development but make sure you use production mode when deploying to a production server.
-Authorisation and Capture
+Authorization and Capture
-------------------------
-Some of the payment backends support pre-authorising payments.
+Some of the payment backends support pre-authorizing payments.
-Authorisation and capture is a two step process.
+Authorization and capture is a two-step process.
-First the funds are locked on the payer's account but are not transferred to your bank.
+Firstly the funds are locked on the payer's account but are not transferred to your bank.
-Then depending on the provider and card type you have between a few days and a month to charge the card for an amount not exceeding the authorised amount.
+Then depending on the provider and card type you have between a few days and a month to charge the card for an amount not exceeding the authorized amount.
This is very useful when an exact price cannot be determined until after the order is prepared.
It is also useful if your business prefers to manually screen orders for fraud attempts.
-When viewing orders with pre-authorised payments Saleor will offer options to either capture or release the funds.
+When viewing orders with pre-authorized payments Saleor will offer options to either capture or release the funds.
Refunds
diff --git a/saleor/payment/__init__.py b/saleor/payment/__init__.py
index d6ed9d06d2..06e3378c99 100644
--- a/saleor/payment/__init__.py
+++ b/saleor/payment/__init__.py
@@ -36,7 +36,7 @@ class TransactionType:
class ChargeStatus:
"""
- Charged: Funds were taken off the customer founding source, partly or
- completly covering the payment amount.
+ completely covering the payment amount.
- Not charged: No funds were take off the customer founding source yet.
- Fully refunded: All charged funds were returned to the customer.
"""
diff --git a/saleor/payment/models.py b/saleor/payment/models.py
index 5ebb6f8c28..4c79c7b8b8 100644
--- a/saleor/payment/models.py
+++ b/saleor/payment/models.py
@@ -102,7 +102,7 @@ class PaymentMethod(models.Model):
class Transaction(models.Model):
"""Transactions represent attempts to transfer money between your store
- and your customers, with a choosen payment method.
+ and your customers, with a chosen payment method.
"""
created = models.DateTimeField(auto_now_add=True, editable=False)
payment_method = models.ForeignKey(