#Irish-portal

1 messages · Page 1 of 1 (latest)

unreal island
#

Hi there!

#

FYI here on Discord we don't know much about Wordpress. But we can try to help with the Stripe part!

sweet pilot
#

Hello @unreal island 🙂

#

Ohh okay got it. So our website is built on Wordpress .. a website platform

#

How do you usually integrate the customer portal on sites? is it via button?

unreal island
#

You can learn more about the customer portal here: https://stripe.com/docs/billing/subscriptions/integrating-customer-portal
Basically:

  • first you configure the portal once (either with the API or the dashboard)
  • then, every time a user wants to access the portal, you need to call the API to generate a unique URL where they can manage their subscriptions. Then redirect the user to that URL.
sweet pilot
#

ohh sorry

#

I think I miscommunicated with the team

#

so the thing is the customers get a link to the customer portal on their emails

#

so that's the thing that I need to setup

#

can we point stripe invoicing in one product ?

unreal island
#

If you want a customer portal link, you need to follow my previous message.

#

can we point stripe invoicing in one product ?
what do you mean?

sweet pilot
unreal island
#

well I don't understand the question, sorry.

sweet pilot
#

Hello again

#

I am a bit confused on the customer portal thing

#

how can I add the link into the invoice email with the link you send above

#

is there a way where I can add the link to customer portal into the invoice email? @unreal island

stuck aurora
#

Hey there

#

@sweet pilot do you still need help?

sweet pilot
#

hello @stuck aurora yes

#

I am stuck on this one

"Next, add an endpoint that creates a portal session and redirects your customers. Make sure to authenticate customers on your site before creating sessions for them. To create a session, you need the customer’s ID and a return_url, which is required if a default return URL isn’t set in the Dashboard configuration."

#

we are using a Wordpress site and I am not sure if I will add the code into a php on the backend on this?

stuck aurora
#

Do you have Stripe API calls in your WP site currently?

sweet pilot
#

no we don't have that yet

#

we don't have membership thing on website so apparently we will just have a pricing page where the buttons there will lead to the stripe checkout

stuck aurora
#

Ah, so you're looking for a more no/low-code solution to allow customers to manage their subscriptions?

sweet pilot
#

yes if that will be easier and faster to setup..

#

my boss said to add the customer portal into the invoice email

#

but I contacted the support on the Stripe they said it was not possible

#

"No, I am afraid that including a link to the customer portal into the invoice email is not possible. You would need to build out your own emails if you wanted a link to where the customer portal was built in. Through the customer portal they could manage their invoices, but a link to the customer portal in the invoice link can't be added I am afraid."

stuck aurora
#

Ok, got it. You can configure a Customer Portal link via the Dashboard

#

No integration effort on your part

sweet pilot
#

yes I am following that link

#

but I am stuck on the 2) Implement a redirect on your site

stuck aurora
#

Ah, my bad. I'd linked to a beta

#

😬

#

You could add a link to your invoice/emails which invokes a PHP function create the session and redirect the user

sweet pilot
#

okay but where can I edit the email?

stuck aurora
#

You can't, you'd need to use your own emails

sweet pilot
#

you mean like an email marketing platform??

stuck aurora
#

Well, either that or by configuring/sending emails using our events/webhooks

#

We're working on a new feature to enable a no-code Customer Portal (which is what I linked to but you can't see)

#

I'd recommend speaking to support about that and perhaps they can get you early access: https://support.stripe.com/contact

sweet pilot
#

But I need to make this work today 😦

#

I will just proceed with this then

#

"Next, add an endpoint that creates a portal session and redirects your customers. Make sure to authenticate customers on your site before creating sessions for them. To create a session, you need the customer’s ID and a return_url, which is required if a default return URL isn’t set in the Dashboard configuration."

#

but I am stuck

#

I tried adding it into the site but the site got an error with the customer ID

stuck aurora
#

You need to have a PHP function somewhere that when invoked redirects to the Customer Portal session URL

sweet pilot
#

the one on the youtube is for rails so I can't understand how to apply it on php

stuck aurora
#

Yeah, because you need to pass a cus_xxx ID for the Stripe customer you want to use with the session

#

{{CUSTOMER_ID}} is just a placeholder

sweet pilot
#

so how do I call the customer ID

stuck aurora
#

Well generally you'd persist that against a user in your database/session

sweet pilot
#

so meaning I really need to connect the wordpress site into Stripe?

#

to call for the customerid?

stuck aurora
#

You need to retrieve the cus_xxx from somewhere, yes

#

The Customer Portal session is generated using the data from that Stripe customer

sweet pilot
#

is that the meaning for this part?
"Make sure to authenticate customers on your site before creating sessions for them."

stuck aurora
#

Yes, exactly

#

Closing this out. We'll be back tomorrow if you still need a hand!