Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to grant rak_plan_read in stripe dashboard. Having the 'rak_plan_read' permission would allow this request to continue

I am creating a subscription payment checkout session using this code:

    const prices = await stripe.prices.list({
        lookup_keys: [body.lookupKey],
        expand: ['data.product'],
    });
    const session = await stripe.checkout.sessions.create({
        billing_address_collection: 'auto',
        customer: body.customerId,
        line_items: [
            {
                price: prices.data[0].id,
                quantity: 1,
            },
        ],
        mode: 'subscription',
        success_url: body.successUrl,
        cancel_url: body.cancelUrl,
    });

I get this error message:

Error: The provided key 'rk_test_***' does not have the required permissions for this endpoint on account 'acct_xxxxxxx'. Having the 'rak_plan_read' permission would allow this request to continue.

I can't see how to grant the "plan_read" permission to my restricted key from the stripe dashboard. The docs suggest "plans" have been superseded by prices. How do I grant this permission?

Edit #1: My restricted key has these permissions configured in the dashboard:

Customers - Write
PaymentIntents - Write
Products - Read
Checkout Sessions - Write
like image 356
Mike Hogan Avatar asked Oct 24 '25 17:10

Mike Hogan


1 Answers

Yep, Plans are generally deprecated in favour of Price objects. In this instance, you should configure your restricted API key to have read/write permissions on the Prices resource which is listed in the creation UI.

like image 148
Jonathan Steele Avatar answered Oct 28 '25 04:10

Jonathan Steele



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!