How to Request Stripe Payments with Google Sheets

How to use Google Sheets to generate Stripe payment links and request payments in any currency from your customers anywhere in the world!

Stripe now offers a Payment Links API to help you programmatically generate payment links in bulk for any amount in any supported currency. You can accept one-time payments, or create payment links for subscriptions where the customer is automatically charged on a recurring basis.

Generate Stripe Payment Links

Stripe payment links do not expire and you can easily send them over email, WhatsApp, SMS, or share them on your social media pages. Customers can pay with their credit cards, Alipay, WeChat as well as wallets like Apple Pay and Google Pay.

If you are looking for an easy and automated solution to generate Stripe payment links in bulk and send them over to your customers, Google Sheets can help. You can combine this with Mail Merge with Gmail to request online payments from your customers over email. Or use Document Studio to create PDF invoices and embed the payment links directly in the customer’s invoice.

To get started, open your Stripe dashboard, go to Developers section, choose API keys and click the Created restricted API key option.

Generate Stripe API Restricted Key

Give your key a descriptive name, choose the Write permission for resources that are titled Products, Plans and Payment links. Click the Create Key button and make a note of the secret key.

Next, make a copy of the Stripe Google Sheet in your Google Drive. Inside the Google Sheet, go to the Extensions menu and choose Script Editor to open the underlying script.

Replace the Stripe API Key with the actual key generated in the previous step. Then, click on the Run button once to authorize the script with your Google Account.

Stripe Function API key

Close the Google Script editor and you can now use the custom function STRIPE() to generate Stripe payment links from the comfort of Google Sheets.

The STRIPE function in Google Sheet requires the product name, the amount to charge and the currency. The generated payment links are cached in Google Sheets so if you use the same product name and amount, you will get the same reusable link.

=STRIPE("Microsoft Office 365", "49.99", "USD")

If you would like to generate payment links for multiple rows in the Google Sheet, just add the formula in the first row and drag the crosshairs to copy down the formula down.

Stripe Payment Links

How Stripe Checkout Works with Google Sheets

The script connects to your Stripe account and looks up the product name. If no product is found, it creates a new product. It then creates a new price plan for the product based on the amount specified in the Google Sheets function.

The payment link is then generated based on this product and price plan. The script uses the built-in caching service of Apps Script to reduce latency and improve performance.

You can find the app’s source code here.

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.