4 ms·
I think this is one of the value-added features of using services like Stripe, right? Just as we have moved from dedicated box hosting to the cloud, we trust pa
by jasonjei 9y ago
I think this is one of the value-added features of using services like Stripe, right? Just as we have moved from dedicated box hosting to the cloud, we trust payment gateways like Stripe to properly authorize and capture payment.
I think the authorize and capture model adequately solves most of the issues (wait for authorization code, then capture payment). However, how do you guarantee payment capture even after having an auth? Does Stripe guarantee the card processor receives the capture request before returning a success code to the API client? If, for example, your initial call to the Stripe API for capture fails, can you safely run the capture call again with the original authorization to avoid a double charge? If I understand correctly, you cannot capture more than authorized?
You want to make sure you charge the customer once, not zero, or more than once. I think that's where the difficulty in writing credit card payment code lies.