#devparry-subscription-plans

1 messages ยท Page 1 of 1 (latest)

chilly egretBOT
silent coyote
#

Hello ๐Ÿ‘‹
Give me a moment to take a look

tight sail
#

FYI, unless your integration is already built and using plans, you should use the Prices API. We still support the Plans API but the Prices API is the most modern

hexed crag
#

under this page they create products with dashboard and with CLI but not with the APIs

#

could you please guide me through the steps by step as per the modern stripe api..

tight sail
hexed crag
#

As I remember in the older one we just directly create a plan along with the product

previous code :

$plan = Plan::create([ "amount" => 2000, "interval" => "month", "product" => [ "name" => 'Test Product', "metadata" => $NewArray "currency" => "GBP", ] ]);

tight sail
#

Not sure why we only show the CLI in that doc. The API reference shows how to use the prices API though

#

That isn't possible anymore, that would be two API calls now, but you should only have to make them when getting set up

hexed crag
#

So what I have to create first a product or price ? as per the modern stripe api

tight sail
#

Create the product first and then the price

hexed crag
#

okay, and how i can assign 2nd price to the same product? which API i have to use for that ?

tight sail
#

You can make another API call to create a price and pass in the same product ID. That will create a second price on that product

hexed crag
#

okay get me to create a simple demo for this and if required i'll ask you again ๐Ÿ™‚