Skip to content
Insights · Engineering

Which credit did that invoice apply?

Name the credit that invoice applied: the id, the amount, and the status. A different note can name another invoice. Another account omits it.

Scroll
EngineeringOct 30, 202612 min readBy Salman Naqvi, Founder & CEO
Which credit did that invoice apply?

A customer says the last invoice was reduced, or says a refund they can see does not match any credit they were sent. Tonight, three proofs, in a console you administer. Name the credit that invoice applied: the credit note id, the amount, and the status. If the list for that invoice is empty, write that, and do not invent a note to fill the hole. Show a different note whose id, or whose invoice, is not this one. Show another account's list that does not contain this note. If any of the three needs the person who wired billing, you have not named the credit. You have a smaller total and a guess.

This is one credit note. It is not the invoice a charge paid. Which invoice did that charge pay? is an invoice id, a status, and a total. An invoice can stay paid while a later note is void, and a void note can keep the amount the issued note stored. It is not the tax an invoice added. Which tax did that invoice add? is a tax rate on a line. A tax of zero on a credit line is not a reason the note exists. It is not the product a price sold. Which product did that price sell? is a product id. A description of T-shirt is not a product id. It is not the link a price opened. Which link did that price open? can print the same description and the same unit amount, and a payment link id is still not a credit note id. It is not the variable a repository set, and it is not the item a conversation held. Which variable did the repository set? is a name and a value. Which item did that conversation hold? is an item id.

None of what follows is a rate for the product you are selling, and none of it is legal advice. The fields below are the current examples in Stripe's credit note API. Several calls print one id and do not print a second note. The figures below that are a 2025 paper about extracting fields from other people's invoices. A percentage of someone else's documents is not the credit note id in the console you opened.

The create request does not send an amount, and the response stores one anyway. The curl posts to /v1/credit_notes with the header Stripe-Version 2026-10-28.endive. 17 characters. The only field in that curl is invoice, set to a placeholder. The response id is cn_1MxvRqLkdIwHu7ixY0xbUcxk. 27 characters. object is credit_note. 11 characters. amount is 1099. amount_shipping is 0. created is 1681750958. currency is usd. 3 characters. customer is cus_NjLgPhUokHubJC. 18 characters. 27 is not 18, and 18 is not 17. invoice is in_1MxvRkLkdIwHu7ixABNtI99m. 27 characters, the same length as the credit note id, and not the same string. The line id is cnli_1MxvRqLkdIwHu7ixFpdhBFQf. 29 characters. The invoice line it points at is il_1MxvRlLkdIwHu7ixnkbntxUV. 27 characters again, a third string. description is T-shirt. 7 characters. quantity is 1. unit_amount is 1099. unit_amount_decimal is the string 1099. 4 characters. 1 times 1099 is 1099. The page does not print that product. type on the line is invoice_line_item. 17 characters, the same length as the version header, and not the same string (Stripe, Create a credit note).

Eight fields on that response store the integer 1099, and one field stores it as text. amount, the line amount, unit_amount, pre_payment_amount, subtotal, subtotal_excluding_tax, total, and total_excluding_tax are the integer. The string sits on unit_amount_decimal. 8 is not 1. post_payment_amount is 0, which is not 1099. amount_shipping is 0. discount_amount is 0. 1099 plus 0 is 1099, so pre_payment_amount plus post_payment_amount equals amount in this sample. The introductory sentence says the sum of refunds, customer-balance credits, and outside-of-Stripe credits must equal post_payment_amount. That sum, here, is the 0. It is not the 1099. refunds is an empty array. out_of_band_amount is null. customer_balance_transaction is null. A null is not a refund id. status is issued. 6 characters. type is pre_payment. 11 characters, the same length as the object name credit_note, and not the same string. The email_type enum also contains the string credit_note. 11 characters, the same string as the object name, and a different field. number is C9E0C52C-0036-CN-01. 19 characters. 19 is not 17, and 19 is not 27. livemode is false, so the object is an example, not a live credit on your account.

The attribute list and the sample do not name the same type. The sentence says type is one of pre_payment or post_payment. Two names. The enum under that sentence prints mixed, post_payment, and pre_payment. Three names. 2 is not 3. mixed is 5 characters. post_payment is 12. The sample stores pre_payment, and it does not store mixed. reason is one of duplicate, fraudulent, order_change, or product_unsatisfactory. Four names. duplicate is 9 characters. fraudulent is 10. order_change is 12, the same length as post_payment, and not the same string. product_unsatisfactory is 22 characters, the same length as jennyrosen@example.com on the prerequisite, and not an email. The sample reason is null. null is not duplicate. email_type is credit_note or none. Two names, and the default the page states is credit_note. none is 4 characters. The sample does not print email_type at all. Two email names are not four reasons, and four reasons are not three types. status is issued or void. Two names, and this pair matches its enum. issued is not void.

The issued sample leaves six fields null, and the void call changes one of them. customer_balance_transaction, memo, out_of_band_amount, reason, shipping_cost, and voided_at are null while status is issued. Six nulls. The void response keeps the id, keeps amount 1099, and sets status to void. voided_at becomes 1681750959. Subtract created 1681750958 and the gap is 1 second. The page does not print the integer 1 beside that pair. Voiding, in this sample, does not set amount to 0. 1099 on a void note is still 1099. The other five nulls stay null. 6 nulls become 5. A void status is not a missing note. The lines url is /v1/credit_notes/cn_1MxvRqLkdIwHu7ixY0xbUcxk/lines. 50 characters. The pdf url is 168 characters, and it contains acct_1M2JTkLkdIwHu7ix. 21 characters. 21 is not 27, and 168 is not 50. The preview call is described as a preview without creating a note, and the preview response prints the same id as create. A sentence that says the note was not created is not a response that omits the id. Do not treat the preview id as a second note, and do not treat it as proof a note was issued, because the page used one example object for both calls (Stripe, Void a credit note).

The list asks for a page the response does not fill. The curl sends limit=3. The default limit on that page is 10. The maximum is 100. The data array holds 1 note, and has_more is false. 1 is not 3. 3 is not 10. 10 is not 100. The one note is the same id, the same 1099, and the same invoice. A list of one is not a second credit. The prerequisite customer is named Jenny Rosen. 11 characters. The email is jennyrosen@example.com. 22 characters. The credit note response does not print Jenny Rosen. It prints a customer id of 18 characters. 11 is not 22, and neither length is 18. The prerequisite invoice is created with a customer id and no lines. The credit note response then contains a T-shirt line the create curl did not send. A line the example added is not a line your customer bought. The payment-link page prints a different line item id, 17 characters, with the same description T-shirt and the same unit amount 1099. 17 is not 29. The same 7-character description is not the same line id, and 1099 on a link is not cn_1MxvRqLkdIwHu7ixY0xbUcxk.

Yashwant, Dubey, Paikray, and Thulsiram measured extraction on other invoices, which is not this note. They use 102 digitally born and scanned invoice documents. The ground-truth sentence names invoice_number, issue_date, due_date, seller_name, seller_address, total_amount, tax_amount, and line_items. Eight fields. A later sentence says the Llama extractor was scored on five entities: bill-to, supplier, invoice, line item, and tax line summary. 8 is not 5. Docling's overall accuracy is 63%. invoice_name and invoice_number are 90%. tax_amount, net_amount, and currency_format are 60%. The line-item entity is 58%. 90 minus 60 is 30. 90 minus 58 is 32. 63 minus 58 is 5. None of those gaps is printed. Consistency checks passed 80%, and the same paragraph says 20% failed. 80 plus 20 is 100. 20% of 102 is 20.4, which the paper does not print. Llama's overall accuracy is 94%. Its line item is 91%. 94 minus 91 is 3, not printed. Its consistency pass rate is 93%. 93 minus 80 is 13. 94 minus 63 is 31. The paper does not print 13 or 31. A later sentence says Llama recorded zero mathematical validation errors, while the documentation exhibited 20 errors. 0 is not 20. 20 divided by 102 is 19.6% to one decimal, not 20%, and not 20.4. Docling is 10 seconds per document. Llama is 30. 30 divided by 10 is 3. 102 times 10 is 1,020 seconds, which is 17 minutes. 102 times 30 is 3,060 seconds, which is 51 minutes. 51 minus 17 is 34 minutes. The paper does not print 17, 51, or 34 (Sai Yashwant and colleagues, Invoice Information Extraction).

Veritas AI is a fraud-detection API with per-tenant billing, distinct from the next tenant. It is not a credit-note ledger. No headcount, duration, or result figure belongs in that sentence. Veritas AI does not supply cn_1MxvRqLkdIwHu7ixY0xbUcxk.

When the product is real and the console cannot name the note, the missing object is specific. A record you stored, that shows one credit note id, one amount, and one status, shows a different note that is not that one, and shows another account's list without it. A startup software development company that expects this will have put that record next to the invoice, before a smaller total is the way you discover the vendor owns the credit. The screen a founder can open without a vendor on the phone is AI product development. An AI integration sprint is the shape where the acceptance sentence can require the three proofs on every issued note. If you do not yet know which system stores credits, a two-week AI readiness assessment maps the systems. The findings are yours. They are not a promise that 94% will match 20 divided by 102.

There is a version of this afternoon where hiring for this is the wrong purchase. Nothing is for sale. You have no product. You are still choosing a firm, and the criteria for that choice sit on the page written for a top SaaS development company. That page is criteria. It does not rank anyone, including us. The only fact in the room is a paper's accuracy. A customer has already seen another customer's credit note. Naming an id does not close a leak. Or you wanted a lawyer. 94% is not your amount, and 1099 on a sample T-shirt is not your amount.

Before you tell them which credit the invoice applied, do the three proofs and write the name. Name the id, the amount, and the status, or write that the list was empty. Show a different note that is not that one. Show another account's list that does not hold it. Do not paste a preview id onto a note you have not issued, and do not ask a model which of the four reasons it was. The binding is the credit note you can defend.

Questions

Three records, in a console you administer. The credit note id, the amount, and the status, or a written line that the note was not stored. A different note whose id or invoice is not this one. Another account's list that does not contain this note. If any of the three needs the person who wired billing, you do not have the proof.

No. A share of other people's extracted invoices is not the amount on this note. A credit you can defend is the id, the amount, and the status, or a written line that the note was not stored. 94 on one table is not 1099, and a sample T-shirt is not your customer's line.

When nothing is for sale, when you have no product, when you are still choosing a firm, when the only fact in the room is a paper's accuracy, when a customer has already seen another customer's credit note, or when you wanted a lawyer.

Find this useful? Tell Google to show you more of it.

Let's put AI to work in your business.

A 30-minute call. You bring the workflow or the roadmap — we'll tell you what's feasible, what it costs, and what we'd build first.

Book a call→