#tellmewhy - ad hoc subscription price
1 messages · Page 1 of 1 (latest)
okay i've tried the following flow: create customer (without payment method attached) -> create subscription with customer attached and custom price data -> create session with price id from subscription
i want to pass the session to the frontend to get a checkout page for the user to pay
but i run into the following error
so id like to know if my steps are off and help in the right direction
Do you have the request ID (req_123) from when you got that error?
req_cI0M8lCFM6c64w
Thank you
You will want to provide payment_behavior=default_incomplete, in your subscription creation call https://stripe.com/docs/billing/subscriptions/overview#default-incomplete
That allows you to create a subscription without immediately trying to make payment
okay i did do that as well
but then i ran into something else
one sec
okay so when i did have payment_behavior set and tried to create a session but then get this error
i pass the subscription price id to my session generator function but it seems like because it isn't active, i can't make a session to pay for it
Can you send me the request ID for that as well? It sounds like it is the last request + customer ID but it may still be helpful
No worries, thank you for the ID
That looks like it is from creating a Checkout Session with a specific price ID, from what I can see on my end it looks like that price was archived. If you look at it in your dashboard does it say that as well? https://dashboard.stripe.com/test/prices/price_1KRIg5GtZdNqZo6ZI7ajRYiB
yeah it is. i believe thats because ad-hoc prices are immediately archived it seems. thats what the docs says: https://stripe.com/docs/billing/manage-prices#ad-hoc-prices
but how am i supposed to use the ad-hoc price then? whats the best way to get it paid for?
Checkout also supports creating ad hoc prices with price_data
hmm i see~~ yeah i saw that but it just didnt hit me that i could just do that one session step. let me try that real quick. thanks