The thing that makes that possible is that I'm using a seedable PRNG for the pattern generation and have a custom serialization format for all of the possible pattern parameters. This means that any pattern can be represented by a single short string like `w:1440!h:900!x:random!v:0.63!c:0.06!s:9gjk5s!f:sp!i:0.30` and reproduced with 100% accuracy.
That means instead of a database, I can just store the entire purchased pattern directly within the Stripe transaction within the `client_id` field using this compressed representation. Then it's just a matter of reading it back from the Stripe API when I get the "purchase completed" webhooks in order to build the correct attachments and send the customer their assets via email. This keeps my own service totally stateless & database-free, and also has the very nice property of allowing me to quickly and easily access the pattern by copy-pasting the client-id from the Stripe dashboard if I ever need to grab it for customer service reasons!