I am trying to show the price of the invoice before creating the subscription.
Is this possible?
This is the call to create the subscription:
stripe.subscriptions.create({
customer: 'cus_4fdAW5ftNQow1a',
items: [
{
plan: 'plan_CBXbz9i7AIOTzr',
},
],
expand: ['latest_invoice.payment_intent'],
}, function(err, subscription) {
// asynchronously called
}
);
There is a section on previewing proration:
https://stripe.com/docs/billing/subscriptions/prorations#previewing-proration
However it requires a subscription to exist.
I can't find a way to see the cost at the time of subscription creation.