#oleg.moseiko

1 messages · Page 1 of 1 (latest)

woven lodgeBOT
royal kiln
random star
#

omit what?

#

$stripe->prices->create([
'unit_amount' => 500000,
'currency' => 'usd',
'recurring' => ['interval' => 'year'], <<<<<????
'product' => 'prod_NWdgCC8ysbMeXf',
]);

#

actually i need Free Plan

royal kiln
random star
#

so i did
$freeProduct = \Stripe\Product::create([
'name' => 'Free Plan',
'metadata' => [
'alias' => 'free_product',
],
]);

       $freeProductPrice = \Stripe\Price::create([
            'unit_amount' => 0,
            'currency'    => 'usd',
            'product'     => $freeProduct->id,
            'nickname'    => 'free_product_price',
            'metadata'    => [
                'alias' => 'free_product_price',
            ],
        ]);
random star
#

{
"error": {
"message": "Only active, per unit licensed prices are supported. The following price(s) are invalid: price_1MlqaIFZ7k4UhKB3OyKX1lDn.",
"param": "features[subscription_update][products]",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_LYGjycRnIfvkYV?t=1678872334",
"type": "invalid_request_error"
}
}

royal kiln
random star
#

{
"error": {
"message": "Only active, per unit licensed prices are supported. The following price(s) are invalid: price_1MlqlCFZ7k4UhKB3MFvkqIGT.",
"param": "features[subscription_update][products]",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_kaqgvBkbBX6wR5?t=1678873013",
"type": "invalid_request_error"
}
}

royal kiln