/
/
Mirror Stripe invoices in Business Central as checked drafts
For finance teams who want Stripe invoices in Business Central once, with totals compared, by asking their AI assistant.
On this page
Connector
Connect Microsoft Dynamics 365 Business Central, pick your AI tool and paste the prompt.
The problem
Mirrored invoices rarely match on the first try
Mirroring a Stripe invoice in Business Central means finding the customer, re-entering each line against the right revenue account and checking it was not entered already. Tax is calculated differently in each system, so totals rarely agree.
Without PopdockAI
- Find the customer and retype each line
- Search for the Stripe number to avoid a duplicate
- Post and then find the totals do not agree
- Edit lines to force the numbers to match
With PopdockAI
- Drafts and voids are skipped and duplicates stop the job
- The customer is found by email, one line per Stripe line
- You confirm against the Stripe total before anything is created
- The invoice stays unposted and any gap is explained, not forced
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Create an unposted sales invoice in Business Central company `{company}` (default: the default company) that mirrors Stripe invoice `{stripe-invoice}` (an in_ id or an invoice number), with each Stripe line posted to G/L account `{revenue-account-number}`.
**Step 1: Read the Stripe invoice**
Call `stripe-get-invoice` with `invoice-id` set to `{stripe-invoice}` if it starts with in_, otherwise with `number`. If its status is draft or void, report that and stop. Keep `invoice-id`, `number`, `customer-email`, `customer-name`, `total`, `currency`, `created-date` and `due-date`.
**Step 2: Check it is not already in Business Central**
Call `business-central-get-posted-sales-invoice` with `external-document-number` set to the Stripe `number`, then `business-central-get-sales-transaction` with the same `external-document-number`. If either returns a document, report it and stop.
**Step 3: Find the Business Central customer**
Call `business-central-get-customer` with `email` set to the Stripe `customer-email`. If there is no match, stop and tell the user to run the create-bc-customer-from-stripe prompt first. If more than one matches, list them and ask which to use.
**Step 4: Read the lines and propose the invoice**
Call `stripe-get-invoice-item` with `invoice-id`. For each line, plan a G/L account line with `number-on-line` set to `{revenue-account-number}`, `description` set to the Stripe description, `quantity` set to the Stripe quantity (1 if empty) and `unit-price` set to the Stripe amount divided by that quantity. Use the `line-type` value for a G/L account that the tool's schema lists.
Show the user the header (customer-number, external-document-number set to the Stripe number, invoice-date set to the Stripe created-date, due-date) and the planned lines, with their total against the Stripe total. Ask the user to confirm. Do not continue without a clear yes.
**Step 5: Create**
Call `business-central-create-sales-invoice` once, with `customer-number` and `bill-to-customer-number` both set to the customer's number, `external-document-number`, `invoice-date` and `due-date`. Then call `business-central-create-sales-invoice-line` once per planned line with `document-id` set to the returned `id`.
**Step 6: Verify**
Call `business-central-get-sales-transaction` with `external-document-number` set to the Stripe number and compare `total-amount-including-tax` with the Stripe `total`. Report the new Business Central invoice number, both totals and any difference. A difference usually means Business Central calculated tax differently from Stripe; say so rather than changing the lines.
**Rules & Guidelines:**
* `stripe-get-invoice` and `stripe-get-invoice-item` are on the stripe server; every tool whose name starts with business-central is on the business-central server.
* The only writes allowed are one `business-central-create-sales-invoice` and one `business-central-create-sales-invoice-line` per Stripe line, only after confirmation in Step 4.
* Do NOT call `business-central-update-sales-invoice`, `business-central-update-sales-invoice-line` or `business-central-create-customer`. The invoice is left unposted for the user to review and post in Business Central.
* Nothing is written to Stripe.
**Validation:**
* If a line create fails partway through, stop, report the Business Central invoice number and which lines were created, and tell the user to finish or delete the draft in Business Central. Do not retry automatically.
* If the Stripe currency differs from the company's local currency, ask the user whether to pass it in upper case as `currency-code` before creating the header.
* If the invoice has no lines, stop and report it.Who it's for
One answer, three teams that use it
Accountants
Record Stripe revenue without retyping
Each Stripe invoice becomes a draft in Business Central with lines on the right revenue account.
Create a Business Central invoice for Stripe invoice INV-2087 using revenue account 4020.
Revenue accountants
Understand total differences
Totals are compared after creation and a difference is explained, usually tax, instead of lines being altered.
Mirror Stripe invoice INV-1990 for Contoso in Business Central and tell me if the totals differ.
Controllers
Review before anything posts
Invoices are left unposted, so you can check them before they hit the ledger.
Bring Stripe invoice INV-2101 into Business Central as an unposted invoice against account 4010.
How it works
What PopdockAI does when you ask
You give the Stripe invoice and a revenue account, and your AI assistant plans the Business Central invoice. Nothing is created until you confirm, and it stays unposted for you to review.
01
Ask
You give the Stripe invoice and a revenue account.
02
Check
It skips drafts and voids and stops if Business Central already has the number.
03
Confirm
You see the header and lines against the Stripe total and say yes.
04
Create
It creates the unposted invoice and compares totals, explaining any gap.
What PopdockAI provides
The tools behind the answer
Ready made tools for Microsoft Dynamics 365 Business Central and one secure connection to your AI tool. No code, no exports.
stripe-get-invoice
stripe-get-invoice-item
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 invoices landed once, as checked drafts
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)
