#cornonthecob

1 messages · Page 1 of 1 (latest)

rain havenBOT
reef narwhal
quiet granite
#

yes the problem is that when i toggle this on it still doesnt work

#

the option to upgrade plan does not appear

#

ive also looked at the list of limitations as specified in the documentation and I dont think it applies to me

#

so im wondering if you could help in some way

reef narwhal
#

Can you share your account ID, so that I can take a closer look at how your customer portal configuration is set up? You can find your account ID by logging in to https://dashboard.stripe.com/settings/account. It'll be in the upper right hand corner and looks like acct_123

#

And also an example customer portal link?

quiet granite
#

hmm ive done it through code

#

shoudl i give you the code snippet

#

acct_1NUdiAGJK35igdoB

#

the products im using are :

  • oyster black card subscription
  • oyster white card subscription
#

i want them to be able to switch between the two of them

#

in stripe dashboard it looks fine so im not suer why its not showing up

reef narwhal
#

Can you share the customer portal link that the update option doesn't show? The configuration looks fine to me

quiet granite
#

this is the test user

#

but either way it should still show it right

#
   if (product_id == current_app.config["WHITE_CARD_SUBSCRIPTION"]):
        session = stripe.checkout.Session.create(
            customer=stripe_customer_id,
            line_items=[{
                'price': product_id,
                'quantity': 1,
            },
                {
                'price': current_app.config["WHITE_CARD_SIGN_UP_FEE"],
                'quantity': 1
            }],
            mode='subscription',
            success_url=f'{current_app.config["WEBSITE_URL"]}/user/stripe/success',
            cancel_url=f'{current_app.config["WEBSITE_URL"]}/user/stripe/cancel',
            consent_collection={"terms_of_service": "required"},
            custom_text={
                "terms_of_service_acceptance": {
                    "message": "I agree to the [Terms of Service](https://www.ostudy.org/termsOfService)"
                },
            },
            allow_promotion_codes=True,
            payment_method_collection="always",
        )

This is the code snippet

#

do i need to specify any other options

rain havenBOT
prisma comet
#

What's the cus_xxx ID you're passing?

quiet granite
#

its the user that gets created when they go to the checkout session

prisma comet
#

I know that, but what's the actual ID in the example where it's not working?

quiet granite
#

oh right let me check

prisma comet
quiet granite
#

cus_PUgajyAjTKvWZ7

#

this is the test user

#

the subscription is just a simple subscription

prisma comet
#

It's currently controlled by a schedule, and those aren't supported in portal today as per the link

#

That's why they can't update via portal (only cancel)

quiet granite
#

what is the schedule?

#

is my checkout session code to create the subscription wrong then?

#

i havent created any schedule at all

prisma comet
#

After the subscription was created via Checkout

quiet granite
#

okay sorry can you check this live user then

#

i dont think there should be a schedule for them

#

cus_PW4lurCb7J3yyU

#

okay maybe there is....why is it creating a subscription schedule?

#

how can i change my product to not do this

prisma comet
prisma comet
quiet granite
#

and i havent specified any subscription schedules anywhere

#

only a subscription

#

unless a schedule is created by default

prisma comet
prisma comet
quiet granite
prisma comet
#

Yep, likely something else preventing it. As per the docs, many limitations. Are you creating these portal sessions via the API? Or just using the no-code flow?

quiet granite
#

im using the stripe API

#
  portal_configuration = stripe.billing_portal.Configuration.create(
        features={
            "customer_update": {
                "allowed_updates": ["email", "phone"],
                "enabled": True
            },
            "invoice_history": {
                "enabled": True
            },
            "payment_method_update": {
                "enabled": True
            },
            "subscription_cancel": {
                "enabled": True,
                "mode": "at_period_end"
            }
        },
        business_profile={
            "headline": "manage your oyster subscription here"
        }
    )
prisma comet
#

Can you share the bps_xxx ID of the session from what screenshot?

quiet granite
#

would it be the configurations i need to change?

prisma comet
#

It uses bpc_1OmYMMGJK35igdoBxAWxfKF0 which is a configuration, and it doesn't have subscription_update enabled. So seems expected

quiet granite
#

ohhh silly me let me try this

prisma comet
#

It looks like you setup the portal configuration on the Dashboard to work as you need?

#

If that's right, then just omit the configuration parameter when you create your session and it'll use the default Dashboard configuration

quiet granite
#

oh really? Okay, ill try that since it sounds easier

prisma comet
#

The configuration parameter just allows you to override that where required

quiet granite
#

okay that seemed to work! thank you so much !

#

worked perfectly when i got rid of the config

prisma comet
#

Awesome!

quiet granite
#

thanks for the help:)