#Ferecium

1 messages ยท Page 1 of 1 (latest)

mellow cargoBOT
fair night
left pebble
#

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

fair night
#

Okay so the Checkout Session is how you are making charges. How do you create the Session?

left pebble
#

From the link you sent, I think we are in the "indrect charge" flow

fair night
left pebble
#

a test one is enough ?

#

something like that evt_3MD3FaLKxg8qIwF31gMXLDeY ?

fair night
#

That's an event ID but I can work backwards from there

left pebble
#

Sorry and thank you

fair night
#

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

left pebble
#

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?

fair night
#

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.

left pebble
#

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?

fair night
left pebble
#

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)

fair night
#

That is the method to restrict the products/prices. Can you share your Portal Configuration

left pebble
#

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

fair night
#

I don't need your code. I need the API request

#

This will tell me much more about what you provided and the configuration object that was created

left pebble
#

I'll try to find it

#

req_hMxa0j2aZ8O9KR

languid zinc
#

๐Ÿ‘‹

#

Stepping in as Snufkin had to step away

#

Catching up

left pebble
#

No problem, hi ๐Ÿ‘‹

languid zinc
#

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

left pebble
#

Right, I didn't give you the right one, i made several attempts

languid zinc
#

So you are saying you did have Sub update enabled but didn't see the ability to update the Sub in the portal?

left pebble
#

the right one req_Qde0h39J7KLdK6

languid zinc
#

Okay that looks fine. Do you have the Customer/Sub that you used that config for?

left pebble
#

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
languid zinc
#

Yep both of those things should be possible

#

Provided that you don't hit the limitations in the doc I linked

left pebble
#

๐Ÿ˜ฎ nice !

languid zinc
#

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!

left pebble
#

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

languid zinc
#

Hmm can you do another test right now and provide me a screenshot of your portal

left pebble
#

of corse

#

it's a bit longer than I expected, I have to recompile my local application

languid zinc
#

No worries

left pebble
#

meanwhile my application's building, is that a bad practice to create a new portal configuration each time I want to create a session ?

languid zinc
#

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

left pebble
#

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 ?

languid zinc
#

I'll archive this thread to keep the channel organized so just pop back into #dev-help !

left pebble
#

Alright will do. Have a nice day