#isaacs-Connect
1 messages ยท Page 1 of 1 (latest)
hi, orakaro
Alternatively: (c) is there a way for us as the connected account owner to programmatically get the sk and pk for the connected account, so we can give them a handy code snippet to use in their app?
Hi, give me some mins to catch up
take your time, I know connect issues get convoluted ๐
(a) Yes Platform should be creating the SetupIntent. SetupIntent can only be created server-side, via a Secret sk_ key
(b) It depends on which type of connected account. Standard: yes, express/custom: no.
(c) As mentioned in (b), if they are Standard they would have their key already.
Moreover, I would like to know your connected account type and your fund flow first.
They are Standard accounts. Fund flow is still being worked out on the product side.
For Standard accounts I believe it's Direct Charge, correct?
So the ideal flow is:
You create a SetupIntent, with your sk_ key and a Stripe account header similar to this step: https://stripe.com/docs/connect/direct-charges#create-a-charge
Then your connected account use your publishable key, confirm that SetupIntent client-side, with a stripe account header
with standard accounts, the buyer is being charged by our user, correct. we can set an application fee, but we do not do the actual charging.
Yeah that sounds like Direct Charge above
well, we're going to be doing a SetupIntent right? Not a PaymentIntent? Because it's subscription/metered charges.
not a one-off checkout
Yes, SetupIntent
ok, cool, then I'm understanding you correctly, I think.
So we create the SetupIntent with our sk. โจ somehow โจ we send that seti_... key and our pk_... to our user, and have them use that to collect payment info from the customer using stripe elements. meanwhile, they send us API requests, and we figure out what the customer should be charged, and create the appropriate products/charges/subscriptions in their connected account, with appropriate application fee amounts so we get paid.
I think that means I have to implement an API that can refresh the setupintent, right?
First half of the flow LGTM. The second half about they send you API requests for you to figure out..., I think you can setup a Connect Webhook to listen to events from them. I don't have a handy example right now, but it worths trying
yeah, that's not a stripe thing, that's our product ๐
we are a metered billing product, make it easier for SaaS apps to iterate on their pricing, bill for metered usage with a nice API, etc.
Like you can listen to payment_intent.succeed from a direct charge mentioned here, I believe you can also listen to setup_intent.succeed from a direct charge
That would eliminate the need of your connected account calls your API
they hit our api to say "user consumed X amount of Y". uploaded 100mb of files, consumed 30 minutes of hosting time, whatever.
we figure out how much to charge the customer, based on their configuration
and create the charges
but, of course, the end-user customer has to put payment info somewhere somehow
that's what i'm working out
right
Sure, that LGTM
and then they get paid, we handle setting up the pricing page, make it all slick and easy, keep things organized so they don't shoot themselves in the foot, etc.
that's the pitch, anyway
is there any reason not to create a SetupIntent right away when creating a customer? It seems like we'll always need that
If you want to offer Subscription with trial, I think? Subscription with trail doesn't require Payment right away
right, but the SetupIntent just gives you the seti id to use in the stripe elements payment info creation flow
or rather, the client_secret value
Yeah that's the standard flow. More concretely for a trial Subscription you have 2 choices:
- You can create a Subscription and take its pending_setup_intent, passing over to client, after client confirmed it you will have a trial Subscription that will automatically charge when its trial ends, using the confirmed info
- You can also create a Subscription with trial and start it right away, temporary ignore collecting Payment info. Later on when the trial ends, you can bring back your customer online, display an element, and confirm it with the PaymentIntent just generated with the Invoice
Anw 1 is recommended and you are doing it right, so feel free to ignore2. ๐