Stripe
OpenMeter Apps is currently in Beta.
The Stripe app integrates OpenMeter with Stripe to provide additional features and seamlessly integrate with existing workflows. For example, the Stripe app can be configured to synchronize invoices to Stripe, calculate tax, and collect payments automatically.
Get Started
To get started with the Stripe app, follow these steps:
- Go to Stripe App in the OpenMeter dashboard.
- Click on the
Install
button. - Follow the authorization steps to connect the app with OpenMeter.
- Optionally configure the billing profile to use the Stripe app.
What does the Stripe app do?
The Stripe app integrates OpenMeter with the following Stripe products:
- Stripe Tax: Calculate taxes automatically via Stripe based on location, product, or other criteria.
- Stripe Invoicing: Sync and deliver invoices via Stripe and collect payments.
- Stripe Payments: Collect payments via Stripe payment gateway using multiple payment methods.
Stripe Tax
Leverage Stripe Tax to handle complex tax rules and rates for any region. The integration ensures accurate, up-to-date tax calculations for each invoice, removing the guesswork and reducing compliance risks.
Stripe calculates tax based on:
- Vendor location
- Customer location
- Product tax code (global default or per rate card)
To define tax codes for rate cards, you can set default tax codes in Billing Settings. You can also specify tax codes per rate card by editing the product catalog when creating a plan.
Stripe Invoicing
Stripe Invoicing is a global invoicing software platform built to save you time and get you paid faster. OpenMeter can synchronize invoices to Stripe Invoicing continuesly to automatically collect payments. Stripe Invoicing makes it easy to automate accounts receivable, collect payments, and reconcile transactions.
Stripe Payments
Collect payments quickly and securely via Stripe's trusted payment gateway. Your customers can choose from various payment methods—credit card, ACH, and more—to improve the overall customer experience and speed up cash flow.
In OpenMeter you can configure the default payment method and currency to use for payments per customer and billing profile.
Payment Collection Method
You can configure the payment collection method in the Billing Profile. OpenMeter supports two payment collection methods with Stripe:
- Charge Automatically: (default) OpenMeter will tell Stripe to collect charges with the default payment method for the customer. Great for self service use-cases.
- Send Invoice: OpenMeter will tell Stripe to email the invoice to the customer with the payment instructions. Great for enterprise clients.
To be able to collect charges automatically, you need to have a default payment method set the customer.
When you add a payment method to a customer in OpenMeter, that method becomes the default. However, if you leave the payment method field in OpenMeter blank, OpenMeter will fall back to the default payment method set in Stripe (if any).
To send an invoice, you need to have an email address set for the Stripe Customer.
Unfortunately, Stripe does not provide an API to set the email address for invoices. So you need to make sure to set the email address for the Stripe Customer via the Stripe Dashboard. The email address on the OpenMeter Customer will be ignored with Stripe Invoicing.
When a paid subscription is created, OpenMeter will enforce that a customer linked with Stripe has either a default payment method or an email address depending on the collection method settings.
If you have both self-service and enterprise clients, you can create a separate billing profile for each group and configure the payment collection method appropriately. Then you can set the self-service billing profile the default and link enterprise customers to the enterprise billing profile. This way your self service clients will be charged automatically and your enterprise clients will receive an email invoice.
Integrating With Stripe
In OpenMeter there are two ways to onboard customers to Stripe for payments:
- Manually Set Stripe Customer ID: Set the Stripe Customer ID and Payment Method ID. (see below)
- Simplified Checkout Experience: Create a Stripe Checkout URL via the OpenMeter API. (see below)
1. Manually Set Stripe Customer ID
To manually set the Stripe customer ID and payment method for a customer, you can do so in the customer details page in OpenMeter or via the API.
Node.js Example
The upsert
method is used to create or update app data for a customer. It
accepts an array of app data objects, each representing a different app.
cURL Example
2. Simplified Checkout Experience
To simplify onboarding customers and collecting payments, OpenMeter provides a simple API to create a customer and generate a Stripe Checkout link. With a single API call you can:
- Create an OpenMeter Customer (or use an existing one)
- Attribute Metered Usage to the customer
- Create a Stripe customer (or use an existing one)
- Generate a Stripe Checkout URL to the payment form
Node.js Example
Wich will return a URL to the Stripe checkout form to collect credit card details:
cURL Example
Example API Request:
You'll receive a Stripe Checkout Session URL in response, ready to securely capture payment information.
See the Stripe Checkout API documentation for more details on the response fields.