#Ferecium
1 messages ยท Page 1 of 1 (latest)
Hi ๐
How are you creating charges? Direct, Destination, Separate Charge & Transfer?
https://stripe.com/docs/connect/charges
Charges? I honestly don't know ๐
We create products and prices on behalf of sellers, then we use checkout session to make subscriptions for end users
Okay so the Checkout Session is how you are making charges. How do you create the Session?
From the link you sent, I think we are in the "indrect charge" flow
Can you share a request ID? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
That's an event ID but I can work backwards from there
Sorry and thank you
Okay so here's the request were you create the session: https://dashboard.stripe.com/test/logs/req_rlcuKEftuKA1xs
And you are collecting your fee using the application_fee_percent
So what you would need to do is calculate the increase in that percent that would cover the Stripe fees
Ok, it has to be included in the application_fee? No params somewhere to automatically calculate that? Or just set somewhere that we want the connect account to assume Stripe fees?
Nope, we don't have a feature that does that
And because you are creating subscriptions we need to use a % and not a set fee amount.
alright, thank you a lot for the help ๐
While you're here, can I ask another question? About the way to manage subscription
For a product, we automatically create 3 price_id, one monthly, one yearly and one "premium" that is also charge yearly.
I'm looking for a solution to let end user upgrade or downgrade their subscription. So changing the price they subscribed initially.
I saw the customer portal, but it doesn't seems to exactly fit the need.
I would like to show that customer portal only for one product subscription, not all of the customer subscription. And, I would like to let them change from annually to premium with prorata. It seems that the customer portal won't let me place 2 price with same periodicity.
Any suggestion as to how let them manage one subscription for a given product, letting them change price as they want with prorata calculation?
You can specify the products and prices allowed to be updated when you create a Customer Portal configuration: https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-products
Yes I tried that! But even though I passed a product id and some price id, all of the customer subscriptions was showed. Is there a way to set up the portal to only show the customer subscription for a given product?
And I tried to pass my three price_id, but I was given an error because two of them have the same periodicity (annual and premium are charged annually)
That is the method to restrict the products/prices. Can you share your Portal Configuration
I tried that yesterday but deleted my code since, i'll try to get that back
configuration = stripe.billing_portal.Configuration.create(
business_profile={
"headline": "plop",
},
features={
"subscription_cancel": {"enabled": True},
"payment_method_update": {"enabled": True},
"subscription_update": {
"enabled": True,
"default_allowed_updates": ["price"],
"products": [{"product": publication.stripe_product_id, "prices": [offer.stripe_price_id_monthly, offer.stripe_price_id_yearly]}]
}
},
)```
I tried something like that
I don't need your code. I need the API request
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
This will tell me much more about what you provided and the configuration object that was created
No problem, hi ๐
Yep so the API request you just provided does not include: subscription_update": { "enabled": True, }
So I'd try again and include that
You should be able to then see the ability to update between Prices
Right, I didn't give you the right one, i made several attempts
So you are saying you did have Sub update enabled but didn't see the ability to update the Sub in the portal?
the right one req_Qde0h39J7KLdK6
Okay that looks fine. Do you have the Customer/Sub that you used that config for?
There are some limitations that we list out here: https://stripe.com/docs/customer-management#customer-portal-features
Not exactly, I'm looking for two things:
- be able to open that customer portal filtered on only one product. to show the customer subscription only for this product
- let the customer update his price even if the periodicity is the same, like from annually to "premium" that is also charged annually
Yep both of those things should be possible
Provided that you don't hit the limitations in the doc I linked
๐ฎ nice !
So yeah, recommend testing it out, and if you don't see that behavior then let me know and I'm happy to look/help!
req_29uQMpTwStVmrP the session that used the portal configuration
I remember when open up that portal, all of my subscriptions, even those for other products where shown
that's my first issue
Hmm can you do another test right now and provide me a screenshot of your portal
of corse
it's a bit longer than I expected, I have to recompile my local application
No worries
meanwhile my application's building, is that a bad practice to create a new portal configuration each time I want to create a session ?
Mostly depends
It is fine if you need a different one due to different Customers
Mostly it will just add a slight bit of latency
Well, my app isn't working anymore, it won't be for today.
Thanks anyway for your help.
Once I get it up and running, should I just write on this thread again or post a new message to #dev-help ?
I'll archive this thread to keep the channel organized so just pop back into #dev-help !
Alright will do. Have a nice day