#theglobe
1 messages ยท Page 1 of 1 (latest)
Hi, no worry
I am not familiar to WP and zapier, but all you need about Customer Portal is create a link
and redirect to that link
but it needs to pass the id for the user, no?
you need to present a website and redirect to the link, not the Id
but stripe does not provide a link
The link is the Portal Session link
For example
session = Stripe::BillingPortal::Session.create({
customer: '{{CUSTOMER_ID}}',
return_url: 'https://example.com/account',
})
redirect session.url
@wraith holly let's chat in here
Sure.
I am using WordPress, Active Campaign, and Stripe. Whenever we have an event customer.subscription.created, zapier sends an action to Active Campaign with the tags. Active Campaign then sends all the information to WordPress, and WP creates a user. So, for that part I am okay. I tested and it's working. The problem is, I need to have a button where the user would click and it would redirect the user to the Stripe customer portal so they can manage their subscription (cancel, downgrade, upgrade). I tried using the code Stripe give to us, but I am sure I am doing something wrong because it does not work.
what error are you getting?
and this is my code
thanks
give me a moment
So it seems like you're passing in email when creating the Portal Session but the API expects a customer ID
https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I will test now
Oh man, how can I thank you/pay? I've been working on this for so long, and I couldn't find a solution. It was so simple
Glad that worked ๐
For real, THANK YOU. If there's anything I can do to thank you, please let me know. I've sent 10 emails to Stripe support and chatted with them via the website, but I think I couldn't explain to them what was happening. You got it right! Have an amazing day!!