Goal: After successfully charing the user's CC for $X, send postcards to Y randomly chosen registered voters who have not previously received a postcard, where Y is the number of postcards possible to purchase for $X (minus all service fees).
If we embed Stripe into our site directly:
- API request includes Stripe token. Charge the user's CC. Wait for successful response from Stripe.
If we use Square or something and they handle charging the user's CC on Stripe:
- API request is a webhook from Stripe confirming that the CC was charged.
After payment is resolved:
- Calculate how many postcards can be purchased after subtracting the Stripe service fees. Let that by Y.
- Choose Y voters at random from the database who have not received a post card previously.
- Make request to ClickSend API to send postcard
If we embed Stripe into our site directly:
- Send response to our website so that we can show the user a confirmation message that the postcards were sent.
Goal: After successfully charing the user's CC for $X, send postcards to Y randomly chosen registered voters who have not previously received a postcard, where Y is the number of postcards possible to purchase for $X (minus all service fees).
If we embed Stripe into our site directly:
If we use Square or something and they handle charging the user's CC on Stripe:
After payment is resolved:
If we embed Stripe into our site directly: