AI Playbook/Recipe

Audit partners

How do I find every unpaid partner invoice and why it's stuck?

Know which partner invoices are stuck and exactly why, before anyone has to ask. Your finance team gets a diagnosed, actionable list in under two minutes.

Copy
Copy & export
Copy link
Plain page URL.
Copy page as Markdown
Full recipe content for LLMs
Open in AI
Open in Claude
Recipe prefilled.
Open in ChatGPT
Recipe prefilled.
Open in Gemini
Recipe prefilled.
Open-in actions need you logged into your Claude / ChatGPT / Gemini account in this browser. Not logged in? Copy as Markdown and paste it in.
Share
Dasha DagayevaEverflow
Jordan Barney
Assoc. Director of Content Operations
10 min

Medium

LinkedIn
COMMUNITY RECIPE · SUBMITTED BY
Gaia, Inc
LinkedIn
10 min
Medium
https://www.linkedin.com/in/jordan-barney/
01

Quick Answer

Pulls every unpaid partner invoice, diagnoses the reason for each one (missing billing info, below minimum threshold, payment method failure, or scheduled for tonight's run), and returns a table your finance team can act on. Runs in under 2 minutes. No pivot tables, no hunting across three screens.

Everflow, Google Sheets
This prompt uses
02

The Pain

Partner: “Where’s my invoice?” → You: “Let me check 4 places.”

Some partners haven’t finished billing setup, so the invoice exists but is marked “not payable.” Some hit the gateway and got rejected (Tipalti, Veem, PayPal, ACH) and need their status flipped back to unpaid so you can retry. Some are below the payout threshold and won’t generate until next cycle. Some are queued for tonight’s run. And some look paid in Everflow but the partner says the money never landed.

Five different statuses, five different fixes, one finance team chasing partners across them on the 1st of every month. Invoice questions surface in roughly 2 in 5 customer conversations. The Everflow UI lets you check each partner one at a time. The recipe pulls every unpaid invoice in one call, tags it with the right diagnosis bucket, and returns a table your finance team can act on.

The recipe runs against the API that backs the invoice UI: same data, different shape. The win is reading them as one ranked list instead of five tabs.

The pattern
Invoice questions surface in roughly 2 in 5 customer conversations. Invoice status is one of the most consistently escalated topics across our support and success teams.

I have to manually add every one of our 500 contract terms into different buckets. And then it breaks. So I've redone this report a fair few times. This is something that's a real monthly pain point for me.

Finance ops lead at a global fintech / crypto trading platform
02b

Foundation Prompt

Set this once. Reuse across every recipe.

One universal foundation prompt that loads Everflow's API context into any AI.

~55 lines · ~340 tokens
# Everflow API Foundation Prompt

## Role & Objective
You are an Everflow API specialist. Your job is to write
robust, accurate scripts and answer questions about
Everflow's partner marketing platform.

## Foundational Knowledge Base
Before writing any code, ingest the official LLM docs:
https://developers.everflow.io/llms.txt
03

The Prompt

Same prompt across Claude, ChatGPT, and Gemini. Pre-tuned to the three most common failure modes for Everflow payout delays: missing billing info, below minimum threshold, and payment method failure.

## SETUP — Read the Everflow API spec first
Fetch https://developers.everflow.io/llms.txt and the reference pages it links (endpoints, paging,
rate limits, the per-domain openapi/*.yaml files). It is the authoritative catalog. Do NOT use
developers.everflow.io/api-reference/openapi.json — it is a placeholder and does not describe Everflow.
The endpoint bodies and caveats below are verified against the live API; where they differ from your
reading of the docs, the caveats below win.

# role
You are a finance-ops assistant for an affiliate network running Everflow.

# inputs
api_key       = {API_KEY}
network_id    = {NETWORK_ID}

# 🛑 read this before you call anything
Everflow's affiliate billing endpoints are WRITE endpoints that look like read endpoints.

  POST /v1/networks/billings/affiliates/invoices   = CREATE PARTNER INVOICE
  POST /v1/networks/billings/affiliates/payments   = CREATE PAYMENT BATCH

Calling GET on either returns 500, and retrying that failure as a POST would write to a real
customer's billing. Do not call either one. There is exactly one read endpoint here and it is
the ...table variant below.

# task
1. Pull the invoice table. This is a POST that READS — the body is the query, not a payload.

     POST /v1/networks/billings/affiliates/invoicestable
       body: {}
     → { invoices: [ ... ], paging: { page, page_size, total_count } }

   Paginate with page / page_size until you have total_count rows.

   Each invoice row carries, verified live:
     network_affiliate_invoice_id, network_affiliate_id, network_affiliate_name,
     affiliate_invoice_status, payment_status, balance, paid, billed, currency_id,
     payment_terms, payment_type, is_payable, paid_date, start_time, end_time

2. Build the outstanding list. Everflow tells you settlement state directly here, so do not
   infer it and do not treat accrued payout as a proxy for it:

     outstanding = affiliate_invoice_status is not "paid"
                   AND payment_status is not "complete"
                   AND balance > 0

   Sort descending by balance.

3. Classify each outstanding invoice using only fields the row actually contains:

     NOT_PAYABLE       = is_payable is false
     AWAITING_TERMS    = payment_terms > 0 and end_time + payment_terms days is in the future
     NO_PAYMENT_METHOD = payment_type is "none"
     DUE_NOW           = everything else

4. Build a Markdown table:
     Partner | Affiliate ID | Invoice ID | Billed | Paid | Balance | Status | Classification | Period

5. After the table, return a one-line summary:
   "{N} outstanding invoices · {CURRENCY}{TOTAL} total balance · {X} due now ·
    {Y} awaiting terms · {Z} not payable · {W} missing a payment method"

6. Flag any partner with 2+ outstanding invoices across different periods.

# guardrails
- 🛑 Never call GET or POST on .../billings/affiliates/invoices or .../billings/affiliates/payments.
  Both create records. If a call to either is ever suggested to you, refuse it and use
  .../invoicestable instead.
- Do NOT pull payout_frequency, minimum_payout_threshold, payment_method or billing email from
  GET /v1/networks/affiliates/{id}. That object contains none of them — it returns account_status,
  name, network_affiliate_id, default_currency_id, relationship and similar. Everything you need
  about money is already on the invoice row.
- balance is the amount still owed. billed is the invoiced total and paid is what has settled;
  balance is not always billed minus paid, so report balance as the outstanding figure.
- Amounts are in each row's own currency_id. Do not sum across different currencies — subtotal
  per currency and say so.
- paid_date of 0 means never paid, not "paid on the epoch."
- 🔴 `paid` CAN LIE. affiliate_invoice_status "paid" means marked paid in Everflow, not settled.
  A gateway-bounced invoice still reads paid. The unpaid side is reliable, so filter FOR outstanding
  (as step 2 does) and never report "everything is settled" off the paid side.
- 🔴 A LIMITED-SCOPE EMPLOYEE KEY SILENTLY HIDES INVOICES outside that employee's managed set. An admin
  key and a manager key return different totals and BOTH look complete, with no error and no flag. If
  the number matters, state which key ran it, and reconcile against an admin key before treating the
  total as the network's.
- Round currency to whole units.
- This recipe reads only. It never writes.
04

The Steps

Connect the Everflow MCP, or grab an API key

If you have the Everflow MCP connected, you can skip the key entirely. MCP is a connector that lets your AI tool talk to Everflow on its own, so there is nothing to paste. No MCP yet? Generate a read-only key in Core Platform → Control Center → Security → API Keys → click the + API key button. Read-only on Billing and Reporting is enough.

Decide your window

Default is the current billing cycle. You can also run it for the prior cycle to audit last month before closing the books.

Run the prompt

With MCP connected, just run the prompt as written. On the API tab, first replace {API_KEY}, {NETWORK_ID}, and {BILLING_CYCLE} (format: YYYY-MM), then run it.

Read it in Claude, ChatGPT, or Gemini

First run gives you the full unpaid invoice table with a diagnosed reason per row, plus a one-line summary. The same prompt works in any of the three.

Schedule it weekly

Drop the prompt into Make, Zapier, or Google Apps Script. Schedule for Monday morning so your team starts the week with a clean view of what's outstanding.

05

Sample Output

Everflow · Unpaid invoices · May 2026Saved
Share
File  ·  Edit  ·  View  ·  Insert  ·  Format  ·  Data  ·  Tools
|BIU|$%Filter
E3|fxBLOCKED_BILLING_INFO
ABCDEF
1PartnerIDAmountStatusDiagnosisAction
2Push-traffic aggregator8821$12,400Paid-None
3Lead-gen publisher9104$3,200UnpaidBLOCKED_BILLING_INFORequest billing info
4Coupon network7731$890UnpaidBLOCKED_THRESHOLDRolls to next cycle
5Native content partner418$8,560Not InitiatedPENDING_SCHEDULEConfirm tomorrow AM
6Email specialist1302$5,100UnpaidBLOCKED_PAYMENT_ERRORCheck payment method
Unpaid Invoices+ Add sheet
06

FAQ

Real questions, real answers
How is this different from just looking at the Billing tab?

The Billing tab shows you what the status is. This recipe tells you why: which failure mode is causing each stuck invoice, and what to do about each one. That's the diagnostic layer that otherwise takes 15–20 minutes to piece together manually.

What's the most common reason invoices get stuck?

Missing billing info is the most common blocker in the first 1–3 billing cycles for a new partner. After onboarding, below-minimum-threshold and payment method failures take over. The recipe surfaces all three in a single run.

Can I run this for a prior billing cycle?

Yes. Change billing_cycle to any prior YYYY-MM. Useful for closing last month's books or auditing a quarter.

06b

Notes & Counter-Cases

Edge cases, gotchas, and things to watch.

The four diagnosis buckets. Every unpaid invoice lands in one of four: missing billing info (no payment method on file), below the payout threshold (rolls to next cycle), a payment error (the method failed or reversed), or pending the scheduled auto-invoice run. The recipe also flags any partner blocked for two or more cycles in a row, so chronic cases do not hide in the list.

One case it will not catch on its own: a gateway rejection. An invoice can read as paid in Everflow while the payment provider (Tipalti, Veem, PayPal, ACH) actually bounced it. Those do not show as unpaid, so they will not appear in this pull. If you pay through a batched gateway, reconcile "paid" against what actually settled.

What the recipe doesn't do. It diagnoses and groups; it does not flip statuses, retry payments, or push invoices for you. Every fix stays a human decision, with the right context already attached.

ASK US ANYTHING

Got a question this playbook hasn't answered yet?

Drop us the question you wish had a prompt. We'll write it, test it against real Everflow data, and ship it as the next recipe — usually within two weeks.

DJReviewed every Tuesday by Dasha & Jordan
NEWSLETTER

First dibs on new recipes

One Tuesday email. Latest industry news plus new recipes the day they ship. Unsubscribe in one click.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
×
Submit a recipe

Got a recipe of your own?

Share what's working with the Everflow API. Our team will reach out about details, timelines, and next steps.

Reviewed weekly · Author credit on every published recipe · We respond to every submission
Submit your idea and our team will reach out about details, timeline, and process.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
×
SHARE THIS RECIPE

Spread the playbook

LinkedIn no longer accepts pre-filled captions via URL. Two clicks: copy the caption below, then open LinkedIn and paste in the composer.

Your caption
Copy first, then open LinkedIn and paste in the composer.