Every payroll run triggers statutory obligations — taxes, social security, housing contributions. The Statutory Compliance API turns these into a four-phase cycle: calculate, file, remit, prove. This guide walks through all four phases with a real-world scenario.
Scenario
Your business biz_01ABC runs payroll in Mexico for 15 employees. February 2026 payroll closes on February 28, producing four statutory filings:
| Filing | Authority | Due Date |
|---|
| ISR (Income Tax Withholding) | SAT (Servicio de Administracion Tributaria) | March 17, 2026 |
| IMSS (Social Security) | IMSS (Instituto Mexicano del Seguro Social) | March 17, 2026 |
| INFONAVIT (Housing Fund) | INFONAVIT | March 17, 2026 |
| ISN (Payroll Tax) | State Treasury | March 17, 2026 |
Step 1: Batch Create Filings from Payroll
After the payroll run completes, create all required filings for the period in a single call. Cadana automatically determines which filings are required based on the country, business registrations, and employee profiles.
Response:
{
"data": [
{ "id": "fil_01JKL" },
{ "id": "fil_02MNO" },
{ "id": "fil_03PQR" },
{ "id": "fil_04STU" }
]
}
Filing Detail: ISR
Each filing contains a full breakdown of amounts and their legislative basis. Retrieve the ISR filing to inspect the detail:
Response:
{
"id": "fil_01JKL",
"businessId": "biz_01ABC",
"filingTypeId": "ft_mx_isr_monthly",
"filingTypeName": "ISR Withholding",
"authorityId": "auth_mx_sat",
"authorityName": "SAT",
"countryCode": "MX",
"period": {
"start": "2026-02-01",
"end": "2026-02-28",
"label": "February 2026"
},
"status": "pending",
"dueAt": "2026-03-17",
"amounts": {
"currency": "MXN",
"totalTax": 82345.00,
"employerContributions": 20000.00,
"employeeDeductions": 62345.00
},
"lineItems": [
{
"description": "ISR withholding - monthly table",
"amount": 68902.00
},
{
"description": "ISR withholding - subsidy adjustment",
"amount": -6557.00
},
{
"description": "ISR on supplementary payments",
"amount": 20000.00
}
],
"payrollRunIds": ["pr_01MNO"],
"createdAt": "2026-03-01T08:00:00Z",
"updatedAt": "2026-03-01T08:00:00Z"
}
Each lineItem contains a description and amount as a bare decimal number. All amounts in the API use regular decimal values (e.g., 82345.00), not lowest-denomination integers.
Step 2: Review and Approve
Before Cadana submits a filing to the authority, it must be approved. This gives your finance team a chance to review the amounts.
Check Filing Status
Approve the Filing
Once reviewed, approve it for submission:
Response:
{
"id": "fil_01JKL",
"filingTypeId": "ft_mx_isr_monthly",
"filingTypeName": "ISR Withholding",
"authorityId": "auth_mx_sat",
"authorityName": "SAT",
"status": "approved",
"dueAt": "2026-03-17",
"amounts": {
"currency": "MXN",
"totalTax": 82345.00,
"employerContributions": 20000.00,
"employeeDeductions": 62345.00
},
"statusHistory": [
{
"from": "pending",
"to": "in_review",
"timestamp": "2026-03-05T14:00:00Z"
},
{
"from": "in_review",
"to": "approved",
"timestamp": "2026-03-05T14:30:00Z"
}
]
}
Once approved, the filing is queued for submission. Review amounts carefully before approving — reversals require contacting the tax authority directly.
Step 3: Filing Submitted and Accepted
After approval, Cadana submits the filing to the relevant authority. The filing status transitions through submitted and then to accepted once the authority confirms receipt.
Poll the filing or listen for the filing.accepted webhook event:
{
"id": "fil_01JKL",
"filingTypeId": "ft_mx_isr_monthly",
"filingTypeName": "ISR Withholding",
"authorityId": "auth_mx_sat",
"authorityName": "SAT",
"status": "accepted",
"dueAt": "2026-03-17",
"amounts": {
"currency": "MXN",
"totalTax": 82345.00,
"employerContributions": 20000.00,
"employeeDeductions": 62345.00
},
"submittedAt": "2026-03-05T15:00:00Z",
"acceptedAt": "2026-03-05T15:02:30Z",
"document": {
"type": "acknowledgement",
"url": "https://api.cadanapay.com/v1/statutory/filings/fil_01JKL/document",
"description": "SAT electronic acknowledgement of receipt"
},
"statusHistory": [
{ "from": "pending", "to": "in_review", "timestamp": "2026-03-05T14:00:00Z" },
{ "from": "in_review", "to": "approved", "timestamp": "2026-03-05T14:30:00Z" },
{ "from": "approved", "to": "submitted", "timestamp": "2026-03-05T15:00:00Z" },
{ "from": "submitted", "to": "accepted", "timestamp": "2026-03-05T15:02:30Z" }
]
}
Step 4: Create Remittance
Once a filing is accepted, pay the authority. Cadana handles FX conversion and routes the payment to the correct government account.
Response:
When you fund from a different currency than the filing currency, Cadana automatically converts at the current rate. The fundedAmount shows exactly how much will be debited from your wallet, and fxRate shows the conversion rate applied. You can also fund in the local currency by setting fundedCurrency to "MXN".
Step 5: Proof of Payment
After the remittance is processed, retrieve the proof of payment for your records.
Check Remittance Status
Response:
{
"id": "rem_01STU",
"businessId": "biz_01ABC",
"filingIds": ["fil_01JKL"],
"status": "completed",
"countryCode": "MX",
"amount": 82345.00,
"fundedAmount": 4574.80,
"fundedCurrency": "USD",
"fxRate": 18.001,
"authorityId": "auth_mx_sat",
"authorityName": "SAT",
"paymentMethod": "local_rails",
"paymentReference": "REF-2026-0310-001",
"receiptUrl": "https://api.cadanapay.com/v1/statutory/remittances/rem_01STU/receipt",
"createdAt": "2026-03-10T09:00:00Z"
}
Download Receipt
The receipt is returned as a PDF document containing the authority’s confirmation of payment, the amount, and the filing reference number.
Step 6: Verify the Loop is Closed
After processing all four filings, check the overall status for the period:
Response:
{
"data": [
{
"id": "fil_01JKL",
"filingTypeId": "ft_mx_isr_monthly",
"filingTypeName": "ISR Withholding",
"status": "accepted",
"amounts": { "currency": "MXN", "totalTax": 82345.00, "employerContributions": 20000.00, "employeeDeductions": 62345.00 },
"remittanceId": "rem_01STU"
},
{
"id": "fil_02MNO",
"filingTypeId": "ft_mx_imss_monthly",
"filingTypeName": "IMSS Contributions",
"status": "accepted",
"amounts": { "currency": "MXN", "totalTax": 45123.00, "employerContributions": 45123.00, "employeeDeductions": 0 },
"remittanceId": "rem_02VWX"
},
{
"id": "fil_03PQR",
"filingTypeId": "ft_mx_infonavit_monthly",
"filingTypeName": "INFONAVIT Contributions",
"status": "approved",
"amounts": { "currency": "MXN", "totalTax": 18750.00, "employerContributions": 18750.00, "employeeDeductions": 0 },
"dueAt": "2026-03-17"
},
{
"id": "fil_04STU",
"filingTypeId": "ft_mx_isn_monthly",
"filingTypeName": "ISN Payroll Tax",
"status": "pending",
"amounts": { "currency": "MXN", "totalTax": 9375.00, "employerContributions": 9375.00, "employeeDeductions": 0 },
"dueAt": "2026-03-17"
}
],
"summary": {
"total": 4,
"accepted": 2,
"approved": 1,
"pending": 1,
"blocked": 0
}
}
Full Timeline
Here is the complete sequence of events for the ISR filing, from payroll close to proof of payment:
| Date | Event | Status |
|---|
| Mar 1 | Payroll run pr_01MNO closes; batch filing created | pending |
| Mar 5 | Finance team reviews and approves ISR filing | approved |
| Mar 5 | Cadana submits to SAT | submitted |
| Mar 5 | SAT confirms receipt | accepted |
| Mar 10 | Remittance created; USD converted to MXN | processing |
| Mar 10 | Payment delivered to SAT | completed |
| Mar 10 | Receipt downloaded for records | — |
Alternative: External Payroll
If you run payroll outside of Cadana, you can still use the Statutory Compliance API by providing the filing details explicitly instead of referencing a payroll run.
This is the unbundled model — you provide the calculated amounts and Cadana handles filing, remittance, and proof. Use payrollRunIds when Cadana runs your payroll (bundled), or filings when you calculate externally (unbundled). Both follow the same approve-file-remit-prove cycle after creation.
Next Steps