stripe-firebase-extensions icon indicating copy to clipboard operation
stripe-firebase-extensions copied to clipboard

Connect account tied to subscription via checkout session

Open tyler-jewell opened this issue 1 year ago • 0 comments

Feature request

  • Extension name: firestore-stripe-payments

Is your feature request related to a problem? Please describe.

I am using off-the-shelf firestore-stripe-payments extension with Flutter.

For my app, we have salesmen who can participate in revenue sharing IF the customer they sell to enters a 4 digit code tied to that salesman (which is tied to a Connect account id).

Today, it seems there is no way to add this information to the checkout session document in Firebase. I believe there are other ways but require some hacking.

Describe the solution you'd like

Ideally, this is my flow:

  1. Customer agrees to purchase subscription
  2. They open our app and start the payment process
  3. They optionally enter a 4 digit code before creating a checkout session.
  4. The app will look up the connect account id associated with that code.
  5. A checkout_session document is created in firebase with the connect account transfer details ("transfer_data": {"destination": [CONNECT ID], "amount_percent": 40}).
  6. User completes checkout session
  7. Firebase extension creates a subscription for that customer that will automatically transfer 40% of the monthly subscription.

tyler-jewell avatar Jul 04 '23 00:07 tyler-jewell