Buy Button
Two buy buttons, one for a one-time payment and another for a subscription
A collection of Stripe integrations for reference, testing, and learning.
Unless otherwise specified, everything here uses a US Stripe account in test mode which has all payment methods enabled.
These integrations are designed to be minimal, always-working implementations of various Stripe products and features. These will rarely be changed. You can use these as a point of reference to test basic functionality.
Two buy buttons, one for a one-time payment and another for a subscription
A single Card Element that will make a test payment when used
A single set of split Card Elements (number, expiration, CVC, and postal code) which will make a test payment when used
A link that, when visited, will create a new Checkout Session and redirect the user to its URL
A page with a single embedded Checkout Session
A single legacy Checkout button
A single CVC element that will create a CVC Token
A minimal (but heavily-commented!) example of how I would combine the Express Checkout Element, two Address Elements, and the Payment Element to build an ideal payment form
Two Express Checkout Elements (US & GB) showing multiple wallet options that will make a test payment when used
A button that will create a Customer, create a Financial Connection Sessions for that Customer, and start the flow to connect a Financial Account
A Link Authentication Element alongside a Payment Element and Address Element which can be used to complete a test payment
A single Payment Element that will complete a test payment when used
A Payment Element with an Address Element that will complete a test payment when used
A single Payment Element which uses the deferred flow to complete a test payment
A Payment Element which uses a Customer Session to display saved Payment Methods
A Payment Element which uses a Customer Session and Setup Intent to save a Payment Method for future use
Two Payment Links; one for a one-time payment and another which will start a subscription
A single Payment Method Messaging Element which displays payment options and, when interacted with, a modal with more information
A single Payment Request Button that will create a Payment Method when used
A single Payment Request Button that will create a Token when used
A single Pricing Table showing two Prices for a single Product
These integrations are more dynamic than the reference integrations above, and are subject to change at any time. I try to keep them in a functional state, but encountering an error or broken integration in this section is to be expected.
An older, legacy Apple Pay integration
Test low-level Apple Pay functionality without Stripe libraries or code
A more robust integration of the Card Element, with more options and features than the reference integration
Legacy client-only Checkout integration
Legacy client/server stripe.redirectToCheckout integration
Legacy client/server stripe.redirectToCheckout integration for random testing
A robust Express Checkout Element integration using several different features
Several Buy Buttons on a single page
A Payment Element with our documented CSP directives
A single Payment Element which only shows Amazon Pay
A single Payment Element which uses the deferred flow, calls elements.update in the pay button click handler, and handles the update-end event to proceed with the payment process
External payment methods with the Payment Element
The Payment Request Button inside different iframe elements
The Payment Request Button with Link disabled (useful for testing Apple Pay and Google Pay)
The Payment Request Button with all wallets disabled (useful for testing Link)
A robust integration of the Payment Request Button using several different features
Some other miscellaneous things you might find useful.
A handy URL (https://4242.io/webhook-tester/
) you can use to debug webhooks. This URL returns detailed information about the incoming request. Visit the link to see it in action and learn more about how it works.