Please ensure you include your name and invoice number.

<script src=""></script>

    <title>Buy cool new product</title>
    <script src=""></script>
    <button id="checkout-button">Checkout</button>

  <head><title>Thanks for your payment!</title></head>
    <h1>Thanks for your payment!</h1>
      We appreciate your business!
      If you have any questions, please email
      <a href="></a>.
Stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"

# This example sets up an endpoint using the Sinatra framework.
# Watch this video to get started:

require 'json'
require 'sinatra'

post '/create-checkout-session' do
  session = Stripe::Checkout::Session.create({
    payment_method_types: ['card'],
    line_items: [{
      price_data: {
        currency: 'eur',
        product_data: {
          name: 'T-shirt',
        unit_amount: 2000,
      quantity: 1,
    mode: 'payment',
    success_url: '',
    cancel_url: '',

  { id: }.to_json