Skip to content

Use cases

Finance

Explain billing rules from the code, reconcile exports, hand off discrepancies and schedule month-end checks.

Merlin recipes for finance teams. Explain how billing is implemented, reconcile an export against the code's rules, answer a revenue-recognition question from the implementation, hand a discrepancy to engineering, keep accounting rules in memory and schedule the month-end checks.

How finance prompts work

Finance questions about a software product usually end with "ask engineering". The recipes below put the question to the billing code and the approved export instead, in a shared finance-engineering channel where the correction can happen in the same thread. Each prompt is a Slack message. Merlin posts progress there and the result lands there: an explanation with citations, a reconciliation with its formula, or a Linear issue for the discrepancy.

What you need

RequirementWhy it matters here
A channel approved for the financial data involvedExports and totals stay with the audience allowed to see them.
A public runtime with the billing repositoryCharging rules are read from the code that enforces them.
Analysis tools on that runtime (for reconciliation)Exports are processed locally on the runtime, with the libraries it has.
Linear connected (optional)Discrepancies become engineering issues with the evidence attached.

Remove payment-card data, credentials and unrelated customer information before attaching an export. Use the billing portal as the source for invoices and payment status.

Prompts to paste

Explain how billing works today

Ask for the rule, the code that enforces it and a clean split between the provider and the product.

@Merlin explain how mid-cycle upgrades are charged today and identify which code enforces the workspace plan cap. Separate Stripe behavior from Merlin behavior and cite the implementation.

Asking for the split matters: proration is often the provider's rule, the cap is the product's. Correct an assumption in the same thread:

Proration settles on the next invoice in this case. Update the explanation and keep the original source references.

See it step by step.

Reconcile an export

Attach the approved export, define the totals you expect and the rules that apply.

@Merlin reconcile the attached invoice export for August against the plan rules in the billing module. Period is calendar month, currency USD, exclude internal and test workspaces. Return the formula, the excluded rows and every unresolved difference with its likely cause.

The formula and the excluded rows are what an auditor reads first.

To tie out Stripe payouts every month, see it step by step.

Answer a revenue-recognition question from the code

When the accounting treatment depends on what the product actually does, ask the product.

@Merlin when a customer downgrades mid-cycle, does the product refund, credit or defer the difference, and at what moment is that recorded? Cite the code and say if any case is undefined.

"Say if any case is undefined" surfaces the gaps engineering has to decide.

Hand a discrepancy to engineering

Once a difference is confirmed, create the issue with the evidence in it.

@Merlin create a Linear issue in the Billing project: the seven invoices in this thread where the seat count differs from the export, the rule that should apply, and the code path you traced. Link back here.

Check a customer billing dispute

A customer disputes a charge. Trace what happened from the rules, without touching the provider account.

@Merlin from the account timeline in this thread, explain which rule produced the 14 March charge. Do not change anything in Stripe. Say what the customer would need to see to verify it.

To draft the evidence when a dispute arrives, see it step by step.

Schedule the month-end checks

The same checks run every month. Schedule the post to the finance channel.

@Merlin on the first of every month at 9am, post the workspaces whose seat count in the export differs from the plan record, with the difference for each.

Scheduled automations deliver to Slack and run on behalf of their creator. Fixed times run in the workspace timezone for a channel automation and in your personal timezone for a direct-message automation.

Save accounting rules to channel memory

Save the rules that keep being re-explained so later answers in the channel apply them.

@Merlin remember for this channel: revenue is recognized monthly on the invoice date, annual plans are deferred over twelve months, and internal workspaces are excluded from every total.

Keep entries short and review them in the web app when a policy changes.

Limits

Merlin's answer is only as current as the connected code, export and provider data. It cannot infer missing Stripe or bank records from repository code.

Never send complete card details. The billing portal remains the source for invoices and payment status.