Log yesterday's Checkout.com payments to Google Sheets

By General Input

Every morning we copy yesterday's Checkout.com payments into a Google Sheet, one clean row each, so finance can reconcile against the bank statement.

Integrations

  • Checkout.com
  • Google Sheets

Type

Deterministic Code

Categories

  • Finance
  • Operations

Every morning at 6am, run a deterministic sync that logs the previous day's Checkout.com payments to a Google Sheet for reconciliation and bookkeeping. This is an append-only job: pull exactly one day's window, write one row per payment, and never modify existing rows, so finance can pivot the log and match it against the bank.

Use Checkout.com Search Payments to retrieve every payment from yesterday's window. Build the window as the full previous calendar day (00:00:00 to 23:59:59) in our reporting timezone and filter on the payment's created/requested timestamp. Search Payments is cursor-paginated, so page through all results until the cursor is exhausted and collect the complete set of the day's payments before writing anything.

For each payment, build one row capturing: payment id, the payment date, the amount, currency, status, card scheme, client reference (the reference field), and customer (customer id or email). Convert the amount from Checkout.com minor units to a decimal before writing. Checkout.com amounts are integers in the currency's smallest unit (1000 = 10.00 GBP), so divide by 100 for standard two-decimal currencies, do not divide for zero-decimal currencies like JPY and KRW, and divide by 1000 for three-decimal currencies like BHD, KWD, and OMR. Write the amount as a plain decimal value so finance can sum and pivot it.

Append the rows to our finance spreadsheet with Google Sheets Append Values, which appends rows after the last row of the table. Write one row per payment in a stable column order matching the header (payment id, date, amount, currency, status, card scheme, client reference, customer). Append only; never overwrite or clear existing rows.

Because each run pulls only a single day's window and appends, the daily log is naturally deduplicated across runs. If a run is retried, key on the payment id so the same payment isn't written twice (for example, read the existing id column and skip ids already present). Keep the mapping deterministic: every payment in the window becomes exactly one row.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads