Add Flexibility to Your Site with Gatsby Functions
summary
Builds two Gatsby Functions: an API endpoint that handles POST to create a Stripe checkout session with metadata (city, year, success/cancel URLs) and GET to retrieve that session by session_id, plus a POST Stripe webhook that validates events and expands the session/customer then sends conditional emails via SendGrid webhook sending conditional emails after verifying payment. Demo shows redirect to Stripe checkout, successful return to a success page, and working email delivery in dev using the Stripe CLI forwarding to localhost.
AI-written summary · about
chapters (7)
- 0:00Introduction to Gatsby Functions
- 2:08Demo overview and setup
- 3:56Creating the time travel function
- 8:53Handling success page requests
- 11:44Building the Stripe webhook
- 13:56Testing and deploying functions
- 14:59Conclusion and next steps
related talks
23mFour Real World Solutions Using Gatsby Functions
01h 23mSelling all the things: building online payments in JavaScript
50mBuilding a Serverless API With Google, Firebase and PostgreSQL
41mStatic Sites and Serverless Functions - A Dynamic Combination
24mServerless Functions and Vue.js
22mGo serverless: manage payments in your apps
35mServerless Functions and Vue.js
27mBeyond Static: Dynamic Web Applications with Gatsby
