Learn how to generate Stripe payment links with a redirect URL and send a post-purchase invoice to the buyer, in Google Sheets.

Table of content

Introduction

Creating payment links with Stripe helps businesses sell online products or services. This process can be automated by integrating Stripe API into Google Sheets via Google Apps Script. I created a fully working automation in Google Sheets that easily generates multiple Stripe payment links. If you need something like that, you can use my template and I will show you how to set it up.

What are Stripe payment links?

Stripe payment links are unique URLs that allow you to accept payments from customers. They can be used to sell products or services without requiring a complex e-commerce setup. These links can be shared via email, SMS, WhatsApp, or on social media platforms, and they do not expire, providing a convenient and versatile payment solution.

How does the automation work?

The Google sheet uses a custom function named STRIPE() to generate the payment links. Here are its key features:

  1. Creating a Payment Link for One or Multiple Items:
    The STRIPE function is designed to create a Stripe payment link for either a single product or multiple products. This means that the user can specify one or more items that they want to sell, and the function will generate a payment link accordingly. The maximum number of items that can be included in a payment link is 20. If multiple items are specified, they will all be displayed on the purchase page, and the customer will pay the total amount for all the items. See demos in GIFs below.
  2. Post-Payment Actions:
    After payment is completed, the user can choose to either redirect the customer to a specific URL or display a message. If you provide a URL to the STRIPE function, the customer will be redirected to a web page. But if you provide a text, it will be displayed after the payment. This is useful for directing customers to a thank you page, a survey, or another product page.
  3. Sending a Receipt and Post-Purchase Invoice:
    Once a payment is completed, Stripe automatically sends a receipt and a post-purchase invoice to the customer’s email address.
Creation of a One-item Stripe Payment Link
Creation of a multiple-items payment link

How to set up the automation?

You need to do two things to set up the automation:

1. Get the API Key:
Create an API key on the Stripe dashboard. Then you will need to insert this key in the Google Script code. During the creation of the key, make sure to enable Write permissions for the Products , Prices , and Payment Links resources, as these are used in the Google script.

2. Activate Post-Payment Emails:
Next, navigate to Customer email settings and activate the Successful Payments email setting. This ensures that a receipt and post-purchase invoice are sent to the customer’s email address upon successful payment.

In case you are interested, Stripe also allows you to customize your receipt with your branding. You can do this from your Stripe dashboard.

Conclusion

Automating the creation of Stripe payment links with Google Apps Script offers a flexible and efficient solution for managing online payments. With this setup, you can easily create one-time payment links in bulk, redirect your customers after payment, and ensure customers receive post-purchase invoices, all from within your Google sheet.

Shares:
Show Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *