#yony

1 messages · Page 1 of 1 (latest)

tawdry hemlockBOT
blazing laurel
teal wedge
#

Ok checking

#

I couldn't find the request logs. still checking

blazing laurel
#

ok

teal wedge
#

req_qE22jm1cuEUgDS

#

The error logs say that the currency param is missing. but still show the same error when adding the currency param/field.

blazing laurel
#

According to your request, you are sending just quantity without priceId

#

You need to debug your integration and check if price_id is null

teal wedge
#

I double-check and the nodejs server is correctly receiving the price_id.

price_xxxxxxxxxxxx

blazing laurel
#

You need to double check, you are not sending that param for that request.

#

try log the whole object before sending it to Stripe APIs. something like:

const requestBody ={
      customer_email: customer_email,
      line_items: [
        {
          price: price_id,
          quantity: 1,
        },
      ],
      mode: 'payment',
      success_url: ${return_url}?success=true,
      cancel_url: ${return_url}?canceled=true,
    };
console.log(requestBody);

const session = await stripe.checkout.sessions.create(requestBody);

teal wedge
#

Ok thanks, checking this.

blazing laurel
#

and share please the related requestId

teal wedge
#

req_6pqdzY9iQdI5pn

blazing laurel
#

Search in your code where you are setting mode:subscription

#

that object log is for payment.

teal wedge
#

Ahh, ok. let me try again.

#

I tried again with mode:subscription but got similar error.

req_lEZRHORJ0oVZ7X

blazing laurel
#

What I meant is the log body you are sharing is different from the requestId. Please share both object log and the related requestId.

teal wedge
#

The second one is for both.

blazing laurel
#

You see price: undefined so that's the issue.

teal wedge
#

Ahh, I see. somehow the priceid is not being sent from the front end.
thank you very much @blazing laurel

blazing laurel
#

Welcome!