🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 28, 2026

How to Create Chargebee Customers and Subscriptions from Gravity Forms

GravityExtra
How to Create Chargebee Customers and Subscriptions from Gravity Forms

Most subscription businesses start a customer’s billing in two places at once: a form on the website, and Chargebee. Someone picks a plan on your pricing or sign-up page, you collect their details in Gravity Forms, and then somebody re-keys those details into Chargebee to set up the customer and the subscription. That gap is where typos, missed sign-ups and slow onboarding live. The Gravity Forms Chargebee Premium Add-on closes it: every submission becomes a Chargebee customer, and, when you want it, a running subscription, with nothing retyped.

This guide walks through how the add-on works, how to connect it to your own Chargebee site, how to map your form fields to the customer and the subscription, and how it keeps your API key safe and your retries clean.

What the add-on does

On every Gravity Forms submission, the add-on talks to the Chargebee REST API and does two things. First, it finds a customer by exact email or creates a new one, filling in the name, company and phone you mapped. Second, if you have turned the subscription section on, it starts a subscription for that customer using a plan item price, a quantity and any add-on item prices you chose. It is a clean handoff from your website to your billing system, run on your server after the visitor has already seen your confirmation.

It is worth being clear about scope. The add-on manages the customer and the subscription record through Chargebee’s API using your own credentials. Card capture and hosted checkout stay with Chargebee’s own pages and your payment gateway; the add-on is the bridge that gets the customer and the plan into Chargebee tidily, whether you collect payment separately, use a trial, or bill offline.

The Chargebee settings page in Gravity Forms: license key, Chargebee site, API key and a test connection button that lists item prices

Connect your Chargebee site

Everything runs against your own Chargebee site with your own key, so there is nothing to approve with anyone and no shared account. In Chargebee, open Settings → Configure Chargebee → API Keys and create a full-access API key. You also need your site name, which is the part before .chargebee.com in your address: for acme.chargebee.com the site is acme.

In WordPress, open Forms → Settings → Chargebee, enter the site and the key, and press Test connection. The add-on asks Chargebee for your item prices and lists a few of them, which both confirms the key works and reminds you of the exact item price ids you will map in a moment. Authentication uses HTTP Basic, with the API key as the user name and an empty password, exactly as the Chargebee API expects.

Map your form to a customer and a subscription

Add a feed to your form under Settings → Chargebee. The customer email is the only required field, because it is how a customer is matched; map it to your email field with a merge tag such as {Email:2}. First name, last name, company and phone are optional and mapped the same way. The Update existing option lets you refresh a matched customer with the mapped fields, or leave existing customers untouched while still creating new ones.

The Chargebee feed in Gravity Forms: customer email, name, company and phone, and an optional subscription with plan item price, quantity and add-ons

To start a subscription, turn on the subscription section and give a plan item price id from your Product Catalog, such as pro-USD-Monthly. Because it accepts merge tags, a plan chooser on your form can pick it per submission with the :value modifier, for example {Plan:5:value}. A quantity field maps the number of seats, and add-on item prices are listed one per line as id or id:quantity. The subscription is created with Chargebee’s subscription-for-items endpoint, so plans and add-ons are all item prices — the modern Chargebee model. Full field-by-field notes live in the Chargebee add-on setup guide.

Conditional logic and multiple feeds

Each feed has conditional logic, so a customer or subscription is only sent when your rule is met: only when a plan is chosen, only for a paid tier, or only for a particular enquiry type. Because a form can have more than one feed, a single pricing form can route a “Basic” choice to one plan item price and a “Pro” choice to another, each with its own add-ons. Nothing is sent for submissions that do not match, so your Chargebee data stays clean.

Safe retries that never double-create

Billing is the last place you want duplicates. If a feed is resent, or Gravity Forms retries it after a hiccup, the add-on will not create a second customer or a second subscription. The customer is matched by exact email, and the subscription is created with a deterministic id tied to the entry and the feed. If an earlier attempt created the subscription but the network dropped the reply, the add-on looks the subscription up by that id and reuses it instead of starting another one. A feed already running for an entry is locked so it cannot be sent twice at once.

A Gravity Forms entry screen showing the Chargebee note with the customer link and the subscription link

Security and privacy

The API key is encrypted at rest with AES-256-GCM, shown masked after it is saved, and never written to an entry note or a log. If you prefer, you can set it with the GFCB_API_KEY constant in wp-config.php and keep it out of the database altogether. Every request is made over HTTPS with certificate verification on, and the add-on never follows a redirect, so your credentials cannot be bounced to another host. It only ever contacts your own <site>.chargebee.com. The connection test and the feed both run behind a capability and nonce check, so only your own staff can trigger them.

What you see on the entry

After a submission is processed, the Gravity Forms entry keeps a link to the Chargebee customer and, when a subscription was started, a link to the subscription, alongside a note that records exactly what was done. If something goes wrong, the note says which step stopped and why — a wrong item price id, an invalid email, a key problem — without ever printing your key. Two notification events, “Chargebee customer synced” and “Chargebee sync failed”, let you keep your team in the loop, and the Chargebee ids are available as merge tags for those emails.

Who it is for

Any team that signs customers up on their own site and bills them in Chargebee: SaaS products with a self-serve plan page, membership and community sites, agencies onboarding retainer clients, and B2B teams turning a sales enquiry into a customer record. Wherever a form is the first step and Chargebee is where the money is managed, this add-on removes the re-typing in between.

It also fits the many smaller flows that feed billing but rarely get automated: a “request a demo” form that should create a trialling customer, an upgrade request from inside your app, a renewal interest form, or an event that should spin up a short-term plan. Each of those is just a Gravity Form with a feed, and each one lands in Chargebee as a proper customer and subscription rather than a note in someone’s inbox. Because feeds are per-form, you can start with one simple sign-up form and add more over time without touching code.

Why map at the form, not after the fact

Mapping fields once, in the feed, means the data that reaches Chargebee is consistent for every submission: the same email normalisation, the same name split into first and last, the same plan item price for a given choice. There is no spreadsheet export, no nightly import job and no window where a new customer exists on your site but not yet in billing. And because the add-on records the customer and subscription ids back onto the entry, your Gravity Forms entries become an audit trail that ties each submission to the exact Chargebee records it produced — handy when finance asks where a subscription came from.

Get started

Install the add-on, connect your Chargebee site and key, add a feed, and send a test submission — you will see the customer and subscription appear in Chargebee within moments, with the links saved on your entry. Ready to connect your forms to your billing? Get the Gravity Forms Chargebee Premium Add-on and turn every submission into a Chargebee customer.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr