Receipt
Extract structured transaction data from sales receipts, including merchant details, items purchased, and payment information.
curl -X POST $XBERG_ENTERPRISE_URL/v1/extract \ -H "Authorization: Bearer $XBERG_API_KEY" \ -F file=@your-receipt.pdf \ -F 'preset=receipt'

Structured fields extracted by this preset
merchantobjectrequiredBusiness or entity that issued the receipt.
namestringName of the merchant or business.
addressstringStreet address and location of the merchant.
phonestringContact phone number for the merchant.
transaction_datestringrequiredDate of the transaction, in ISO-8601 format (YYYY-MM-DD).
transaction_timestringTime of the transaction in HH:MM:SS format.
receipt_numberstringUnique receipt or transaction identifier assigned by the merchant's system.
payment_methodstringMethod used to complete the payment.
card_last_fourstringLast four digits of the payment card, if card-based payment was used.
line_itemsarray<object>Itemized list of products or services purchased.
subtotalnumberSum of all line items before tax and tip.
tax_totalnumberTotal sales tax charged on the transaction.
tax_ratenumberSales tax rate as a decimal (e.g., 0.08 for 8%).
tip_amountnumberGratuity or tip amount added to the transaction.
total_amountnumberrequiredFinal amount charged, including subtotal, tax, and tip.
currencystringrequiredISO-4217 currency code (e.g., USD, EUR, GBP).
Configuration
Call Mode
vision_onlyCitations
EnabledVersion
v1Tags
+System Prompt
You are a precise structured-data extractor for sales receipts. Extract all values exactly as they appear on the receipt document. Do not infer or estimate amounts. If a field is not visible on the receipt, omit it from the output. Currency amounts are decimal numbers without symbols. Dates are ISO-8601 format (YYYY-MM-DD) and times are HH:MM:SS. For card payments, extract only the last four digits. Identify line items carefully and preserve quantities and prices as shown. Payment method must be one of the specified enumerated values.