#devparry-subscription-plans
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Give me a moment to take a look
Hello, have you seen this guide? It should be able to help you see how to create prices via the API and use them https://stripe.com/docs/billing/subscriptions/build-subscriptions
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
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..
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", ] ]);
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
So what I have to create first a product or price ? as per the modern stripe api
Create the product first and then the price
okay, and how i can assign 2nd price to the same product? which API i have to use for that ?
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
okay get me to create a simple demo for this and if required i'll ask you again ๐