#DC - Update Subscription
1 messages ยท Page 1 of 1 (latest)
Hello! I'll add more clarity
Like if you don't have the connect parameters at first when they sign up, can you add them later? This is specifically a workaround to Stripe Checkout Sessions via the customer portal. Cannot create a checkout session with connect parameters, so thinking the workaround is to add them later
Because Subscriptions are unique to a customer object, and customers are specific to accounts, I don't think you can achieve this via a Subscription update.
Have you tested creating a Checkout Session with the Stripe Account header?
No-- I have not heard of this
You can create many objects on the connected account in the API by passing the connected account header (if you are the platform).
Can you clarify what "Customers are specific to accounts" means? It might be that I am unfamiliar with Connect. I would be using Destination charges, so all the customers would be held by our platform, but payouts would go to connected accounts. I can envision a connected account needing to modify a customer subscription however, so this might be what you mean
I haven't tested that flow with Subscriptions, Checkout Sessions, and Destination Charges. If the subscription record exists on the Connected Account they should be able to modify it. However, I would test that scenario pretty thoroughly first.
This might be something to avoid this problem? By setting up the connected account during checkout https://stripe.com/docs/api/checkout/sessions/create?lang=node#create_checkout_session-setup_intent_data-on_behalf_of
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks for your help. FWIW I'm using the stripe-firebase extension, and looking to assign a connect account during checkout session. Currently it doesn't accept these Connect parameters
I understand the problem here now: https://github.com/stripe/stripe-firebase-extensions/pull/185
I added the vendor_reference_id and application_fee_percent as two optional fields. This hopefully satisfies the spec described here for direct charges with percentage fees: https://stripe.com/docs...
Hmmmm okay. Stripe doesn't officially support the firebase extension so I won't be able to provide too much guidance there. But let me get you some more info on the on_behalf_of parameter
Yeah I have to imagine there are plenty of developers who would really like those parameters exposed
Yeah there's some growing momentum for Connect functionality. Thorsten says in this that you wouldn't want to let a user set the connected account or the application fee during checkout session. This makes complete sense
I guess I'm back to watching when the subscription is created, and then updating it right away. But that's sloppy and might miss the first connected payment
and might not be possible as per the original question
on_behalf_of is really used to shift the "merchant of record" responsibility
https://stripe.com/docs/payments/connected-accounts
Gotcha, so that looks like a dead end.
I looked in the checkout session api but I don't see the parameter for a Stripe Account Header. Would you mind linking that to me?
We don't list all the headers because it would be repeating the same text over and over.
In this link I shared earlier: https://stripe.com/docs/api/connected_accounts
It shows how you can pass the Stripe Account header and this is true for most of our APIs
Ah so this header would work in a createCheckoutSession call? Would this have the effect of assigning the pending subscription to the connected account?
The subscription is created during the Checkout Session yes? In that case it would assign the subscription to that account. I would still test this to verify that a customer on the platform can make a subscription on the connected account.
Gotcha, yes that was my question
I'd also have to assign an application fee percent somehow though, or is this not possible?
Definitely will test everything
For that you'd want to look into the subscription_data parameter passed in during creation of the Checkout Session.
https://stripe.com/docs/api/checkout/sessions/create?lang=python#create_checkout_session-subscription_data
Perfect. Thanks!
And if you are using Checkout Session for one-off purchases, you'd do the same thing with the payment_intent_data parameter.
Excellent
This seems feasible. Stripe-Firebase may have a restriction currently but I can test this out
Okay, I hope that extension catches up. These features are pretty useful ๐