#lucascheles
1 messages · Page 1 of 1 (latest)
Hello 👋
You can't create a subscription with a one-time payment price. What exactly are you trying to do? More context would help
I'm trying to execute the below stripe cli command:
stripe checkout sessions create
--success-url="https://example.com/success"
--cancel-url="https://example.com/cancel"
--customer="cus_NGRhbJagdl4JZx"
-d "line_items[0][price]"=price_1KcAP1JS2eq6Ic9KfvJRnIYV
-d "line_items[0][quantity]"=1
--mode=subscription
When I execute it I receive the below response:
{
"error": {
"message": "You must provide at least one recurring price in subscription mode when using prices.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_UA8URHzcnHEXzv?t=1678285403",
"type": "invalid_request_error"
}
}
price_1KcAP1JS2eq6Ic9KfvJRnIYV isn't a recurring price. So you can't use it with subscription mode.
You need to create a recurring price
Since when this is not possible?
I'm asking because seems to me that a few months ago this behavior was allowed.
that has always been the default behavior.
Why are you trying to create a subscription for one-time price though?
What's your usecase?
My application works with subscriptions only.
I would like to provide my customers with the possibility of a one time payment plan.
I will need to investigate how I can properly add this feature to my application.
Is this one-time payment plan on top of a recurring price? If so, you typically create a cross-sell for it
https://stripe.com/docs/payments/checkout/cross-sells