Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/stripe backend #1013

Merged
merged 9 commits into from
Apr 26, 2023
Merged

Feature/stripe backend #1013

merged 9 commits into from
Apr 26, 2023

Conversation

jshearer
Copy link
Contributor

@jshearer jshearer commented Apr 20, 2023

Description:

Implements the backend for billing details using stripe's API:

  • Create SetupIntents that validate and store a payment method for future use
    • When a tenant first tries to create a SetupIntent, we also create a Customer in stripe for that tenant
  • List payment methods
  • Delete a payment method
  • Switch your primary payment method

There is also basic authorization to ensure that the user making the network request has admin on the tenant they're making the request for. In the future we should probably have a separate billing role, or something like that


This change is Reviewable

Copy link
Member

@psFried psFried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM

supabase/functions/billing/index.ts Show resolved Hide resolved
supabase/functions/billing/index.ts Outdated Show resolved Hide resolved
@jshearer jshearer merged commit 13768f2 into master Apr 26, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants