Back to the journalENGINEERING

The payment is complete. Is your store in the loop?

Understand the handoff between a payment provider, your backend and your order system.

CIRCUSPAY EDITORIAL · 4 min read
CircusPay payment illustration

Separate the browser from the order state

A customer can close a browser tab, lose their connection or never reach a confirmation screen. Order processing should not depend solely on that final page being displayed.

A server notification provides another path for learning that a payment changed state. Your integration should verify the notification using the provider’s documented mechanism before updating the order.

Expect more than one delivery

Notifications can arrive more than once. Record a stable identifier for the event or business operation and make repeat processing safe. Repeating a notification must not repeat fulfilment.

Keep the payment update and the record of the work it triggers consistent. For example, an order should not be marked as processed if the fulfilment task was never saved. The exact implementation depends on your storage and order system.

Give failed deliveries a second chance

A destination can be temporarily unavailable. Record delivery attempts, response codes and when another attempt is due. Preserve the event identity across retries so the receiving system can recognise repeats.

Distinguish a payment failure from a notification failure. They are different operational problems. A failed notification does not by itself mean that the customer has not paid.

Test the uncomfortable cases

Test an unavailable destination, a delayed event, a repeated event and a browser closed before confirmation. Verify both the order status and the number of downstream actions.

Keep secrets and personal information out of general logs. Record enough identifiers to reconcile the payment with the order, then restrict access to the detailed records needed for support. Consult the provider’s current documentation for its payload, verification and retry requirements.

Provider reference: SumUp webhook documentation.

Written by CircusPay Editorial · Practical perspectives for merchants and builders.

Keep exploring.

All stories →

YOUR ENQUIRY

Ready to share.

Your message has been prepared on your device. Copy it, then open our Telegram contact to send it.

Open Telegram ↗