stripe / stripe-apps

Stripe Apps lets you embed custom user experiences directly in the Stripe Dashboard and orchestrate the Stripe API.
https://stripe.com/docs/stripe-apps
MIT License
148 stars 73 forks source link

Request to add shipping_rate_read and shipping_rate_write to list of allowed permission options #904

Closed bensontrent closed 1 year ago

bensontrent commented 1 year ago

I'm developing app to allow users to create shipping labels for USPS, UPS, FEDEX, DHL and others. I need a way to read shipping rates so I can offer users the ability to map a Shipping Rate to a default carrier and a service level.

The list of allowed Object Permissions doesn't allow reading or writing to the Shipping Rates API.

I can use these two commands in the CLI:

stripe apps grant permission "shipping_rate_read" "To map shipping rates to carriers and services"
stripe apps grant permission "shipping_rate_write" "To add metadata to shipping rates to set default carrier and shipping options"

But those permissions are not yet supported on the backend.

//stripe-app.json image image

I suppose it might be possible to circumvent this by asking the User to create a restricted Stripe API key and save it to the Secret Store, but I'd like to avoid that extra step.

Is it possible to allow these permissions?

chaves-stripe commented 1 year ago

@bensontrent we can add a new permission! To get a bit more context, does your use case require the write permission, and if so how will you use that? Or is it just reading? Thanks!

bensontrent commented 1 year ago

That's great! Thank you for you quick response. I need write permissions as well. In my app settings, I'll have an interface to allow the user set defaults for each shipping rate, so they wouldn't need to manually select the carrier and service level each time an invoice is created. It would be nice to open up the dashboard view options to shipping rates as well, but I can handle this in my settings view just fine. Thanks again!

image

I suppose I could save these values in my app's backend database, but I like the idea of the user having more transparency and control over these values.

chaves-stripe commented 1 year ago

hi @bensontrent! These permissions should be available for you now!