Skip to content
Invoicing

FISCALISTO / API

Purchase receipts

Save the photo of a receipt the issuer paid without an invoice, with the store, its RFC and the total, and request the invoice or mark it non-deductible.

Open in ChatGPTOpen in ClaudeOpen in Cursor

Your users pay for gas, meals and stationery with a receipt, and the invoice stays pending. Send the photo (or the PDF) of each receipt with its data: the store, its RFC, the date, the total, the payment form, the folio, the data its portal asks for (Web ID, branch…) and the invoicing link from the QR. Then request the invoice from the store or mark it non-deductible. When that store's invoice arrives with the SAT downloads, the receipt becomes invoiced on its own.

It's the same as Compras y gastos › Tickets de compra in the app.

Save a receipt

Send the file in base64 with its file_type (image/jpeg, image/png, image/webp or application/pdf), up to 8 MB. Scale the photo down before sending it (2,000 px on the long side is enough). If your app already read the QR code, send it in qr_text: it's the most reliable source for the portal link, and if the store invoices with Fiscalisto it fills in the folio and the total on its own.

curl https://api.fiscalisto.com/v1/purchase_receipts \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": "/9j/4AAQSkZJRgABAQAAAQABAAD...",
    "file_type": "image/jpeg",
    "qr_text": "https://facturacion.laspalmas.mx/?ticket=A-48213",
    "store_name": "Gasolinera Las Palmas",
    "store_tax_id": "GLP0503158A2",
    "date": "2026-10-30",
    "total": 348.5
  }'

Returns 201 with the saved receipt. Fiscalisto doesn't read the photo: it stores the data you send (store_tax_id, total, date, fields…) and what's missing is filled in later with POST /v1/purchase_receipts/{id}. To find the invoice when it arrives from SAT, store_tax_id and total are needed. The same file twice returns the receipt that was already there.

Saving receipts uses no timbres. Each receipt counts toward the daily purchase receipt limit: 100 a day in test mode and 5,000 in production. See Limits.

Correct its data

curl https://api.fiscalisto.com/v1/purchase_receipts/rct_OufpKqnrvx9p4X \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "total": 348.5,
    "payment_method": "tarjeta",
    "use": "G03"
  }'

Only what you send changes; null clears a field. use is the CFDI use requested: by default G03 if the issuer's regime allows it, otherwise S01, and it only accepts the expense uses its regime allows.

Request the invoice

POST /v1/purchase_receipts/{id}/request with method:

  • fiscalisto: the store invoices with Fiscalisto (store.on_fiscalisto is true, its QR is a self-invoicing link). The invoice is stamped right away with the issuer's tax data, the store sends it to reply_to and the receipt becomes invoiced with its invoice_uuid.
  • email: we send the store (to, or store.email) the issuer's tax data, the receipt's and the photo. Replies reach reply_to, or the issuer's reply-to address. The receipt becomes requested.
  • portal or manual: you requested it on the store's portal (store.portal_url) or in person. It only becomes requested.
curl https://api.fiscalisto.com/v1/purchase_receipts/rct_OufpKqnrvx9p4X/request \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "portal"
  }'

To request it, the issuer needs its legal name, tax regime and postal code; if one is missing it returns purchase_receipt_invalid and says which.

When the invoice arrives

You don't have to do anything: if a received invoice from that store arrives with the SAT downloads (same RFC, to the issuer's RFC, for the same total within one peso and dated from the purchase to 120 days after), the receipt becomes invoiced and invoice carries the invoice (sat_…). If you got it some other way, use mark_invoiced, with invoice if you know which one:

curl https://api.fiscalisto.com/v1/purchase_receipts/rct_OufpKqnrvx9p4X/mark_invoiced \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice": "sat_OufpKqnrvx9p1Dn"
  }'

One invoice covers only one receipt.

If they don't give you an invoice

POST /v1/purchase_receipts/{id}/mark_non_deductible leaves it as a non-deductible expense. reopen undoes it: it goes back to requested if it had been requested, otherwise to pending.

Two warnings each receipt carries:

  • cash_over_limit: more than $2,000 was paid in cash. Even with an invoice, that expense isn't deductible (LISR art. 27, sec. III).
  • days_left_in_month: the days left in the purchase's month, in Mexico time. The law sets no deadline for the buyer, but many stores only invoice within the month.

Look them up

GET /v1/purchase_receipts lists them newest to oldest, with status to see only pending, requested, invoiced or non_deductible. DELETE /v1/purchase_receipts/{id} deletes the receipt and its file.

Was this page helpful?