#tyson
1 messages · Page 1 of 1 (latest)
Hi there
Have you taken a read through https://stripe.com/docs/billing/subscriptions/build-subscriptions yet?
I have so stricly speaking subscritpion is created on a checkout session mode subscription?
If you use Stripe Checkout then yep
ok sweet when i am passing the product id its telling me i need a reccuuring price but there is one: req_w55aA0xYeYAEAo?t=1689182015",
The Product ID should look like prod_xxxxx
Looks like you are passing a different string
I have custom ones
Ah
that reffances the product in my database as well
Gotcha. Yeah you are missing the recurring hash in price_data: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-recurring
like this it didint work, line_items[0][price_data-recurring]",
req_D4MyKRHje2yUSc?t=1689182295"
Thanks for your help on this stripe support is the best
got it !
line_items[0][price_data][recurring][interval]
wait i dont thats the invertal
hopping in here since bismarck has to head out soon
hi karbi, Not seeing the param in postman
Is it somthing like line_items[0][price_data.recurring][product]
line_items[0][price_data][product] is returing this error
"error": {
"code": "parameter_unknown",
"doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",
"message": "Received unknown parameter: line_items[0][price_data.recurring]",
"param": "line_items[0][price_data.recurring]",
Did you look at the APi reference that bismarck sent you? product is NOT nested within the recurring - it's something you'd set separately
So you'd want to set line_items[0][price_data][recurring] and line_items[0][price_data][product]
so i need to pass the price will that subscribe the user to that product?
You're passing in a bunch of parameters nested under price_data that will create a price for that checkout session'
cool i have it working, its saying 42424242 is wrong for fake card in test
Are you sure you're making your request in test mode?
Can you share the Checkout Session ID?
You have to enter the test values we provide - https://stripe.com/docs/payments/bacs-debit/accept-a-payment?platform=checkout#testing