MΓ³dulo 12 Β· Payments & Background Jobs β LecciΓ³n 3 de 5 Β· ~9 min
Webhooks: Stripe Calls You Back
The async gap, made concrete
Lesson 1 named it: your pay request finishes with a client_secret, long before the card actually clears. The mobile app confirms the charge with Stripe directly β an exchange your Rails server has zero visibility into. So how does PawWalk ever learn the charge succeeded? Stripe tells you, by calling YOUR server back: a plain POST to an endpoint you expose, whenever a PaymentIntent's state changes. That's a webhook, and it's the only way your server finds out what happened outside its own request cycle.