#smartgo

1 messages ยท Page 1 of 1 (latest)

vague cometBOT
vernal osprey
#

Hello ๐Ÿ‘‹
Taking a look, as per my understanding CLI closely follows CURL conventions when it comes to the syntax

honest robin
#

Thanks for the pointer, will look into that.

vernal osprey
#

Yeah not finding any specific examples so far unfortunately.

honest robin
#

I keep getting the following error from Stripe: unknown flag: --default_price_data

vernal osprey
#

can you try -d "default_price_data[currency]"

honest robin
#

No, getting Invalid data argument: default_price_data[currency]

vernal osprey
#

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

honest robin
#

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?

vernal osprey
#

I'm on 1.13.9 too

honest robin
#

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.

vernal osprey
#

NP! ๐Ÿ™‚ Happy to help

honest robin
#

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?

vernal osprey
#

Ah hmm, not sure if Stripe CLI is supposed to work with live mode

#

try passing in a --live flag

honest robin
#

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."

vernal osprey
#

you may need to give your restricted key permissions to Create Products API endpoint

honest robin
#

got the restricted key - how do I pass it to the CLI?

vernal osprey
#

the CLI should already have created a restricted key
Once you edit the permissions, you should be good to go

honest robin
#

Excellent! That worked. Thanks for teaching me today!

vernal osprey
#

NP! ๐Ÿ™‚ Happy to help