#Salamander

1 messages · Page 1 of 1 (latest)

simple sierraBOT
worldly crest
#

Hi there 👋 I want to point out that the function you're trying to use is deprecated, and the lineItems in there does not support the price_data parameter:
https://stripe.com/docs/js/deprecated/redirect_to_checkout

We also strongly recommend that you create the objects necessary for processing a payment (Checkout Session, Payment Intent, etc) from your server as a savvy user could adjust the javascript on your site and impact your integration.

This guide walks through our currently recommended path for using Checkout Sessions, and I recommend using it as a starting point:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout

A key thing that I want to point out, is that we two different javascript libraries. Stripe.js is our client-side JS library:
https://stripe.com/docs/js
While our server-side JS library, intended for use with Node, uses the functions listed in our API spec:
https://stripe.com/docs/api?lang=node
https://github.com/stripe/stripe-node