Hacker News new | ask | show | jobs
by scott_w 39 days ago
That’s because everyone here thinking about payments completely incorrectly. They’re not atomic and your server shouldn’t pretend they are.

You need to store the payment state at each relevant step and process it asynchronously. If requests time out, you check the status of it using the key you store (with the processor) to see if it was even received.

It’s not perfect, some processors will 500 while processing the payment (Braintree), so you still need reconciliation on the backend.

1 comments

I'm not as smart as you folks but doesn't durable execution being a part of the solution help a lot in this respect?