Stripe API Call Driving me to drink

Hey all!

I’m back with more API issues (newbie!) I’m trying to set up a Stripe API without using the plugin as it won’t do what I need and I just keep getting errors. Here, both the key and the user ID are test info. Can anyone shed any light and save me for a life of drinking Gin and watching Love Island re-runs?


Please explain the errors that are occurring in more detail. When you attempt to create the portal, what happens?

1 Like

Try like this:

Just uncheck the Customer as Private box and you don’t need the header here because you have it at the top.

The endpoint url is: https://api.stripe.com/v1/billing_portal/sessions

This should work. :blush:

Your return will look like this:

{
  "body": {
    "id": "string value",
    "object": "string value",
    "configuration": "string value",
    "created": 1753630520,
    "customer": "string value",
    "flow": null,
    "livemode": false,
    "locale": null,
    "on_behalf_of": null,
    "return_url": "string value",
    "url": "string value"
  },
  "error": {
    "status_code": 200,
    "status_message": "string value",
    "body": "string value"
  },
  "returned_an_error": false
}
1 Like

His call is not wrong either, I say this because I make the same call in my projects, but he did not get the error that is actually coming up in the result.

2 Likes

Thank you so much guys! You’re absolute legends and my bottle of Gin lives to gather dust for another day! It works!

2 Likes

Just FYI. There is also a plugin already for this as well. Actually, a few of them if you search portal on the plugin store. Like this one: Stripe Customer Portal FREE Plugin | Bubble

Hey! Yeah, I know, but unfortunately it doesn’t do what I need it to do. Because nothing’s ever simple for me it seems haha!

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.