Skip to main content

Generate Stripe Invoices for new Google Form Responses

Document Studio enables you to automatically send invoices and collect payments with Stripe for new Google Form responses. You can build an order form inside Google Forms and, when the client submits a new order, an invoice is automatically sent to the customer. The invoice is hosted on Stripe and the customer can securely pay with credit cards, debit cards, Apple Pay or other payment methods.

Ticket Sales Google Form

For this example, we have a Google Form for selling tickets for a music concert. The form collects the number of tickets required in different categories, the customer's name and billing address. There's also a checkbox for agreeing to the event policies.

When the form is submitted, the customer is sent an invoice with the total amount due.

Get your Stripe API key

Go to your Stripe Dashboard, click on the Developer menu and then API Keys. Click the Create Restricted Key button. Give your API key a descriptive name and turn on the Write permission for the Customers, Invoices and Tax Rates scope. Click the Create button to generate your secret API key and copy it to the clipboard.

Stripe API Key

Connect Stripe to Google Forms

Install Document Studio and open your Google Form to launch the add-on.

Inside the Document Studio app, provide a descriptive name for your workflow like Send Stripe Invoices with Google Forms and click on Continue to move to the Conditions page.

We only wish to generate invoices for new Google Form responses where the respondent has agreed to the terms and conditions. To do this, we need to add a condition that checks if the Registration Agreement field has been checked (or exists).

Registration Agreement Checked

Click on Continue and choose Accept Payments from the list of available tasks.

Configure Stripe Customer

Inside the Payments task, choose Stripe from the list of available payment providers. Paste your Stripe API key that you copied earlier into the API Key field. Next fill in the fields for the Customer Information section and data in these fields can be pulled in from the form response using question title placeholders.

For instance, if you are asking for the name of the respondent in your Google Form, you can add that name in the Customer's Name field with variables like {{ Name }}.

Stripe Customer Information

The customer memo and other text fields also support Scriptlets to add conditional or calculated text.

For instance, the event ticket is $15 but if the customer is buying more than 10 tickets, the discounted ticket price is $12. You can use the following scriptlet in the price field of the first item.

{% assign quantity = "{{Adult Tickets Quantity}}" %}
{% if quantity < 10 %}
15
{% else %}
12
{% endif %}

Configure Stripe Invoice

For the invoice section, specify the items name, the price of each item and the {{ quantity }} of each item as selected by the customer in the Google Form. You also need to provide the 3-letter currency code for the invoice and the tax rate (optional).

The invoice due date is the number of days from when the invoice is created until it is due. It is, by default, set to the day after the form response is submitted but you can change this date to any date you want.

Stripe Invoice

Preview and Save

Click the Preview button and a test invoice is generated. Document Studio will take the data from the second row of the response Google Sheet and create a Stripe invoice. Click Done to locally apply your changes.

On the trigger screen, turn on the option that says Run workflow on Form Submit and then click on the Save button.

The workflow will now appear in the workflow dashboard where you can edit, delete or manually run the workflow.

Here's a copy of the sample Stripe invoice generated from the Google Form response:

Stripe PDF Invoice