Stripe Payment Gateway

The Stripe Payment Gateway will allow your CartThrob site to accept payments through the Stripe Payments platform. Stripe allows for secure credit card processing using their robust REST APIs so no sensitive details ever touch your systems.

Note that the Stripe Payment Gateway has 2 options for integration with both allowing for different UI/X options and configurations. Be sure to review your requirements select which option fits your needs best.

Table of Contents

Payment Element

The Stripe Payment Element gateway allows customers to use a Credit Card, Google Pay, Apple Pay, and many other third party options, all configurable within your Stripe Dashboard.

Card Element

If all you need is a vanilla credit card input form then the Card Element may be all you need. Simple. Consistent. Easily configurable. No fuss, no muss.

Adding Meta Data to an Order

You can include data about on Order within your Stripe Dashboard by adding a hidden form field within your cartthrob:checkout_form tags for each meta data value you want to send.

See the Stripe API docs for complete details.

You'll need to make sure your form names are prefixed with meta: and then the key for your data point. For example, <input type="hidden" name="meta:my_key_name" value="Special data I want stored on Stripe" />

Stripe's requirements for metadata are:

  • Up to 20 keys
  • Key names up to 40 characters
  • Values up to 500 characters



    <div id="checkout_form_gateway_fields">

    <input type="hidden" name="meta:test_key" value="Some value goes here" />
    <input type="hidden" name="meta:test_key2" value="A different value goes here" />