Discussions

Ask a Question
Back to all

Best way to handle API retries for bookings?

Hi everyone,

I’m working on an integration for CherishX, where customers can book services such as birthday and event decorations online. I’m looking into using the Brass API for handling payment-related workflows.

I wanted to understand the recommended approach when an API request times out or fails, but the transaction may have actually been processed. How should we safely retry the request without accidentally creating a duplicate payment?

Would using the x-idempotency-key be the recommended approach for CherishX’s payment requests? Also, are there specific error responses we should handle differently when implementing retries?

Any practical guidance or examples would be really helpful.