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.