/
/
Put Stripe cash on the right Rillet invoices, once
For finance teams who want each Stripe charge recorded against its Rillet invoice by asking their AI assistant, without double postings.
On this page
Connector
Connect Stripe, pick your AI tool and paste the prompt.
The problem
Applying Stripe charges to Rillet invoices by hand
Each successful Stripe charge should become a payment on the matching Rillet invoice, but matching charges, allowing for partial refunds and avoiding payments already recorded is fiddly. One double posting or overpayment and the customer's balance is wrong.
Without PopdockAI
- Export successful Stripe charges
- Net off partial refunds by hand
- Find each Rillet invoice by number
- Check nothing was already recorded
With PopdockAI
- The deposit account is confirmed in Rillet first
- Charges net of refunds are matched by exact invoice number
- Duplicates, overpayments and paid invoices are listed and skipped
- You preview every payment, and each is recorded and read back
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Record every successful Stripe charge made from {from-date} to {to-date} (default today) against an invoice as a payment on the matching Rillet invoice, deposited to GL account {deposit-account-code}, after the user confirms.
**Step 1: Check the deposit account**
Call `rillet-get-accounts` with `account-code` = {deposit-account-code}. If nothing comes back, say the account does not exist in Rillet and stop.
**Step 2: Read the Stripe charges**
Call `stripe-get-charge` with `created.from` = {from-date}, `created.to` = {to-date} if given, and `status` = succeeded. Keep only charges with an invoice-id. The amount to record is amount minus amount-refunded; skip charges where that is zero. For each charge call `stripe-get-invoice` with `invoice-id` to get the Stripe invoice number.
**Step 3: Find the Rillet invoice**
Call `rillet-get-invoices` (no filters) and match the Stripe invoice number to invoice-number exactly.
* No match: list under Invoice not in Rillet and suggest the backfill-stripe-invoices prompt.
* amount-due is zero: list under Already paid in Rillet.
* The amount to record is more than amount-due: list under Overpayment and do not record it.
**Step 4: Skip what is already recorded**
Call `rillet-get-invoice-payments` (no filters). If the Rillet invoice already has a payment of the same amount dated the same day as the charge, list it under Already recorded and skip it.
**Step 5: Preview and confirm**
Show a table of charge-id, Stripe invoice number, Rillet invoice-id, date, amount and currency for every payment to be recorded, then the skipped lists. Ask the user to confirm. Write nothing until they say yes.
**Step 6: Record**
For each confirmed payment, one at a time, call `rillet-add-invoice-payment` with invoice-id = the Rillet invoice-id, amount, currency in upper case, date = the charge's created date as YYYY-MM-DD, and account-code = {deposit-account-code}. If a call fails, stop and report what was and was not recorded.
**Step 7: Confirm**
Call `rillet-get-invoice-payments` again and check each recorded payment is present. Report recorded, skipped with the reason, and failed.
**Rules & Guidelines:**
* `stripe-get-charge` and `stripe-get-invoice` are on the stripe server and are read-only. The other tools named here are on the rillet server.
* The only tool that may write is `rillet-add-invoice-payment`, and only after the Step 5 confirmation.
* Do not call `rillet-update-invoice-payment`, `rillet-update-invoice` or `rillet-add-invoice-ar-only`.
* Record the gross charge amount. Stripe fees are booked separately by the book-stripe-fees prompt.
**Validation:**
* If no charges are linked to invoices, say so and stop.
* Stripe may return amounts in the smallest currency unit. If a charge amount is exactly 100 times the Rillet amount-due of its invoice, divide Stripe amounts by 100 and say so in the preview.
* If a tool cannot be found, name the server it belongs to (rillet or stripe) and stop.Who it's for
One answer, three teams that use it
Accounts receivable
Apply a week of cash in one pass
Matched payments come ready to confirm, with the problem charges listed separately.
Apply Stripe payments from 3 to 9 November to Rillet invoices, deposit account 1000.
Controllers
Stop double postings and overpayments
Payments already recorded and overpayments are caught before anything is written.
Which of this month's Stripe charges would overpay or duplicate a payment in Rillet?
Billing specialists
Find charges with no invoice
Charges with no Rillet invoice are listed, so you can raise or fix the invoice first.
List Stripe charges from last week that have no matching invoice in Rillet.
How it works
What PopdockAI does when you ask
You give a date range and the deposit account, and your AI assistant matches Stripe charges to Rillet invoices. Nothing is written until you confirm, and it stops and reports if one payment fails.
01
Ask
You give a date range and the deposit account.
02
Match
It reads successful Stripe charges net of refunds and finds each Rillet invoice by number.
03
Confirm
You preview every payment, with skipped charges listed, and say yes.
04
Record
It records each payment and reads it back.
What PopdockAI provides
The tools behind the answer
Ready made tools for Stripe and one secure connection to your AI tool. No code, no exports.
rillet-get-accounts
stripe-get-charge
stripe-get-invoice
rillet-get-invoices
rillet-get-invoice-payments
rillet-add-invoice-payment
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
Stripe cash on the right invoices, once
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
