Payments
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.
warning
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.