Payment lifecycle
Understand how payments move through ICEPAY, what payment and financial statuses mean, and how they relate to orders in your store.
A payment can move through several states between creation, customer checkout, confirmation, and settlement.
Understanding these states can help you determine what is happening with a payment, whether you use a ready-made integration or integrate directly with the ICEPAY Checkout API.
ICEPAY exposes two separate status fields. They describe different parts of the payment process and should be considered independently.
| Field | Describes | Possible values |
|---|---|---|
status |
Where the payment is in its payment lifecycle | started, pending, completed, expired, cancelled |
financialStatus |
Whether the funds have been received | uncleared, cleared |
Lifecycle at a glance
Section titled “Lifecycle at a glance”A typical payment moves through the following process:
-
The payment is created
A payment starts with:
{"status": "started","financialStatus": "uncleared"} -
The customer starts checkout
The customer continues to ICEPAY Checkout or the selected payment method.
-
The payment is processed
Some payment methods can return a result almost immediately.
Others may temporarily place the payment in
pendingwhile the final result is being determined. -
The payment result becomes available
The payment can become
completed, return tostarted, expire, or be cancelled depending on what happens during checkout. -
The funds are received
When the funds have been received and cleared, the
financialStatuscan change fromunclearedtocleared.
Not every payment passes through every step in exactly the same way.
The exact lifecycle depends on the payment method and how quickly the payment provider can confirm the result.
Payment statuses
Section titled “Payment statuses”The status field describes where the payment is in its payment lifecycle.
The payment has been created and checkout can begin.
This is the initial state of every new payment.
The payment is being processed, but the final result is not yet known.
Wait for another payment update before treating the payment as successful or unsuccessful.
The payment flow has completed successfully.
The funds may still be uncleared, depending on the payment method.
The payment was not completed within its configured lifetime.
Payments remain open for four hours by default unless a different expiry period was configured.
The payment was cancelled and should no longer be considered an active payment attempt.
Payment status transitions
Section titled “Payment status transitions”Payment statuses do not always move through a single linear sequence.
A payment that completes immediately can follow:
started → completedA payment method that requires additional processing can follow:
started → pending → completedIf the payment attempt does not succeed, the payment can return to:
started → pending → startedA payment can also expire or be cancelled:
started → expiredstarted → cancelledLate payment confirmations
Section titled “Late payment confirmations”An expired payment is usually no longer an active payment attempt.
There are, however, situations where the customer already entered an external payment environment before the ICEPAY payment expired.
For example, the customer may still be completing the payment with their bank when the payment reaches its expiry time.
A confirmation received afterwards can still result in:
expired → pendingexpired → completedFinancial status
Section titled “Financial status”The financialStatus field answers a different question:
Have the funds actually been received?
The funds have not yet been confirmed as received.
Every newly created payment starts with this financial status.
The funds have been received and cleared.
This indicates that the financial side of the payment has been completed.
A payment can therefore be successfully completed while its funds are still uncleared:
{ "status": "completed", "financialStatus": "uncleared"}Later, when the funds have been received:
{ "status": "completed", "financialStatus": "cleared"}For some payment methods, confirmation of the customer’s payment and receipt of the funds do not happen at exactly the same time.
For payment methods where ICEPAY does not collect the funds, the financial
status may remain uncleared.
Payment status and order status
Section titled “Payment status and order status”The payment status in ICEPAY and the order status in your store are related, but they are not the same thing.
For example, your store might represent ICEPAY payment states like this:
| ICEPAY payment state | Possible store order state |
|---|---|
started |
Awaiting payment |
pending |
Payment processing |
completed + uncleared |
Payment completed |
completed + cleared |
Paid |
expired |
Payment expired |
cancelled |
Payment cancelled |
Keeping payment information up to date
Section titled “Keeping payment information up to date”After the customer enters checkout, two different mechanisms help keep the payment information synchronised.
A server-to-server notification that communicates payment changes to the integration or application.
It does not depend on the customer’s browser returning to the store.
The customer is redirected back to the store after leaving the payment flow.
This is mainly used to continue the customer’s checkout experience.
For merchants using a ready-made integration, these mechanisms normally work in the background.
Their purpose is to make sure the order in the store reflects the latest known payment state.
Customer return
Section titled “Customer return”The customer returning to your store should not by itself be considered proof that the payment succeeded.
The customer may return while the payment is still being processed, or the browser may never return even though the payment completed successfully.
For a merchant using a ready-made integration, the payment result page and order status are normally handled automatically.
Identifying a payment
Section titled “Identifying a payment”Every ICEPAY payment has a unique payment key, for example:
pi-01j1ps8zf4jgnk0c3dnd477sp1This key identifies the payment within ICEPAY.
Your own reference identifies the payment or order from your application’s
perspective.
Multiple payment attempts
Section titled “Multiple payment attempts”A customer may try to pay for the same order more than once.
For example:
- The customer starts an iDEAL | Wero payment.
- The customer cancels the payment or the attempt does not complete.
- The customer returns to the store.
- The customer chooses another payment method.
- A new payment attempt is created.
- The second payment completes successfully.
The order may remain the same, but multiple payment attempts can exist behind it.
Payment expiry
Section titled “Payment expiry”Payments remain open for four hours by default.
A different payment lifetime can be configured when creating the payment using
expireAfter:
{ "expireAfter": 1440}expireAfter is specified in minutes. In this example, the payment remains open
for 24 hours.
Once the configured lifetime has passed, a payment that has not completed can
move to expired.
Remember that a later payment confirmation may still be received when the customer had already entered an external payment flow before the payment expired.
After completion
Section titled “After completion”A completed payment can still be involved in other financial processes.
These can include:
- full or partial refunds;
- disputes and chargebacks;
- payment forwarding;
- settlement and reconciliation.
These processes are separate from the original payment lifecycle.
For example, creating a refund does not mean that the original payment stops
being completed. The refund has its own lifecycle and status.
What this means for you
Section titled “What this means for you”If you use a ready-made integration
Section titled “If you use a ready-made integration”In most cases, the integration handles the technical payment lifecycle for you.
The most important things to understand are:
- what
started,pending,completed,expired, andcancelledmean; - that a completed payment is not always financially cleared immediately;
- that some payment methods take longer to confirm than others;
- that the order status shown by your store can differ from the ICEPAY payment status;
- that payment updates can still arrive after the customer leaves checkout;
- that an order can have more than one payment attempt.
If an order appears to have an unexpected payment state, check the payment information in both your store and ICEPAY before taking manual action.
If you build a custom integration
Section titled “If you build a custom integration”Your integration should:
- store the ICEPAY payment key with the corresponding payment record;
- store
statusandfinancialStatusseparately; - use webhooks for backend payment updates;
- verify webhook signatures before processing them;
- process webhook updates idempotently;
- not rely on the customer’s browser redirect as confirmation of payment;
- keep your application’s order state separate from the ICEPAY payment state;
- support multiple payment attempts where appropriate;
- account for asynchronous and late payment updates;
- explicitly define whether fulfilment requires
completed,cleared, or both.
Continue reading
Section titled “Continue reading”Explore payment methods, settlement guarantees, and when to check financial status before fulfilling an order.

