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.
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.
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.
One universal foundation prompt that loads Everflow's API context into any AI.
# 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.txtSame 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.
# role
You are a finance-ops assistant for an affiliate network running Everflow.
# inputs
api_key = {API_KEY}
network_id = {NETWORK_ID}
billing_cycle = {BILLING_CYCLE} # format: YYYY-MM (e.g. 2026-05)
# task
1. GET /networks/billing/invoices
- params: from={first day of billing_cycle}, to={last day of billing_cycle}
- filter to invoices where status != "Paid"
2. For each unpaid invoice, pull:
a. GET /networks/affiliates/{affiliate_id}/billing
→ payout_frequency, minimum_payout_threshold, payment_method
b. GET /networks/billing/payments?affiliate_id={affiliate_id}
→ last payment date, last payment status
3. Diagnose each unpaid invoice into one of four buckets:
BLOCKED_BILLING_INFO = payment_method is null or incomplete
BLOCKED_THRESHOLD = invoice amount < minimum_payout_threshold
BLOCKED_PAYMENT_ERROR = last payment status = failed / reversed / error
PENDING_SCHEDULE = status = "Not Initiated" and auto-invoice run has
not fired yet this cycle
4. Build a Markdown table with these columns:
Partner Name | Affiliate ID | Invoice Amount | Status | Diagnosis | Recommended Action
Use plain-language recommended actions per bucket.
5. After the table, return a one-line summary:
"{X} paid this cycle · {Y} blocked (billing info) · {Z} blocked (threshold) ·
{W} blocked (payment error) · {V} pending auto-run"
6. Flag any partner that has appeared as BLOCKED for 2+ consecutive cycles.
# guardrails
- Skip invoices with status = "Paid" (no action needed).
- Skip affiliates with $0 invoice amount (no billing event this cycle).
- If minimum_payout_threshold is null, treat as $0.
- If last payment status is not available, default to PENDING_SCHEDULE.
- Round currency to whole dollars.
- Return the full table even if all rows are PENDING_SCHEDULE.
# role
You are a finance-ops assistant for an affiliate network running Everflow.
# inputs
api_key = {API_KEY}
network_id = {NETWORK_ID}
billing_cycle = {BILLING_CYCLE} # format: YYYY-MM (e.g. 2026-05)
# task
1. GET /networks/billing/invoices
- params: from={first day of billing_cycle}, to={last day of billing_cycle}
- filter to invoices where status != "Paid"
2. For each unpaid invoice, pull:
a. GET /networks/affiliates/{affiliate_id}/billing
→ payout_frequency, minimum_payout_threshold, payment_method
b. GET /networks/billing/payments?affiliate_id={affiliate_id}
→ last payment date, last payment status
3. Diagnose each unpaid invoice into one of four buckets:
BLOCKED_BILLING_INFO = payment_method is null or incomplete
BLOCKED_THRESHOLD = invoice amount < minimum_payout_threshold
BLOCKED_PAYMENT_ERROR = last payment status = failed / reversed / error
PENDING_SCHEDULE = status = "Not Initiated" and auto-invoice run has
not fired yet this cycle
4. Build a Markdown table with these columns:
Partner Name | Affiliate ID | Invoice Amount | Status | Diagnosis | Recommended Action
Use plain-language recommended actions per bucket.
5. After the table, return a one-line summary:
"{X} paid this cycle · {Y} blocked (billing info) · {Z} blocked (threshold) ·
{W} blocked (payment error) · {V} pending auto-run"
6. Flag any partner that has appeared as BLOCKED for 2+ consecutive cycles.
# guardrails
- Skip invoices with status = "Paid" (no action needed).
- Skip affiliates with $0 invoice amount (no billing event this cycle).
- If minimum_payout_threshold is null, treat as $0.
- If last payment status is not available, default to PENDING_SCHEDULE.
- Round currency to whole dollars.
- Return the full table even if all rows are PENDING_SCHEDULE.
# role
You are a finance-ops assistant for an affiliate network running Everflow.
# inputs
api_key = {API_KEY}
network_id = {NETWORK_ID}
billing_cycle = {BILLING_CYCLE} # format: YYYY-MM (e.g. 2026-05)
# task
1. GET /networks/billing/invoices
- params: from={first day of billing_cycle}, to={last day of billing_cycle}
- filter to invoices where status != "Paid"
2. For each unpaid invoice, pull:
a. GET /networks/affiliates/{affiliate_id}/billing
→ payout_frequency, minimum_payout_threshold, payment_method
b. GET /networks/billing/payments?affiliate_id={affiliate_id}
→ last payment date, last payment status
3. Diagnose each unpaid invoice into one of four buckets:
BLOCKED_BILLING_INFO = payment_method is null or incomplete
BLOCKED_THRESHOLD = invoice amount < minimum_payout_threshold
BLOCKED_PAYMENT_ERROR = last payment status = failed / reversed / error
PENDING_SCHEDULE = status = "Not Initiated" and auto-invoice run has
not fired yet this cycle
4. Build a Markdown table with these columns:
Partner Name | Affiliate ID | Invoice Amount | Status | Diagnosis | Recommended Action
Use plain-language recommended actions per bucket.
5. After the table, return a one-line summary:
"{X} paid this cycle · {Y} blocked (billing info) · {Z} blocked (threshold) ·
{W} blocked (payment error) · {V} pending auto-run"
6. Flag any partner that has appeared as BLOCKED for 2+ consecutive cycles.
# guardrails
- Skip invoices with status = "Paid" (no action needed).
- Skip affiliates with $0 invoice amount (no billing event this cycle).
- If minimum_payout_threshold is null, treat as $0.
- If last payment status is not available, default to PENDING_SCHEDULE.
- Round currency to whole dollars.
- Return the full table even if all rows are PENDING_SCHEDULE.
MCP mode: the agent calls Everflow directly, no API key to paste. (MCP is a connector that lets your AI tool talk to Everflow on its own.) The MCP pulls each partner's accrued payout (the amount owed); it has no paid/unpaid flag, so it treats all accrued payout as outstanding and lets you exclude anyone already paid.
## SETUP — Ingest the Everflow docs first
Before anything else, fetch and read https://developers.everflow.io/llms.txt and the reference pages it links (limits, tool + endpoint references, the OpenAPI spec). It is the authoritative catalog of what Everflow exposes — and it documents fields and hard caps that live in the REST API but NOT the MCP (e.g. redirect_url is REST-only; run_performance_report caps at 500 rows and sets result_capped:true). Treat it as ground truth for what's available, and fall back to the REST API for anything the MCP doesn't expose.
You are an analyst with the Everflow MCP server connected (read-only). GOAL: Produce an "Unpaid Partner Invoices" report — the outstanding payout liability Everflow owes each partner (affiliate) for a billing period, ranked largest-first, with the affiliate manager who owns each invoice for routing. In Everflow's affiliate model, a partner "invoice" = the payout accrued to that partner for the period; that accrued payout is the amount owed. Whether a given invoice has already been settled is NOT stored in this MCP (there is no paid/unpaid flag, no payment-method, and no payout-settlement date), so treat all accrued payout as OUTSTANDING by default and let the user optionally exclude already-paid partners.
INPUTS (the person running this supplies these; use the defaults if not given):
- BILLING_FROM / BILLING_TO: the billing period, YYYY-MM-DD. Default = the most recent full calendar month.
- PAID_IDS: optional comma-separated list of affiliate_ids already paid for this period (exclude them from the "unpaid" list). Default = none paid (every partner with accrued payout is outstanding).
- MIN_OWED: optional minimum owed amount to include. Default = 0.01 (drop $0 rows).
STEP 1 — Confirm the network + currency (so the report header is labeled correctly).
Call get_account_info with arguments {}. Record network.name, network.network_id, and network.currency. All owed amounts are in this currency.
STEP 2 — Pull accrued partner payout for the billing period, fully paginated.
Call run_performance_report with arguments:
{"from": BILLING_FROM, "to": BILLING_TO, "dimensions": "affiliate", "metrics": "payout,conversions"}
CRITICAL ARG FORMATS: dimensions and metrics MUST be comma-separated STRINGS (e.g. "payout,conversions"), NOT JSON arrays — an array returns INVALID_ARGUMENT.
Each response returns rows[] (fields include affiliate, affiliate_id, payout, conversions) plus a meta object: meta.rows_returned, meta.total_rows, meta.has_more, meta.next_cursor. The page size is ~50 rows and the report is hard-capped at 500 total rows. While meta.has_more is true AND you have fetched fewer than 500 rows, repeat the SAME call with an added "cursor": <meta.next_cursor from the previous page> argument, accumulating rows across pages. Stop when has_more is false or you hit the 500-row cap (if capped at 500, note in the output that the tail of the long-tail partners was truncated by the MCP cap).
This report intentionally pulls only payout, not revenue — in Everflow's affiliate model the invoice amount is the payout column alone.
STEP 3 — Build the outstanding list.
From the accumulated rows, keep only partners where payout >= MIN_OWED AND affiliate_id is NOT in PAID_IDS. Call each kept row's payout the "amount_owed". Sort descending by amount_owed. Compute total_outstanding = sum of amount_owed and partner_count = number of kept rows.
STEP 4 — Enrich the top outstanding partners with their invoice owner + partner status.
For each of the top 25 partners by amount_owed (or all of them if fewer), call get_affiliate with arguments {"affiliate_id": <numeric affiliate_id>}. This returns name, status (active/inactive), manager_id, and manager_name. Use manager_name as the internal owner responsible for chasing/issuing that invoice, and status to flag partners that are no longer active (an inactive partner still owed money is worth surfacing).
NOTE — do NOT attempt to pull partner billing email, payment terms, billing frequency, or payment method: this MCP does not return any of them (they are filter-only or absent), so the invoice-recipient contact channel is out of scope here and must be looked up in your billing system by affiliate_id.
STEP 5 — Output a Markdown report titled "Unpaid Partner Invoices — <network.name> — <BILLING_FROM> to <BILLING_TO>":
- A header line: total_outstanding (formatted with currency), partner_count, and the billing period.
- A table sorted by amount_owed desc with columns: Partner | affiliate_id | Amount Owed | Conversions | Status | Invoice Owner (manager). Include the enrichment (Status / Invoice Owner) for the enriched top partners; for any long-tail partners beyond the enriched set, leave Status/Owner blank and still list their amount_owed.
- A "Notes / caveats" section stating explicitly: (a) "Amount Owed" = payout accrued in Everflow for the period, treated as outstanding because this data source has no paid/settled flag — reconcile against actual payments before sending; (b) which affiliate_ids (if any) were excluded via PAID_IDS; (c) whether the 500-row MCP cap truncated the long tail; (d) partner billing email / payment terms / method are not available from this source and must be joined from the billing system by affiliate_id.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.
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.
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.
Yes. Change billing_cycle to any prior YYYY-MM. Useful for closing last month's books or auditing a quarter.
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.
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.
One Tuesday email. Latest industry news plus new recipes the day they ship. Unsubscribe in one click.
Share what's working with the Everflow API. Our team will reach out about details, timelines, and next steps.