#gabrielvrl-customer-portal

1 messages · Page 1 of 1 (latest)

delicate cedarBOT
sleek fiber
#

Hi 👋

So you don't have any live mode customer portal settings?

crude peak
#

I mean, That wasn't even necessary when I launched

sleek fiber
#

Can you provide example request IDs for a successul portal session and one where you see this error?

crude peak
#

ok

#

i will try it

#

req_UXHNStU1r1Y9yh

#

this one is a error

#

that's weird, my teammate tested this endpoint /v1/billing_portal/sessions on production when we launched last month

#

but looking at the logs

#

there's no status 200

#

but what's more weird

#

i can do everything locally

#

what's that portal session that i need to create it?

sleek fiber
#

what's that portal session that i need to create it?

I'm sorry but I don't know what you are referring to here. Also when you are doing things "locally" are you in Test mode?

crude peak
#

yeah yeah, i'm in test mode

#

i'll try to explaning about the portal session

#

so, what i'm trying to understand is

sleek fiber
#

Right

crude peak
#

i didn't know that i had to create this portal billing

#

and do i need to do this on the code

sleek fiber
#

In Live Mode

crude peak
#

in live mode yeah

sleek fiber
#

Either in code or directly in the dashboard

crude peak
#

ok

#

so, if i do it on the dashboard

sleek fiber
crude peak
#

it will like, be specific for each custumer?

sleek fiber
#

No, but you could create configurations unique to each customer if you wanted

crude peak
#

ok

#

but let me show you something

#

const handleManageSubscription = async () => {
try {
if ($subscriptionId && $subscriptionId.length > 0) {
const currentEnvironment = window.location.href;

    const response = await stripe.billingPortal.sessions.create({
      customer: $customerId,
      return_url: `${currentEnvironment}`,
    });

    openManageSubscriptionModal.set(false);

    window.location.href = response.url || "";
  }
} catch (err) {
  // TODO: handle error
}

};

#

i'm creating the billing portal session

#

this is the method that handles it

#

but why does it say im not?

sleek fiber
#

There is not a configuration specified there

crude peak
#

you mean like that:

const configuration = await stripe.billingPortal.configurations.create({
business_profile: {
headline: 'Cactus Practice partners with Stripe for simplified billing.',
},
features: {
invoice_history: {
enabled: true,
},
},
});

sleek fiber
#

You wouldn't do it the same flow.

#

You would create a specific portal configuration that allows your customers to do the specific actions you want them to have access to

crude peak
#

ok, that makes sense now

sleek fiber
#

I recommend spending some time reviewing our docs and testing out different portal configurations before you implement any of this in Live mode

#

It can be a useful way to restrict what your customers change do/change but you want to make sure they can still do everything you need them to do

crude peak
#

you're right

#

let me ask one more thing

#

i activated this setting: Customer portal Active

#

and then i asked a coworker to test it

#

and it worked

sleek fiber
#

I don't know what that means

crude peak
#

is this equivalent?

#

ok, i will try to explaning it differente

#

settings -> Customer Portal

#

ok?

#

and this Customer portal was not active

#

i activated

sleek fiber
#

Okay

crude peak
#

is this equivalent of doing the billing portal configuration by code?

#

because my coworker was able to go to the right flow with this change

sleek fiber
#

Not exactly. That is the no-code version

#

You should read the docs I linked to above to understand how they are different

crude peak
#

ok

#

thanks

sleek fiber
#

Happy to help 🙂