Stripe Integration
This tutorial will guide you through the process of integrating Stripe with your Raindrop application.
Prerequisites
Before you begin:
- LiquidMetal Account: Sign up at liquidmetal.run
- A Raindrop Application with WorkOS Integration: WorkOS Integration Tutorial
- Raindrop CLI: Install the latest version of the Raindrop CLI:
npm i -g @liquidmetal-ai/raindrop@latestConfigure the Manifest with Stripe Payments
Add Stripe payments to your Raindrop application, by adding the following to your Raindrop application’s manifest:
payments { mode = "live" // "test" or "live" is available with Stripe Payments, with test being the default mode}
service "api" { visibility = "paid" // visibility "paid" is a protected visibility route "api" { cname = "api-prod" }}Deploy Your Application
Deploy your application by running the following command:
raindrop build deployConfigure with Stripe Payments
Run the following command to setup Stripe payments:
raindrop build stripe startThis will open a browser window with the Stripe configuration process. Follow the instructions in Stripe to complete the setup.
Deploy your application with Stripe Payments
Deploy your application by running the following command:
raindrop build deployYour application is now deployed with Stripe Payments. For more information on Stripe Payments visit the Stripe Docs here.
Best Practices for Stripe Integration with Raindrop and WorkOS
WorkOS JWT Template Configuration
For payment verification to work efficiently, you must configure the WorkOS JWT template to include user metadata.
Steps:
- Go to your WorkOS Dashboard: https://dashboard.workos.com
- Navigate to Authentication → Session → JWT Template and click
Manage - Replace the default template with the following:
{ "id": {{user.id}}, "email": {{user.email}}, "first_name": {{user.first_name}}, "last_name": {{user.last_name}}, "external_id": {{user.external_id}}, "metadata": {{user.metadata}}}