I am providing an example of the latest Stripe payment code, integrated into Apps Script.
The shared Apps Script file is at:
The published Web App is at:
The Apps Script file uses the client side Stripe example code from GitHub, plus custom server side code to complete the payment.
The GitHub code is only client side HTML, CSS and JavaScript. The Stripe GitHub example does not include Apps Script server code.
There is GitHub examples of server side stripe code, but that code is not easily convertible to Apps Script.
My example is a complete system including the Apps Script server code to complete the Stripe charge.
Stripe client side code is in version 3. The server side API for stripe is technically still in version 1, but the API versions are controlled by a date, and not a number. Which API date version you are using is controlled through your Stripe dashboard.
The code includes 5 different payment form examples. You can see the original stripe code on GitHub code at:
The payment forms are not prebuilt charge forms, but use the stripe elements.
The example is for an "in-app" payment solution. The user is not directed to another site, like your web site for payment or payment confirmation.