Home/Integrations/PayPal
PayPal and Google Sheets integration
Plenty of customers would rather pay with PayPal than type in a card number. I connect PayPal to your sheet with Apps Script so each sign-up, order or invoice gets its own PayPal payment link, and when it's paid, the row updates itself with the amount, date and transaction ID.
Connect PayPal to my sheetWhat it can do
Common PayPal jobs I set up. Yours will match how you use PayPal today.
A payment link per row
The script creates a PayPal order for the exact amount and description in the row and sends the customer the approval link by email or text.
Payments matched automatically
Each order carries the row's ID, so when the customer pays, the script finds that row and marks it Paid with the PayPal transaction ID.
Invoices from the sheet
PayPal invoices created from rows, with line items, due dates and the customer's email, and their status (sent, paid, overdue) kept up to date.
Transaction history for reporting
Payments, refunds and PayPal fees pulled into a ledger tab on a schedule, so totals, net revenue and reconciliation live next to the rest of your numbers.
Donations and one-off payments
Donations and payments that come in outside the sheet are pulled in and matched to a donor or customer by email where possible, with the rest flagged for review.
PayPal next to Stripe or Square
Customers can pick card or PayPal, and either way the payment lands on the same row with the same status columns.
How it's built
The script talks to PayPal's REST API with UrlFetchApp. It exchanges your app's client ID and secret for a short-lived access token, then uses the Orders API to create a payment for a row and the Invoicing API for invoices. The row's ID goes into the order's custom ID field, which is what lets the payment find its way back.
To confirm payments, a time-driven trigger checks the status of open orders and invoices every few minutes and updates the rows that were paid. PayPal can also send webhooks, but it verifies them with request headers that Apps Script web apps can't read, so checking on a schedule is the more dependable setup. For reporting, a nightly job pulls the day's transactions, including fees and refunds, into a ledger tab.
Your PayPal credentials are kept in the script's private properties, not in a cell. Card and bank details stay with PayPal; the sheet only ever sees the amount, status and IDs.
Good to know
- You need a PayPal Business account, and I set up a REST app in PayPal's developer dashboard to get the API credentials. Everything is tested in PayPal's sandbox first.
- Plain PayPal.me links and Friends and Family payments don't carry a row ID, so they can't be matched automatically. Payments made through links the script creates can.
- PayPal's transaction history can lag by a few hours behind real time, so the nightly ledger is for reporting. Payment status on each row comes from checking the order itself, which is quicker.
- PayPal charges its normal fees on each payment. There's nothing extra from me per transaction.
PayPal questions
Can customers pay with a card through PayPal without an account?
In many cases, yes. PayPal's checkout usually offers a guest card option, though PayPal decides when to show it based on the customer and their country.
What about Venmo?
For US customers, Venmo can appear as a payment option in PayPal's checkout on a web page I build for you. Payments sent straight to a personal Venmo account can't be matched automatically.
Can I use PayPal and Stripe together?
Yes. Many clients offer both. Both write to the same Paid, Amount and Reference columns, so your totals and reports don't care which one was used.
Can it handle refunds?
Refunds you issue in PayPal show up in the ledger and on the original row, so balances and totals stay right. I can also add a menu item to issue a refund from the sheet.
Tell me what your sheet needs to do
A few sentences is enough to start. I'll reply with questions, then a plan and a fixed quote.