How payment intents work
Understanding more on how payment intents work in powering various payment scenarios.
Payment intent is the resource handling the processing of payments as it transitions through multiple statuses until it is completed.
1. How a payment intent is created
A payment intent is generated automatically once a wallet transaction or a checkout session is created.
2. Statuses across the lifetime of a payment intent
Statuses | Descriptions |
---|---|
requires_payment_method | When a checkout session is created, the status of the payment intent is set to requires_payment_method .This status requires the customer to fill in information about the payment method (card details, etc). |
requires_action | Not yet supported If the payment requires additional actions such as authenticating with 3D Secure, the payment intent will have the status of requires_action . |
authorised | The payment intent will store the payment information temporarily but put a hold on capturing payment until the amount is finalised. |
processing | The payment intent transitions to processing when:- the status was authorised .- this is a direct capture payment. - a wallet transaction is created. |
failed | If the payment attempt fails, the payment intentโs status changes to failed . |
succeeded | The payment has been processed and the funds are now in the Setel Dashboard account. For possible actions after a successful payment, please refer to the refunding and cancelling payments page. |
cancelled | Cancelling a payment intent can be done at any point except when the status is processing or succeeded .Cancelling will prevent the payment intent from further actions and any funds being held will be returned. |
expired | The session has timed out as the payment intent is still uncaptured after 30 minutes. |
partially_refunded | The request to refund is smaller than the paid amount and there is a remaining balance.This refund action can be done multiple times until the refundedAmount is equal to amount . |
refunded | When the refundedAmount is equal to amount , the payment intent will change to refunded status. |
3. Use cases
The 3D Secure is not yet supported currently so the
requires_action
status is skipped.
3.1 Payment intents for wallet transactions
Below are the statuses of a payment intent when a wallet transaction is created.
In this example, the payment method information is generated together with Setel code so the payment intent status goes directly to processing
.
3.2 Payment intent for checkout session
The payment of a checkout session can be captured directly or put on hold. If the payment is put on hold, the session will automatically expire after 30 minutes if no actions are performed.
3.2.1 Directly capturing a payment
Below is a flow of the status of a payment intent when a checkout session is created with the payment being captured immediately.
3.2.2 Placing a hold and capturing the payment later
Below is a flow of the status of a payment intent when a checkout session is created with a hold on the payment value.
For more information on holding captures, please refer to our Placing a hold and capturing payments page.
Note on auto expiry of held balance
Payments placed on hold will automatically expire after 30 minutes if it is not captured or cancelled.
Such payment intents will be updated with the status
expired
.
Updated over 2 years ago