Skip to content

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

A typical payment moves through the following process:

  1. The payment is created

    A payment starts with:

    {
    "status": "started",
    "financialStatus": "uncleared"
    }
  2. The customer starts checkout

    The customer continues to ICEPAY Checkout or the selected payment method.

  3. The payment is processed

    Some payment methods can return a result almost immediately.

    Others may temporarily place the payment in pending while the final result is being determined.

  4. The payment result becomes available

    The payment can become completed, return to started, expire, or be cancelled depending on what happens during checkout.

  5. The funds are received

    When the funds have been received and cleared, the financialStatus can change from uncleared to cleared.

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.

The status field describes where the payment is in its payment lifecycle.

started

The payment has been created and checkout can begin.

This is the initial state of every new payment.

pending

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.

completed

The payment flow has completed successfully.

The funds may still be uncleared, depending on the payment method.

expired

The payment was not completed within its configured lifetime.

Payments remain open for four hours by default unless a different expiry period was configured.

cancelled

The payment was cancelled and should no longer be considered an active payment attempt.

Payment statuses do not always move through a single linear sequence.

A payment that completes immediately can follow:

started → completed

A payment method that requires additional processing can follow:

started → pending → completed

If the payment attempt does not succeed, the payment can return to:

started → pending → started

A payment can also expire or be cancelled:

started → expired
started → cancelled

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 → pending
expired → completed

The financialStatus field answers a different question:

Have the funds actually been received?

uncleared

The funds have not yet been confirmed as received.

Every newly created payment starts with this financial status.

cleared

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.

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

After the customer enters checkout, two different mechanisms help keep the payment information synchronised.

Webhook

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.

Customer return

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.

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.

Every ICEPAY payment has a unique payment key, for example:

pi-01j1ps8zf4jgnk0c3dnd477sp1

This key identifies the payment within ICEPAY.

Your own reference identifies the payment or order from your application’s perspective.

A customer may try to pay for the same order more than once.

For example:

  1. The customer starts an iDEAL | Wero payment.
  2. The customer cancels the payment or the attempt does not complete.
  3. The customer returns to the store.
  4. The customer chooses another payment method.
  5. A new payment attempt is created.
  6. The second payment completes successfully.

The order may remain the same, but multiple payment attempts can exist behind it.

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.

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.

In most cases, the integration handles the technical payment lifecycle for you.

The most important things to understand are:

  • what started, pending, completed, expired, and cancelled mean;
  • 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.

Your integration should:

  • store the ICEPAY payment key with the corresponding payment record;
  • store status and financialStatus separately;
  • 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.

Payment methods

Explore payment methods, settlement guarantees, and when to check financial status before fulfilling an order.