#smartgo
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Taking a look, as per my understanding CLI closely follows CURL conventions when it comes to the syntax
Thanks for the pointer, will look into that.
Yeah not finding any specific examples so far unfortunately.
I keep getting the following error from Stripe: unknown flag: --default_price_data
can you try -d "default_price_data[currency]"
No, getting Invalid data argument: default_price_data[currency]
ah hmm.. let me check..
stripe products create -d "default_price_data[currency]"=usd --id="mySKU" --name="product name" this works for me partially
you may need to add the amount for the price
The CLI claims I'm on stripe version 1.13.9. Is that the latest version? The dashboard says there's an upgrade available (I'm on 2019-02-19) โ does that also impact what I'm getting in the CLI?
I'm on 1.13.9 too
Success! You're right, also had to add -d "default_price_data[unit_amount]"=599
Thanks so much for finding the right incantation there โ will make it a lot easier adding 150 products.
NP! ๐ Happy to help
One more question: it created it in test mode. Is there a way to create it directly in live mode, or do I have to copy it from test mode to live mode later?
Ah hmm, not sure if Stripe CLI is supposed to work with live mode
try passing in a --live flag
That seems to do the right thing: gives me an error that the rk_live_ key doesn't have the right permissions, and that "Having the 'rak_product_write' permission would allow this request to continue."
you may need to give your restricted key permissions to Create Products API endpoint
You can edit the restricted key here
https://dashboard.stripe.com/apikeys
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
got the restricted key - how do I pass it to the CLI?
the CLI should already have created a restricted key
Once you edit the permissions, you should be good to go
Excellent! That worked. Thanks for teaching me today!
NP! ๐ Happy to help