Test how payments fail before you launch
2026-12-03 / 4 min / payments / testing / reliability
Use four rehearsal scenarios to see whether your payment integration can recover from delayed events, duplicate callbacks and failed updates.
The customer has a receipt. Your shop still shows the order as unpaid. They send the receipt to support, and someone has to decide whether to release the order. The checkout demo passed last week.
The demo taught the team what a successful payment looks like when each system hears from the next one on time. The support ticket asks a different question. Can the team tell where the confirmation stopped, and can it recover the order safely?
Run both versions before you launch.
Follow one payment from checkout to fulfilment
In a sandbox, create an order and record its reference. Start a test payment, note the provider reference, and follow it to the payment record and the order update. If a separate job handles fulfilment, follow the record to that job as well.
At each step, write down what the system knows. The checkout request was accepted. The provider confirmed that the customer paid. The shop recorded the payment against the right order. The fulfilment job picked up the order. Each statement should have evidence you can find again.
Take one screenshot of the customer view and note what support can search by. If those searches need different references, record how to get from one to the other.
Rehearse four interruptions
Use test accounts and a sandbox or a fake provider. Keep fulfilment pointed at a test destination. Write the expected customer message, payment state and fulfilment count for each scenario before you run it.
| Interruption | What to check |
|---|---|
| The provider confirms payment before the callback arrives. | The order shows that confirmation is pending. Your reconciliation process can match the provider’s confirmation to the correct order and apply it once. |
| The same confirmation arrives twice. | Both deliveries refer to the same payment. The order has one payment record for it and fulfilment happens once. |
| Your database fails during the payment update. | The handler either saves the event for processing or lets the provider know delivery failed. After recovery, a retry or reconciliation brings the order up to date. |
| Payment is recorded, then the fulfilment job fails. | The payment stays recorded. The team can retry fulfilment without requesting another payment or dispatching a duplicate order. |
Check the provider’s retry policy before relying on redelivery. If you acknowledge an event before processing it, verify that it has been saved somewhere durable first. Test duplicate confirmations arriving close together as well as one after the other. Two handlers can otherwise both see an order awaiting payment.
Give support enough evidence to act
Ask a teammate who did not build the integration to take the first support ticket. Give them a test receipt and order reference. Watch what they can determine with the access they already have.
Can they find the provider confirmation? Can they see which update failed? Can they tell which action is safe to retry? Turn the point where they stall into a search field, an alert or one step in the runbook. The team needs a way to do this again when the person who wrote the integration is offline.
For provider-specific diagnosis, see what to check when an M-Pesa callback is missing. For the records that make this kind of recovery possible, see how to reconcile M-Pesa payments.
The rehearsal ends when you can give the customer an answer backed by the records and get the paid order to fulfilment once.
Read next
- What a healthy API dashboard can hide
When an API stays green while customers wait, follow one request through the queue and measure how long it takes to finish the work.
- eTIMS integration: OSCU or VSCU, and what changes in your system
KRA eTIMS system-to-system integration explained: OSCU vs VSCU, sandbox testing and certification, and what your invoicing system has to change.
