MΓ³dulo 12 Β· Payments & Background Jobs β LecciΓ³n 1 de 5 Β· ~12 min
How Card Payments Work
Three actors, not two
Every booking so far has been free of money β module 11 computed a price_cents, but nothing actually charged anyone. This module wires up the real thing, and the first surprise is that it's never just "your app talks to Stripe." There are three actors: the mobile app on the owner's phone, PawWalk's server (the Rails app you've been building), and Stripe itself. All three talk to each other, but not in the pattern you'd guess.
The card number ITSELF only ever travels between the mobile app and Stripe, directly β never through your server. That's not a design choice you get to make casually; it's closer to a hard rule of the industry.