Back to PayPal in Google Sheets
SheetXAI logo
PayPal logo
PayPal · Google Sheets Guide

Generate PayPal Invoice QR Codes and Store the Links in a Sheet

2026-05-13
4 min read
See the Excel version →

The Scenario

You are an event caterer. You send 30 paper invoices at events — one per table, tucked into the bill folder. Each invoice has a PayPal QR code so guests can pay immediately. You have the invoice IDs in a Google Sheet, column A. You need the QR image URL for each one written into column B so you can embed them in your printed invoice template.

The slow version:

  • Open PayPal, navigate to each invoice by ID
  • Generate the QR code individually
  • Right-click the QR image, copy image address
  • Paste it into the sheet
  • Repeat 29 more times
  • Realize PayPal regenerates the URL differently on the third invoice and the format is inconsistent
  • Spend 45 minutes on 30 URLs.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your spreadsheet that reads the invoice IDs and calls PayPal's QR code API for each one, writing the URL back directly.

Open the SheetXAI sidebar and type:

For each invoice ID in column A of this sheet, generate a PayPal QR code at 300×300 pixels and write the returned QR image URL into column B.

SheetXAI calls PayPal's QR code generation endpoint for each ID and writes the URL into column B. Thirty URLs in column B, ready to drop into your invoice template.

What You Get

A sheet with a QR code URL alongside every invoice ID:

  • Column A — your invoice IDs, unchanged
  • Column B — the PayPal QR code URL for each invoice, at the requested size

You paste the column B URLs into your invoice template and print. Guests scan at the table and pay directly. You do not open PayPal once to generate a single QR code.

If your printed invoice template needs a specific image size, change the pixel dimensions in the prompt.

What If the Data Is Not Quite Ready

Invoice lists for QR generation often have a few edge cases. SheetXAI handles them inline.

When some invoice IDs in the sheet are invalid or already cancelled

A few invoices from early in the event season were cancelled and their IDs should be skipped.

For each invoice ID in column A, generate a PayPal QR code at 300×300 pixels and write the URL into column B. If an ID returns an error, write "INVALID" into column B instead of a URL.

When you need two QR code sizes per invoice

Your printed template has a small QR in the corner and a large QR for accessibility on a separate page. You need both sizes.

For each invoice ID in column A, generate two PayPal QR codes: one at 150×150 pixels (write into column B) and one at 500×500 pixels (write into column C).

When you also want the invoice total next to each QR code

Your invoice template shows the amount due alongside the QR code so guests know what they are paying.

For each invoice ID in column A, fetch the invoice total from PayPal and write it into column B. Then generate a QR code at 300×300 pixels and write the URL into column C.

When the QR codes need to be generated for invoices that do not exist yet

You want to create the invoices from a client list first, then generate QR codes for each one in the same prompt.

For each row in this sheet, create a PayPal draft invoice using the email in column A and the amount in column B. Once created, generate a QR code at 300×300 pixels for each invoice. Write the invoice ID into column C and the QR URL into column D.

The pattern: QR generation is a single API call per invoice ID. SheetXAI chains the fetch and the write in one prompt, regardless of how many rows you have.

Try It

Get the 7-day free trial of SheetXAI and open any sheet with PayPal invoice IDs, then ask it to generate the QR codes and write the URLs back. The PayPal integration is included in every SheetXAI plan. See also how to bulk-create draft invoices from a sheet or the PayPal in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more