Skip to main content
POST
https://api.usatimbre.com
/
api
/
timbre
/
facturar-ticket-org
curl -X POST "https://api.usatimbre.com/api/timbre/facturar-ticket-org" \
  -H "Authorization: Bearer tmb_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "receipt_image": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
    "cfdi_usage": "G03",
    "expense_description": "Compra de equipo",
    "rfc": "XAXX010101000"
  }'
{
  "id": "inv_abc123",
  "status": "processing",
  "amount": null,
  "currency": "MXN",
  "vendor": null,
  "member_rfc": "XAXX010101000",
  "created_at": "2024-01-21T10:30:00Z",
  "pdf_url": null,
  "xml_url": null
}

Overview

Create an invoice (factura) from a receipt image within an organization context. This endpoint allows you to specify which member’s RFC to use for the invoice.
This operation requires 1 credit. Credits are deducted from the organization’s balance.

Request Body

receipt_image
string
required
Imagen del ticket codificada en Base64. Formatos soportados: JPEG, PNG.
cfdi_usage
string
required
Código de uso CFDI. Valores comunes:
  • G01 - Adquisición de mercancías
  • G02 - Devoluciones, descuentos o bonificaciones
  • G03 - Gastos en general
  • P01 - Por definir
expense_description
string
Descripción opcional del gasto. Ejemplo: Compra de equipo
rfc
string
required
The RFC (Mexican tax ID) of the organization member to generate the invoice for

Response

id
string
Unique invoice identifier
status
string
Invoice status. Values: pending, processing, completed, failed
amount
number
Invoice total amount (extracted from receipt)
currency
string
Currency code (e.g., MXN)
vendor
string
Vendor name (extracted from receipt)
member_rfc
string
RFC of the member the invoice was generated for
created_at
string
ISO 8601 timestamp of creation
pdf_url
string
URL to download the invoice PDF (available when status is completed)
xml_url
string
URL to download the invoice XML/CFDI (available when status is completed)
curl -X POST "https://api.usatimbre.com/api/timbre/facturar-ticket-org" \
  -H "Authorization: Bearer tmb_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "receipt_image": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
    "cfdi_usage": "G03",
    "expense_description": "Compra de equipo",
    "rfc": "XAXX010101000"
  }'
{
  "id": "inv_abc123",
  "status": "processing",
  "amount": null,
  "currency": "MXN",
  "vendor": null,
  "member_rfc": "XAXX010101000",
  "created_at": "2024-01-21T10:30:00Z",
  "pdf_url": null,
  "xml_url": null
}