Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prod and Test mode are not ISO and shitty doc #23

Open
jeremy-hyde opened this issue Feb 5, 2025 · 0 comments
Open

Prod and Test mode are not ISO and shitty doc #23

jeremy-hyde opened this issue Feb 5, 2025 · 0 comments

Comments

@jeremy-hyde
Copy link

This bit me, thinking the same permissions are needed for prod and test mode.

Excerpt from doc for the customer portal:

Previewing the portal as a read-only version is only available when your Dashboard is in test mode. 
If you’re unable to preview and test the portal, check your settings to make sure that your configuration is saved in test mode. 
For previewing and testing to work, you also need to have edit permissions in the Dashboard.

Ref

The error returned without the right permissions is:

stripe.error.PermissionError: Request req_*************: The provided key 'rk_live_*********************************************************************************************' does not have the required permissions for this endpoint on account 'acct_1MifSkHDCN1pZZvY'. 
Having the 'rak_customer_portal_write' permission would allow this request to continue.

Searching rak_customer_portal_write anywhere on Stripe return 0 results because it is written customer_portal_write in the doc.

So I finally found the Permission Reference page to try to make things right and for whatever reason it is in the Apps part of the doc, the part that explain how to create an app for Stripe Marketplace.

And found this:

If your app performs an action it lacks permissions for, Stripe might raise an invalid request error.

Ref

But that's not true it raise a permission error probably because it is only true for an App ?

I finally found that the customer portal needs: customer_portal_read and customer_portal_write but also there is a mention of elements_write

If you’re using the customer portal to manage subscriptions or payment methods, you must also request elements_write.

Ref

But Elements is not an API permission but a JS permission (specific to an App ?)

At this point I gave up, I have 12 tab open on the stripe doc.
I think I will give ALL the permissions to my backend.
Can someone show me an alternative to Stripe, pls ?

I hate Stripe SO much...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant