Go to supabase dashboard > Database > Wehbooks and enable Webhhooks.
Open supabase/migrations/20220828143845_user_data.sql
and replace the default supabase url abnd anon key with your project info.
Add the relevant data in .env
and supabase/.env
Go to https://app.supabase.com/account/tokens and create a new acces token.
Login to supabase cli by running supabase login
and paste the token increated in previous step.
Connect supabnase project by running supabase link --project-ref YOUR_PROJECT_REF
and paste the database password.
Run supabase db push
to push the migrations.
Go to Supabase > Settings > API and add stripe
scheme in Exposed schema and Extra search path
Push the required env variables in supabse dashboard.
supabase secrets set --env-file ./supabase/.env
supabase functions deploy create-stripe-customer
supabase functions deploy stripe-sync --no-verify-jwt