🎉  Build a workflow powerhouse. Learn more about our new Airtable integration.   🎉

November 20, 2015

Send Customized Receipts for New Charges in Chargebee

Building a subscription-based business can be a great way to build a long lasting and reliable business that provides consistent touch points with your customer.  Whether you’re a SAAS platform or e-commerce store selling monthly products, it is important to build an automated business.

One of the most important things to automate is your subscription billing and with a tool like Chargebee, you can build your billing system in minutes and never have to worry about again.  Chargebee will handle all of your payments, dunning alerts, and more.

Another way you can automate your subscription business is through WebMerge.  With WebMerge, you can automatically generate/populate documents such as letters, invoices, contracts, and more.  You’ll never have to manually create documents again!

In this example, we’re going to show you how to automatically send a customized receipt to your customer when a payment is processed through Chargebee.  While you can use a Webhook to send data directly from Chargebee to WebMerge, we’re going to use our friends over at Zapier to help with the integration.

To get started, we’re going to setup our template in WebMerge.  From the Documents page in WebMege, click the New Document button then enter a name.  On the next step, pick Build Your Own document type and continue.

Next, you’ll be taken to the document builder.  This is where you’re going to build your receipt template – add your logo, business info, and then we’ll add merge fields for where we want our payment information to go.  Merge fields look like {$FirstName}, {$TotalAmount}, etc.  These merge fields can be named anything you’d like – we’ll map them in Zapier soon.

Here’s what our receipt template looks like:

After you’ve finished your template, go ahead and save it then move on to the Settings tab.  Here, you can change the settings of your document like the output type and the name of the file.  For this example, we’re going to output a PDF and then include the Charge ID in the name of the file.

Next, we’re going to setup the email delivery so that our receipt is emailed directly to our customer.  Head over to the Deliver tab and then you should see an email delivery already there.  This was created by default, so we’re just going to edit this email delivery.

Click the Edit button and then to the Send Email To option we’re going to select the merge field we used for the customer’s email address.  We’ll also customize the other settings as well.

Great work!  You’re all done with the setup in WebMerge and now we’re ready to setup the integration with Chargebee through Zapier.

Inside Zapier, go ahead and create a New Zap.  For the Trigger, select Chargebee as the app and then New Charge as the trigger.

Zapier will have you authenticate your Chargebee account so they can pull information from your account.  Follow those directions and then Finish.

Next, you’re going to setup the Action for the Zap.  Go ahead and pick WebMerge as the app then Create Document Merge as the action.

Zapier will have you authenticate your WebMerge account so they can pull in a list of your documents via the API.  Follow those steps and then move on to the next page.

Zapier will load a list of all the documents in your WebMerge account.  Pick the receipt document you just created and then Zapier will load a list of all the merge fields that are in your document. 

For each of the merge fields in your document, you’ll need to pick the corresponding Chargebee fields by clicking the little icon on the right of the box.

Once you have all of the merge fields mapped, go ahead and Finish the zap and turn it on.

We’re now ready for a test!  Login to Chargebee and create a new Charge.  When you do that, Zapier will automatically detect the charge, grab the information for that charge, and then send it over to WebMerge where your receipt will be generated and emailed to the customer.

Here’s what our example receipt looked like:

Congratulations, you’re all done!  Now, every time a new charge is processed through Chargebee, a customized PDF receipt will be emailed to the customer.  Can you think of any other ways that you could use WebMerge to simplify your paperwork process?

6 min read

Ready to give Formstack Documents a try?
Start your Free Trial now!


Send Customized Receipts from Chargebee Now

By signing up here, you agree to our Terms of Use