saleor-docs
saleor-docs copied to clipboard
Add docs for order and checkout to explain how `authorizeStatus` and `chargeStatus` work
- Order & Checkout should have an explanation how
authorizeStatus
andchargeStatus
work- What are the possible values for the field.
- What each specific value means for checkout/order
- The checkout or Payment chapter should also receive the section that will explain when checkoutComplete can be called (what status values allow to place the order).
- Checkout.authorizeStatus - The status is calculated based on all transactions assigned to the checkout. authorize means, that we have authorized or charged funds (or partially charged and partially authorized). It takes into account fields:
authorizedAmount
,chargedAmount
,authorizePendingAmount
,chargePendingAmount
: NONE - the funds are not authorized PARTIAL - the cover funds don't cover fully the checkout's total. FULL - the funds cover the checkout's total. checkoutComplete can be called to convert checkout to order. The result for pending amounts (success/failure) will be provided by the payment app later, so it means that we can end up with the created order, that is not paid - as the pending amount has been converted to failure.
-
Checkout.chargeStatus - the status is calculated based on all transaction assigned to the checkout. It takes into account fields:
chargedAmount
,chargePendingAmount
:NONE - the funds are not charged. PARTIAL - the funds that are charged don't cover the checkout's total FULL - the funds that are charged fully cover the checkout's total. checkoutComplete can be called to convert checkout to order. The result for pending amounts (success/failure) will be provided by the payment app later, so it means that we can end up with the created order, that is not paid - as the pending amount has been converted to failure. OVERCHARGED - the charged funds are bigger than checkout's total. checkoutComplete can be called to convert checkout to order.
- Order.authorizeStatus - The status is calculated based on all transactions assigned to the order. authorize means, that we have authorized or charged funds (or partially charged and partially authorized). The status doesn't take into account pending amounts (difference between checkout and order authorize statuses). It takes into account fields:
authorizedAmount
,chargedAmount
. The amount used to calculate the status is reduced byorder.totalGrantedRefund
: NONE - the funds are not authorized PARTIAL - the funds that are authorized and charged don't cover fully theorder.total
-order.totalGrantedRefund
FULL - the funds that are authorized and charged fully cover theorder.total
-order.totalGrantedRefund
- Order.chargeStatus - the status is calculated based on all transaction assigned to the order. It takes into account fields:
chargedAmount
. The status doesn't take into account pending amounts (difference between checkout and order charge statuses). The amount used to calculate the status is reduced byorder.totalGrantedRefund
: NONE - the funds are not charged. PARTIAL - the funds that are charged don't cover theorder.total
-order.totalGrantedRefund
FULL - the funds that are charged fully cover theorder.total
-order.totalGrantedRefund
OVERCHARGED - the charged funds are bigger than theorder.total
-order.totalGrantedRefund