#akintola_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1243519133874917516
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! what's the customer ID cus_xxx where this happens?
Hi @proven oracle . I got it from stripe and saved it in our database
sorry, I meant, can you post it here so I can have a look?
I thought this is not allowed
IDs of objects are fine to share
I just need an example of one where you have this problem(the 'switch feature' not showing up) so I can have a look into why that might be happening.
@proven oracle I don't know how to tell you but we're also not allowed as dev to disclose such data please
Is there any way for you to help?
ok, no worries. You can open a support ticket at https://support.stripe.com/?contact=true and share the details there in authenticated support ticket if that works better!
I can't help without the ID no. All I can tell you is it's likely to be one of the reasons from https://docs.stripe.com/customer-management#customer-portal-limitations , or it's an issue with how you've configured the settings for the portal and which(if any) Prices you marked as being eligible, but I can't say for sure without looking at your actual example/account.
@proven oracle I successfully got a customer example for you: cus_PMDHeFXu9TPjGx
this customer does not have any active Subscriptions so it's expected there's nothing for them to manage or switch in the portal
to be clear, you created a new Customer that has a subscription now, right? https://dashboard.stripe.com/test/customers/cus_QAGgsRUP4e3VoA
you didn't touch that existing one.
so if you now create + visit a BillingPortal session for that new Customer, what do you see/are there any problems?
Thanks @proven oracle
I can see it now
It means that for subscription I was creating a new customer every time
yes, since you are using CheckoutSessions and not passing an existing customer
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer
I'm using stripe-pricing-table
What's parameter should I use to pass the customer id
Please?
ah right. Well then you'd want to look into https://docs.stripe.com/payments/checkout/pricing-table#customer-session , there's a bit more bespoke code needed if you want to use PricingTable with existing customers
@proven oracle Thanks but it looks like the StripeClient do not have customerSessions propery
`Undefined property: Stripe\Service\CoreServiceFactory::$customerSessions
`
I tried this: $stripe->customerSessions->create
@modest mortar Any thoughts?
Hey! Taking over for my colleague. Let me catch up.
Alright
How are you initializing your Stripe Client? Can you follow this quickstart:
https://docs.stripe.com/checkout/quickstart
new \Stripe\StripeClient(config('stripe.secret'))
Other api interafaces are working
Like customers or checkout
Yes
I'm using composer
Version of the client: 9
Ah you are using a very old SDK
I invite you to migrate to a newer/latest version of the SDK.