View Helpers

#Render Transaction Button Helper

You can quickly and easily place a Stripe Checkout button on any page by simply using the render_transaction_button view helper:
<%= render_transaction_button  # Note the slash here to allow continuing the line below
  price_cents: 9900,
  merchant_name: "John's Cat Carriers",
  product_description: "Deluxe Cat Carrier",
  product_name: "Deluxe Cat Carrier",
  product_sku: "DELUXE-CAT-CARRIER",
  brand_image: ""
The helper can be configured with the following options:
custom_button_classA custom CSS class to use on the Button
custom_button_text_classA custom CSS class to use on the text of the Button
custom_button_spinner_classCustomize the Processing button spinner CSS class
button_idCustomer the Button CSS ID
button_default_textThe default Button text
button_processing_textThe default Button processing state text
button_show_priceShow the price in the button
price_centsItem price in cents
currencyThe currency to use
price_currency_symbolThe currency symbol to use
brand_imageA URL to a brand image
merchant_nameA Merchant name to use
product_descriptionA short description of the product
localeThe locale to use
collect_zip_codeCollect zip code during checkout?
collect_billing_addressCollect billing address during checkout?
collect_shipping_addressCollect shipping address during checkout?
customer_emailCustomer email to prefill the form with
allow_remember_meAllow customer to check 'Remember Me'
panel_labelThe label to give the form
form_idA custom CSS ID for the Stripe form
product_skuA Product SKU for your own records
product_nameA name for the product
When the form is rendered, an additional encrypted charge verification token is included in the form to prevent tampering with the price during form submission.