hub.eb?material_id=768
Payment

Stripe

Accept payments using Stripe.

Overview

The Stripe Data Connector integrates with Stripe payment services to accept payments and manage customers, products and pricing.

Once installed and added to a Form, you can access this Data Connector in the Form's server event scripts using: connectors.verjio.stripe.

  • stripe.checkout.create creates a payment session using Stripe Checkout. Each payment session is unique to a customer and will include the invoice items you specify. Successful and failed payments trigger a webhook.
  • stripe.subscription charges customers on a recurring basis. 
  • stripe.subscriptionSchedule controls when a subscription is billed and renews.
  • stripe.customer manages customers. Create, update, list and delete customers. Query customer details, including purchase history.
  • stripe.product manages products. Create, update, list and delete products. A product can be as simple as a name but can include images, descriptions and more.
  • stripe.price manages product prices. Create, update, list and delete product prices. A product can have multiple prices, for example, you might want to have an discounted price for a product when it is bought in combination with another product.
  • stripe.account manages accounts. Create, update, list and delete accounts. Accounts are only used when integrating with Stripe Connect.

Code Example:

// Create a new customer
var customer = connectors.verjio.stripe.customer.create({
  name: 'Luke Mitchell',
  email: 'luke@example.com'
});

// Create a new product with a name and a description
var product = connectors.verjio.stripe.product.create('Neil Armstrong Plush Toy', {
  description: 'A cuddly, miniature version of the first man to walk on the moon.',
  unit_label: 'toy'
});

// Define a price for the product, $14.99
var price = connectors.verjio.stripe.price.create(product.id, {
  unit_amount_decimal: 1499,
  currency: 'USD'
});

// Array of invoice items for checkout
// In this case, 3 of the plush toy product that we created above
var items = [
  connectors.verjio.stripe.helpers.makePriceLineItem(price.id, 3)
];

// Create a checkout session for the customer using the line items
var checkoutSession = connectors.verjio.stripe.checkout.create(
  customer.id,
  'Your purchase from the Lunar Emporium',
  'https://lunar.verj.cloud/api/checkout/success',
  'https://lunar.verj.cloud/api/checkout/cancel',
  items
);

// Redirect the user to the Stripe Checkout page
form.gotoUrl(checkoutSession.url, null);

For comprehensive information on how to use and develop applications with this Data Connector please refer to the Support section.

The Installation section has instructions on installing it into your Workspace.

Complete JavaScript API documentation for this Data Connector can be found in the Documentation section.

Documentation

Installation

Install this Data Connector into your Workspace in the Verj.io Studio:

  1. Right-click on the location in the Entity Tree you want the Data Connector to be added.
  2. Select New >  Data Connector from the context menu.
  3. In the resulting dialog, select this Data Connector from the list of available Data Connectors.
  4. Click OK to download it into your Workspace.

Once the Data Connector is installed into your Workspace, it can be added to any number of Forms:

  1. Open the Form by double-clicking it in the Entity Tree.
  2. Drag the downloaded Data Connector from the Entity Tree into the Form's  Data Connectors View.

Before this Data Connector can connect to Stripe at runtime, it must be configured with your Stripe Account Id and API  Key.

For comprehensive information on how to customise, use, and configure Data Connectors, please refer to the Support section.

Support

Stripe Support

Data Connector Support

Stripe Support

Compatible Verj.io Versions

FromV5.13

Support

Supported by Ebase.