Skip to main content
POST
Self-invoice a ticket from a photo

Authorizations

Authorization
string
header
required

API key: Authorization: Bearer sk_test_... or sk_live_....

Headers

Invoice-Version
string

Pin a dated API release (Stripe-style). Omit to use the current version. An unknown value returns 400 request.invalid_version. Echoed back on every response.

Example:

"2026-07-10"

Invoice-Account
string

Connect: act on behalf of one of your connected accounts (its acct_…/org_… id). Omit to act as your own organization. Not honored on /v1/api_keys.

Example:

"org_2P9connectedacct"

Idempotency-Key
string

Safely retry any POST. The first response is stored for 24h and replayed byte-for-byte for identical retries (the replay adds an idempotent-replayed: true header). Reusing the key with a different body is 409 idempotency.key_reuse; an in-flight duplicate is 409 idempotency.key_processing. This makes retrying a 502/429 safe — no duplicate stamp.

Example:

"a1b2c3d4-e5f6-4789-8abc-1234567890ab"

Body

photo
file
required

The raw ticket image (JPEG/PNG) — no base64 needed.

fiscal_profile_id
string
required

Fiscal profile whose RFC/razón social/régimen/CP become the CFDI Receptor.

uso_cfdi
string

c_UsoCFDI for the emitted CFDI (default G03).

portal_url
string

Override the merchant self-invoice portal URL when the ticket prints none.

metadata
string

Integrator-owned metadata as a JSON string, e.g. {"order_id":"123"}.

Response

Default Response

object
enum<string>
required

Always "ticket_invoice".

Available options:
ticket_invoice
id
string
required

Ticket-invoice id.

status
enum<string>
required

Lifecycle: extracting → processing → completed | needs_review | failed. Poll or watch ticket_invoice.* webhooks.

Available options:
extracting,
processing,
needs_review,
completed,
failed
fiscal_profile_id
string
required

The Receptor fiscal profile.

uso_cfdi
string
required

c_UsoCFDI requested for the emitted CFDI.

merchant
string | null
required

Merchant name read off the ticket (the CFDI Emisor).

merchant_rfc
string | null
required

Merchant RFC, when printed on the ticket.

portal_url
string | null
required

The merchant self-invoice portal used.

portal_domain
string | null
required

Bare host of the portal (recipe key).

folio
string | null
required

Ticket folio / web id used to look it up.

sucursal
string | null
required

Branch / station identifier, when needed.

currency
string
required

ISO-4217 currency, default MXN.

subtotal
string | null
required

Ticket subtotal as a decimal string.

total
string | null
required

Ticket total as a decimal string.

ticket_date
string | null
required

Ticket date as printed, yyyy-mm-dd.

confidence
number | null
required

Extraction confidence 0..1 (below the auto-submit threshold → needs_review).

uuid
string | null
required

SAT folio fiscal (UUID) of the emitted CFDI, when completed.

portal_reference
string | null
required

Portal-side acuse/reference id, when shown.

recipe_id
string | null
required

The learned portal recipe used/produced for this run.

error
object | null
required

Failure detail when status is failed/needs_review, else null.

metadata
object | null
required

Echoed integrator metadata.

livemode
boolean
required

True if created with a live-mode key.

created_at
string
required

Creation timestamp, ISO-8601 UTC.

updated_at
string
required

Last update timestamp, ISO-8601 UTC.