#hsoftware-customer-portal
1 messages · Page 1 of 1 (latest)
Yes! When you create a portal session, Stripe returns the portal session object, which contains the session’s short-lived URL (https://stripe.com/docs/api/customer_portal/session?lang=curl#portal_session_object-url) that your customers use to access the customer portal.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So you just embed it wherever you want it
Thanks! I checked out the docs you shared, and I see the ability to configure it and generate the short-lived URL, but is there also a way to embed it (like an iframe, or angular component)?
or is the only way for the customer to access it via the short-lived url?
I'm pretty sure you could redirect using an i-frame, but the return_url field, which specifies where to send the user back to after they're done wouldn't be able to get the user back to the page that opened the i-frame (at least, not with the same state as before the i-frame was opened).
Does that make sense?
Ah. Using iframes inside a web app seems tricky. Is there a web component, or react/angular component for the Stripe Customer Portal?
Or is doing it the way I'm thinking possibly not a great idea (eg, for security or other purposes).
It's just not possible unfortunately due to the way it's configured. The Customer Portal being a Stripe-hosted webpage that doesn't have a react/angular-specific workflow
Okay. Could you tell me a little more about your thought process about that. Are you guys thinking "We don't want individuals to try to embed the customer portal because doing so is tricky and raises security or compliance issues" or "That's a feature we're considering building"?
I can't really speak on behalf of the product team. I only know what is/isn't possible.