Closed-won vs. paid reconciliation: match Salesforce wins to Stripe invoices and flag the gaps

Stripe + Salesforce

IntermediateRevOps

Who it's for

RevOps teams who want every closed-won opportunity checked against what was actually invoiced and paid in Stripe, before commissions go out or the month is closed. Everything stays read-only. Salesforce can be swapped for HubSpot, Attio or Pipedrive.

What you get

Mismatches between closed-won and paid, grouped by owner. Sample output: every company and person in it is fictional.

Closed Won in September (Salesforce): 18 opportunities, $412,000. Matched to a Stripe customer: 17. Nothing has been changed in Salesforce or Stripe.

Mismatches only:

| Opportunity | Owner | Won amount | Stripe | Flag |
|---|---|---|---|---|
| Quarry Lane Analytics (fictional), new logo | Alex Rivera | $33,000 | No invoice for customer quarrylane.example up to Oct 30 | Missing |
| Mossgate Labs (fictional), expansion | Priya Raman | $40,000 | INV-0440, $40,000, open since Sep 29 | Invoiced, not paid |
| Larkspur Freightworks (fictional), renewal | Sam Whitlock | $46,000 | INV-0436, $41,400 paid (10% coupon on the invoice) | Different amount, -$4,600 |
| Brightwater Dental Group (fictional), annual | Sam Whitlock | $18,000 | Quarterly subscription, $4,500 paid so far | Billing schedule, not an error |

Match basis: 15 by Stripe customer ID field on the account, 2 by email domain, 1 not matched (Quarry Lane).

Commission check: Larkspur's won amount in Salesforce is $46,000, but $41,400 was paid. Ask finance which number the plan uses before commissions are paid.

Paid in Stripe with no closed-won opportunity: 1 invoice, $12,000, customer tidewell.example (Tidewell Robotics, fictional).

All amounts are subtotals before tax, in USD.

Time and cost

Estimate About 20–30 minutes for a month of closed-won deals, most of it checking the mismatches.

Assumptions: One monthly run over about 20 closed-won opportunities and their Stripe customers.

Exact credit costs depend on your plan with each vendor. Check the tool pages before a large run.

MCP servers

Every server is confirmed in: ClaudeChatGPTCursor

Set up in a chat app

Every server in this recipe is confirmed for Claude and ChatGPT. Connect each one, then paste the prompts below into one conversation.

Developer setup

Auth setup and mcp.json for Claude Code and Cursor
  • Stripe: Sign in with OAuth, or pass an API key as a Bearer token for headless use.
  • Salesforce: Sign in with OAuth in your client (run /mcp in Claude Code). Do it once interactively, and the client stores and refreshes the token.

Put this in .mcp.json (Claude Code, project root) or ~/.cursor/mcp.json (Cursor). Swap the example keys for your own, and don't commit real ones. Remove the // comment lines if your client requires strict JSON.

{
  "mcpServers": {
    "stripe": {
      "url": "https://mcp.stripe.com"
      // headless alternative: "headers": { "Authorization": "Bearer YOUR_STRIPE_API_KEY" }
    },
    "salesforce": {
      "url": "https://api.salesforce.com/platform/mcp/v1/platform/sobject-all"
    }
  }
}

Step-by-step prompts

  1. Look at the Opportunity and Account schema in Salesforce and tell me which fields hold the amount, close date, owner, account website and any Stripe customer ID. Then use SOQL to list opportunities marked Closed Won with a close date in {period}: name, account, website, owner, amount and close date. Don't change any records.
  2. In Stripe, read the customers, invoices and subscriptions for those accounts, from the start of {period} to 30 days after it ends. Match each opportunity to a Stripe customer by {stripe id field} if it's set, otherwise by email domain. Show how each match was made. Read only. Don't change anything in Stripe.
  3. For each opportunity, compare the won amount with what was invoiced and what was paid, using subtotals before tax. Flag: no invoice, invoiced but unpaid, partly paid, or a different amount. If a subscription bills in instalments, compare against what should have been billed so far and mark it as a schedule, not a gap.
  4. Give me a table of the mismatches only, grouped by owner, then a list of paid Stripe invoices with no closed-won opportunity. Add a line for each owner where the Salesforce amount and the paid amount differ, so I can check commissions. Don't change anything in Salesforce or Stripe.

Run it on a schedule (optional)

Where this goes wrong

Gotchas

Download

Get the prompts, guardrails and expected output as one Markdown file. Paste it into a Claude Project or ChatGPT project's instructions, or save it as CLAUDE.md for Claude Code.

Download revenue-reconciliation.md