C
C#2y ago
linqisnice

❔ Some questions about how payment is usually handled in ecommerce

Is this a good flow (with stripe in this case) - When CreateReservation/CreatePurchase endpoint is triggered, we also create a payment intent. - We tokenize the reservation id and return it to the client - Trigger ProcessPayment endpoint, use the token to fetch the reservation and then confirm the intent that was created. In other words, two endpoints for creating purchase and finalizing payment... or even more endpoints or should it all be done without leaving the server, i.e. directly in the createreservation endpoint? That seems like a massive god class of a handler since we need to account for in person vs online payment, different payment options and methods. Bonus question: Should different payment methods and options have separate endpoints? I.e. one for klarna, one for card, one for bank etc?
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server