Payment Updates and Background Jobs
This developer guide explains why payment updates and notifications can arrive at different times.
Payment providers send updates
A webhook is a message sent by a payment provider when something changes, such as a payment succeeding.
GoCart checks the provider’s signature before accepting it. Payment handlers update the matching order using the provider event and payment identifiers.
The same message can arrive twice
Providers and queues may deliver a message more than once. Idempotency means processing it again does not repeat the same business action.
GoCart records event identifiers and business-action keys so a repeated payment message does not earn coins or create the same notification again.
Work can retry later
A durable job is saved in the database before delivery is attempted. The worker claims it, performs the work and records the result.
Failures retry with longer waits. Work that reaches the attempt limit becomes DEAD and creates an admin alert. Recovery and admin replay help resume eligible work after the cause is fixed.