The complete flow for API Web
Step 1 — Manage places of issue
Before invoicing, you need to add your business’s place of issue / branch office; this procedure is done only once.ZipCode, since you will use it as the place of issue in the main request.
Step 2 — Issue the CFDI
Id from the Response, since you will use it for the following operations.
Step 3 — Download PDF / XML
Once issued, download the PDF and XML:Step 4 — Send by email
You can send the PDF and XML by email:Step 5 — Cancellation (if applicable)
Cancellation with motive 0201— Receipt issued with errors with a related document02— Receipt issued with errors without a related document03— The transaction did not take place04— Nominative transaction related in the global invoice
API Web vs Multi-issuer API
Checklist before going to production
1
Verify your production account
Create an account at app.facturama.mx, or sign in and verify that your account has an active subscription.
2
Purchase the API annual license
Purchase the API annual license from the shopping cart to enable access to the production API.
3
Upload your Digital Seal Certificate (CSD)
Upload your Digital Seal Certificate (
.cer and .key) files. This is required to issue CFDIs in production.4
Update the base URL
Change the base URL from
https://apisandbox.facturama.mx to https://api.facturama.mx. No other code changes are required.5
Issue a real CFDI
Create a real invoice for a small amount (for example, MXN $1.00) and verify that it appears in the SAT portal.
6
Recommended: Configure error handling
Implement retries with exponential backoff for temporary SAT 5xx errors.