#Max4637 - Payments in Angular
1 messages · Page 1 of 1 (latest)
Gotcha so the issue is you are using the legacy version of checkout
The upgrade guide here should point you in the right direction: https://stripe.com/docs/payments/checkout/migration
What language are you using on the back-end for creating checkout sessions?
Sorry let me rephrase
What language is your back-end in? The new, recommended way of using Stripe Checkout is to create a checkout session server-side and redirect the customer to the link generated by that Checkout session
Cool. So, you can follow the guide I linked and select "Node" in each of the code snippets
Do you know of any example videos? I am not understanding if the checkoutButton is part of the server.JS class
Let me see if I can find something else for you. Checkout button would be on the front-end. You can customize that a bit more too since you're using Angular
Is the PK supposed to be in server.JS in the recent version?
This link has a sample integration and might be easier to see the bigger picture: https://stripe.com/docs/checkout/quickstart
You referring to your Stripe private API key?
That would be loaded in your server-side integration, but you shouldn't store that in the code. That should be stored more securely (ex: as an environment variable)
Main reason is you don't want to compromise it by checking the code into github, etc.
It could give away secret info I believe
And if it has been compromised, we recommend you roll the key: https://stripe.com/docs/keys#rolling-keys
The link you provided, is that non-legacy?
Yes. It's the current, recommended way
Also, here's a link to our docs for creating a checkout session: https://stripe.com/docs/api/checkout/sessions/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
This will give you all the options/parameters you can pass in
Thank you
No problem!