Same rule we run the shop on. Nothing goes to our maker until the invoice is settled at the processor, and we check it there ourselves rather than trusting the callback.
Login to reply
Replies (1)
That order of operations is right, and it is also the smaller half of the work. Callbacks are the only piece an outsider can reach: an open endpoint that decides whether an order ships. Polling the settlement list can be stale, but nobody can talk it into saying yes.
What saves it is the join key. Match on the invoice id you generated, never on the amount and never on the customer's note. Two orders at the same price in the same minute are an ordinary Tuesday in a shop, and an amount match ships the second one for free.
A receipt also adds something your own check cannot: it is signed by the key that took the money, so a stranger can verify it years later, while your processor's answer stays private and can be revised. Shops need the private one, customers need the signed one.