#NFTBOI-sub-trial-payment
1 messages · Page 1 of 1 (latest)
Hey there. What are you expecting to charge for immediately if there's an initial free trial?
trial is for upgraded package but i wanna charge for selected package
im giving free trial for upgraded package but i wanna charge for the current package as well
Sounds like you'll want 2 separate line items when creating the subscription then. Do you have an example API request you've tried?
$sub_result = $stripe->subscriptions->create([
'customer' => strval($customer),
'items' => [['price' => strval($price_id)]],
'billing_cycle_anchor' => 'now',
'trial_period_days' => 15,
]);
How is your pricing/plans modelled in Stripe?
here's a simplified version for u to understand
{
"PlayBookAI": [
{
"type": "year",
"price": 249
},
{
"type": "month",
"price": 299
}
],
"PlayBook+": [
{
"type": "year",
"price": 149
},
{
"type": "month",
"price": 199
}
],
"PlayBook": [
{
"type": "free",
"price": 0
}
]
}
And are they created as Product/Prices in Stripe?
You can't achieve what you want with a single item (like the API request you shared). You're going to need to pass in multiple