Payment integration: what must work after the Pay button
How to connect payment to an order: status confirmation, repeated events, refunds, reconciliation and testing. Acceptance criteria for a payment integration.
In this article
A payment integration is complete when the business can reliably determine an order’s state and fulfil its obligations to the customer. This requires connecting customer actions, provider events and records inside the product. A payment-form page alone is insufficient.
Describe order states first
An order may await payment, have a confirmed payment, be cancelled or be undergoing a refund. The specific states depend on the product and provider capabilities. Define which event moves the order forward and what happens to the goods or service at that point.
Examine separately what happens if a customer closes the tab or loses connectivity. The browser returning to the shop must not be the sole basis for confirming payment. The server checks status using the method in the chosen provider’s documentation.
Prepare event and retry handling
A provider may report events through a webhook. For example, Stripe describes these notifications for asynchronous payment events and recommends verifying the message signature. Handling must account for repeated deliveries and the order of arrival.
Also check repeated requests from the application. Stripe’s idempotency mechanism allows certain requests to be retried safely without performing the operation again. Confirm the chosen provider’s own rules and limitations for this mechanism.
The practical business criterion is that a repeated notification or click does not fulfil the service twice. The relationship between the order, payment attempt and provider transaction remains recorded and available for investigation.
Reconcile payment and fulfilment
The manager should see a confirmed state and a clear reason if intervention is required. Accounting should match payments, refunds, fees and settlement using the agreed reports. Discrepancies enter a work queue with an owner.
Refunds need a separate workflow. Define who can initiate one, how the amount is checked and how the customer learns the result. Include partial refunds if the business needs them and the selected payment method supports them.
What to check before launch
In test mode, run through a successful payment, a decline, an interrupted return to the product, a repeated event and the agreed refund types. Check notifications, records and employee permissions. After release, establish error monitoring and recovery of unfinished operations.
Sailet can prepare and implement an end-to-end payment workflow with verifiable acceptance criteria. Start the conversation with the product, chosen provider and actions that should follow a confirmed payment.
