This is the early access documentation preview for Custom Views. This documentation might not be in sync with our official documentation.
Payment lifecycle
Learn about the payment lifecycle in digital commerce and how commercetools Checkout handles it.
commercetools Checkout manages the following stages of a payment lifecycle:
- Authorization
- Payment capture
- Authorization cancellation
- Refund
Payment capture
During this stage, an authorized Payment amount is captured—meaning the funds are deducted from a customer's account and transferred to the merchant’s account.
The PSP executes payment capture automatically, if an auto capture process is configured; or any merchant process can manually trigger the process during the processing of an Order.
It might happen after the Order is created—when the goods are ready to be delivered, or in any other business scenario.
How Checkout manages payment captures
The process to capture funds after an Order is created is a business decision and your responsibility, as a merchant.
If you trigger payment capture manually through a process, you can request payment capture to the PSP using the Checkout Payments API. After sending the request, Checkout adds a Transaction of type=Charge
to the existing Payment inside the Order.
If the capture is triggered by the PSP through an auto capture process, Checkout adds a Transaction of type=Charge
after it's notified by the PSP.
Refund
In this stage, a captured payment is returned to the customer for a given order. It occurs when the customer requests a refund, goods are returned, or you need to reimburse the customer for any reason. Depending on the scenario, a refund can be partial or full and cannot exceed the captured amount.
How Checkout manages refunds
You can request a refund to the PSP using the Checkout Payments API. After sending the request, Checkout adds a Transaction of type=Refund
to the existing Payment inside the Order, along with the amount to be refunded.
As several partial refunds can happen during the payment lifecycle, you can refund Payment multiple times, as long as the amount to refund does not exceed the total amount of the original Payment.
Payments in the Merchant Center
Payments created by Checkout can be viewed in the Merchant Center from an Order's detail page. To access the Payments related to an Order, go to Orders > Order list, select the Order, and then click the Payments tab.
The following Payment information are available:
- Payment method: the payment method used by the customer for the Order
- Payment service provider (PSP): the Payment Service Provider associated with the payment method
- Payment provider ID: the identifier assigned by the PSP on its system for the payment
- Amount planned: the total amount of the Payment
- Payment transactions: the Transactions added to the Payment during its lifecycle and the related information
FAQs
When should I start fulfilling an Order?
As PSPs work asynchronously, regardless of the first response to an authorization request that they return, you must wait for a notification that confirms the authorization of the Payment. To receive notifications about Payment updates, you can use Subscriptions.
You should start fulfilling an Order only if the Payment contains a Transaction whose type=Authorization
and state=Success
.