curl -X GET "https://app.usatimbre.com/api/timbre/invoice?org_id=org_123456&invoice_id=inv_abc123" \
-H "Authorization: Bearer tmb_your_api_key_here"
const params = new URLSearchParams({
org_id: 'org_123456',
invoice_id: 'inv_abc123'
});
const response = await fetch(`https://app.usatimbre.com/api/timbre/invoice?${params}`, {
headers: {
'Authorization': 'Bearer tmb_your_api_key_here'
}
});
const invoice = await response.json();
import requests
response = requests.get(
'https://app.usatimbre.com/api/timbre/invoice',
params={
'org_id': 'org_123456',
'invoice_id': 'inv_abc123'
},
headers={'Authorization': 'Bearer tmb_your_api_key_here'}
)
invoice = response.json()
{
"id": "inv_abc123",
"status": "completed",
"amount": 1740.00,
"subtotal": 1500.00,
"tax": 240.00,
"currency": "MXN",
"vendor": {
"name": "Restaurant XYZ S.A. de C.V.",
"rfc": "RXY123456ABC",
"address": "Av. Reforma 123, CDMX"
},
"cfdi_usage": "G03",
"uuid": "6B8F9D3A-1234-5678-90AB-CDEF12345678",
"created_at": "2024-01-20T15:30:00Z",
"completed_at": "2024-01-20T15:35:00Z",
"pdf_url": "https://app.usatimbre.com/invoices/inv_abc123.pdf",
"xml_url": "https://app.usatimbre.com/invoices/inv_abc123.xml",
"receipt_image_url": "https://app.usatimbre.com/receipts/inv_abc123.jpg"
}
{
"error": "Not Found",
"message": "Invoice not found"
}
API Timbre (Facturas)
Get Invoice Details
Get invoice details including PDF/XML URLs
GET
/
api
/
timbre
/
invoice
curl -X GET "https://app.usatimbre.com/api/timbre/invoice?org_id=org_123456&invoice_id=inv_abc123" \
-H "Authorization: Bearer tmb_your_api_key_here"
const params = new URLSearchParams({
org_id: 'org_123456',
invoice_id: 'inv_abc123'
});
const response = await fetch(`https://app.usatimbre.com/api/timbre/invoice?${params}`, {
headers: {
'Authorization': 'Bearer tmb_your_api_key_here'
}
});
const invoice = await response.json();
import requests
response = requests.get(
'https://app.usatimbre.com/api/timbre/invoice',
params={
'org_id': 'org_123456',
'invoice_id': 'inv_abc123'
},
headers={'Authorization': 'Bearer tmb_your_api_key_here'}
)
invoice = response.json()
{
"id": "inv_abc123",
"status": "completed",
"amount": 1740.00,
"subtotal": 1500.00,
"tax": 240.00,
"currency": "MXN",
"vendor": {
"name": "Restaurant XYZ S.A. de C.V.",
"rfc": "RXY123456ABC",
"address": "Av. Reforma 123, CDMX"
},
"cfdi_usage": "G03",
"uuid": "6B8F9D3A-1234-5678-90AB-CDEF12345678",
"created_at": "2024-01-20T15:30:00Z",
"completed_at": "2024-01-20T15:35:00Z",
"pdf_url": "https://app.usatimbre.com/invoices/inv_abc123.pdf",
"xml_url": "https://app.usatimbre.com/invoices/inv_abc123.xml",
"receipt_image_url": "https://app.usatimbre.com/receipts/inv_abc123.jpg"
}
{
"error": "Not Found",
"message": "Invoice not found"
}
Overview
Retrieve detailed information about a specific invoice, including download URLs for the PDF and XML (CFDI) files.Query Parameters
string
required
The unique identifier of the organization
string
required
The unique identifier of the invoice
Response
string
Unique invoice identifier
string
Invoice status. Values:
pending, processing, completed, failednumber
Invoice total amount
number
Invoice subtotal (before taxes)
number
Tax amount (IVA)
string
Currency code (e.g.,
MXN)object
string
CFDI usage code used
string
SAT UUID (Folio Fiscal) - unique identifier assigned by SAT
string
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of completion (null if not completed)
string
URL to download the invoice PDF
string
URL to download the invoice XML (CFDI)
string
URL of the original receipt image
curl -X GET "https://app.usatimbre.com/api/timbre/invoice?org_id=org_123456&invoice_id=inv_abc123" \
-H "Authorization: Bearer tmb_your_api_key_here"
const params = new URLSearchParams({
org_id: 'org_123456',
invoice_id: 'inv_abc123'
});
const response = await fetch(`https://app.usatimbre.com/api/timbre/invoice?${params}`, {
headers: {
'Authorization': 'Bearer tmb_your_api_key_here'
}
});
const invoice = await response.json();
import requests
response = requests.get(
'https://app.usatimbre.com/api/timbre/invoice',
params={
'org_id': 'org_123456',
'invoice_id': 'inv_abc123'
},
headers={'Authorization': 'Bearer tmb_your_api_key_here'}
)
invoice = response.json()
{
"id": "inv_abc123",
"status": "completed",
"amount": 1740.00,
"subtotal": 1500.00,
"tax": 240.00,
"currency": "MXN",
"vendor": {
"name": "Restaurant XYZ S.A. de C.V.",
"rfc": "RXY123456ABC",
"address": "Av. Reforma 123, CDMX"
},
"cfdi_usage": "G03",
"uuid": "6B8F9D3A-1234-5678-90AB-CDEF12345678",
"created_at": "2024-01-20T15:30:00Z",
"completed_at": "2024-01-20T15:35:00Z",
"pdf_url": "https://app.usatimbre.com/invoices/inv_abc123.pdf",
"xml_url": "https://app.usatimbre.com/invoices/inv_abc123.xml",
"receipt_image_url": "https://app.usatimbre.com/receipts/inv_abc123.jpg"
}
{
"error": "Not Found",
"message": "Invoice not found"
}
Invoice Status
| Status | Description |
|---|---|
pending | Invoice request received, waiting to be processed |
processing | Receipt is being analyzed and invoice is being generated |
completed | Invoice generated successfully, PDF and XML available |
failed | Invoice generation failed (check error details) |
For
processing status, poll this endpoint every few seconds until the status changes to completed or failed.