Overview
Payments for orders are processed through a payment gateway. Commerce Cloud offers integrations for a selection of payment gateway providers, or you can create your own integrations.
Payment transactions are processed similarly for all gateways:
- A payment transaction is created and an attempt to pay is made.
- The transaction is forwarded to the third-party gateway specified by the customer.
- The payment is processed by the third-party gateway.
Payment transactions are always processed outside of Commerce Cloud for security reasons. Typically, you use a token rather than pass the card details directly. If, however, you want to pass the cart details directly to the third-party provider, Commerce Cloud enforces the use of the secure HTTPS protocol. If the transaction is successful, a 200 OK
response is returned. Use the response (success or failure) to update the transaction, which automatically updates the order and payment statuses.
A payment transaction can also be refunded. You can select which way you want to process refunds:
- Mark as Refunded: You can use your payment gateway’s console to process a refund. Process the refund first in the payment gateway and then use the Mark as Refunded capability in Commerce Cloud to complete the process.
- Refund through Commerce Cloud: Start a full or partial refund to a supported payment provider directly from Commerce Manager or the API. You still have the ability to mark as refunded for a pre-integrated gateway, such as Stripe.
Configure your store to use Manual Gateway to process payments if the order total is zero or the payment is through non-supported payment providers.
Order Status Workflow
The following image shows the workflow of the order status when you checkout a cart.
Summary of the workflow
- Checkout a cart. When you checkout a cart, an unpaid order is returned.
- Paying for an order. You can process the payment for an order through a payment gateway. You can pay for an order either using
purchase
payment method orauthorize
payment method. - Confirm the order. Order confirmation might be required when you purchase or authorize a transaction. If you use a
purchase
method, the order is immediately confirmed. If you useauthorize
method, funds are captured later when an item is dispatched or restocked, and then the order is considered as complete. - Fulfill, Refund or Cancel the paid order. The order is considered as fulfilled when it is shipped. You can cancel the order after the checkout or if the order is not fulfilled. You can also choose to refund a partial payment or full payment.
- (Optional) Anonymize the order. For more information, see Anonymizing orders.
Split Payments
Split payments involve multiple payment sources for a single order, using externally authorized payments. For example, you can pay for an order using a gift card and a credit card. An order with multiple payment transactions can also be in multiple payment states depending on each transaction.
Transactions for split payments are processed similarly for all gateways:
- A partial payment transaction is created and an attempt to pay the partial amount is made.
- The transaction for the specified amount is forwarded to the payment gateway specified by the customer.
- The partial payment is processed.
- Another partial payment transaction is created and an attempt to pay the remaining amount is made.
- Another transaction for the remaining amount is forwarded to the payment gateway specified by the customer.
- The payment is processed, paid, and complete. The payment status must show paid after the order is completed.
You can refund transactions for split payments. For more information about refund, see Refund a Payment.
The following scenarios show how a shopper can use multiple sources for split payment:
- Gift card and credit card
- Purchase order and credit card
- Store credit and credit card
- Employee dollars and credit card
- Gift card and loyalty card
- Loyalty card and wallet
The following image shows a workflow of the split payments.
The following table describes the payment and order statuses that you can see when an order is passed through multiple stages.
Payment Status | Order Status | Inventory Status | Description |
---|---|---|---|
partially_authorized | incomplete | Allocated | Indicates that the payment is partially_authorized and the balance_owing value is greater than zero. In this case, one of the transactions is authorized and complete. |
partially_paid | incomplete | Allocated | Indicates that the funds are captured but the balance_owing value is greater than zero. In this case, one of the transactions is captured or purchase is complete. |
unpaid | incomplete | Not Allocated | Indicates that the order does not have any complete payment transactions. In this case, all the transactions or any of the transactions can be still pending. |
authorized | processing | Allocated | Indicates that completed transactions cover the entire total amount for an order and at least one of the transactions is authorized . |
paid | complete | Allocated | Indicates that the order is complete and the amount for the order is fully paid when all authorized transactions are captured or purchase transactions are complete. |