> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cadanapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Statutory Remittance

> Pay government authorities through local payment rails with automatic FX conversion

export const ApiExample = ({method = "GET", path, params, body, reference, tenantKey}) => {
  const baseUrl = "https://api.cadanapay.com";
  const query = params ? "?" + Object.entries(params).map(([k, v]) => `${k}=${v}`).join("&") : "";
  const url = `${baseUrl}${path}${query}`;
  const isPlatformPath = (/^\/(v1\/)?platform(\/|$)/).test(path || "");
  const includeTenantKey = tenantKey === undefined ? !isPlatformPath : tenantKey;
  let curl = `curl -X ${method} '${url}' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'`;
  if (includeTenantKey) {
    curl += ` \\\n  -H 'X-MultiTenantKey: YOUR_BUSINESS_TENANT_KEY'`;
  }
  if (body) {
    const formatted = JSON.stringify(body, null, 2);
    curl += ` \\\n  -H 'Content-Type: application/json' \\\n  -d '${formatted}'`;
  }
  return <div>
      <CodeBlock language="bash" filename="bash" wrap>
        {curl}
      </CodeBlock>
      {reference && <div style={{
    marginTop: "-0.5rem",
    marginBottom: "1rem"
  }}>
          <a href={reference} style={{
    fontSize: "0.875rem"
  }}>
            Try it in the playground →
          </a>
        </div>}
    </div>;
};

<Note>
  **Beta** — this functionality is fully supported today: statutory obligations are calculated, withheld, filed, and remitted for you as part of [Cadana's payroll process](/workforce/pay-workers-via-payroll). What's in beta is the standalone API surface on this page, which puts filings and remittances under your direct, self-serve control. Contact Cadana to enable it for your business.
</Note>

Cadana remits payroll taxes and statutory contributions to government authorities on your behalf. Every remittance is tied to an `accepted` filing — whether [Cadana prepared the filing](/statutory/filing) (`source: cadana`) or you filed it yourself and submitted the totals to Cadana (`source: external`). Cadana debits your business balance, converts FX if needed, and routes the payment through local rails.

***

## How It Works

<Steps>
  <Step title="Filing is in accepted status">
    Every remittance points at one or more `accepted` filings. For `source: cadana` filings Cadana drives the filing through `accepted` itself; for `source: external` filings the customer creates them directly in `accepted` after filing with the authority.
  </Step>

  <Step title="Create the remittance">
    Specify which filings to pay and the currency to fund from. Optionally provide `paymentDetails` (same shape as a beneficiary in Embedded Payments) to route the payment to a bank account you specify — otherwise Cadana uses its internal default routing for the authority.
  </Step>

  <Step title="Cadana converts and pays">
    Cadana handles FX conversion (if needed) and delivers the payment to the government account via local rails. The filing's `filingReference` is used as the bank attribution reference (or override it with `paymentReference` on the remittance).
  </Step>

  <Step title="Download receipt">
    Once the payment is confirmed, download the receipt for your audit trail.
  </Step>
</Steps>

***

## Remittance-Only Walkthrough (External Filing)

Use this flow when you file statutory returns with the authority yourself and just need Cadana to remit the payments. The data you'd normally collect in an internal Excel workbook — totals, government references, per-employee breakdowns, bank routing — maps directly to the API.

### Scenario

Your Mexican business closes February 2026 payroll with 15 employees. You've already filed all four returns through the government portals and received a Línea de Captura for each:

| Filing                    | Authority   | Total (MXN) | Línea de Captura     |
| :------------------------ | :---------- | ----------: | :------------------- |
| ISR Withholding           | SAT         |   82,345.00 | `0123456ABCD7890EF`  |
| IMSS Contributions        | IMSS        |   45,123.00 | `9876543ZYXW1234AB`  |
| INFONAVIT Contributions   | INFONAVIT   |   18,400.00 | `1122334455667788CD` |
| ISN Payroll Tax (Jalisco) | State (JAL) |    6,250.00 | `JAL-2026-02-PTR123` |

### Step 1: Create an External-Source Filing

For each return, create a filing with `source: external`. Provide the total, the Línea de Captura as `filingReference`, and a per-employee `breakdown` — Cadana stores the breakdown so each remittance can be reconciled back to specific workers without those workers needing person records in Cadana.

<ApiExample
  method="POST"
  path="/v1/statutory/filings"
  body={{
businessId: "biz_01ABC",
countryCode: "MX",
source: "external",
filingTypeId: "ft_mx_isr_monthly",
periodStart: "2026-02-01",
periodEnd: "2026-02-28",
currency: "MXN",
filingReference: "0123456ABCD7890EF",
breakdown: [
  { externalEmployeeId: "EMP-00142", employeeName: "María García López", amount: 5489.67 },
  { externalEmployeeId: "EMP-00143", employeeName: "Juan Pérez Rivera",  amount: 6121.40 },
  { externalEmployeeId: "EMP-00144", employeeName: "Ana Hernández",      amount: 4998.20 }
]
}}
  reference="/api-reference/statutory/filings/create-a-filing"
/>

**Response:**

```json theme={null}
{ "id": "fil_01JKL" }
```

The filing is created directly in `accepted` — there's no review or submission step on Cadana's side because you've already submitted the return to SAT. Repeat this call once for each of the other three returns (IMSS, INFONAVIT, ISN).

<Tip>
  Identify workers in `breakdown` using `externalEmployeeId` (your own ID) when they're not onboarded into Cadana, or `personId` when they are. For business-level taxes that aren't allocated per employee, a breakdown line can omit both — just `amount`.
</Tip>

### Step 2: Create the Remittance

Once all four filings exist, create remittances against them. You can batch filings to the same authority into one remittance, or create them one-by-one — whichever matches the bank transfers you're going to fund.

The example below shows the ISR remittance with a customer-provided CLABE as the destination. The CLABE goes under `paymentDetails.bank.accountNumber` — the same shape used for beneficiaries in the [Embedded Payments API](/payments/overview). The Línea de Captura supplied on the filing is automatically used as the bank reference unless you override it with `paymentReference`.

<ApiExample
  method="POST"
  path="/v1/statutory/remittances"
  body={{
businessId: "biz_01ABC",
countryCode: "MX",
filingIds: ["fil_01JKL"],
fundFromCurrency: "USD",
paymentDetails: {
  preferredMethod: "bank",
  bank: {
    accountName: "SAT — ISR Federal Treasury",
    accountNumber: "012345678901234567",
    bankName: "BBVA México",
    bankCode: "012",
    currency: "MXN"
  }
}
}}
  reference="/api-reference/statutory/remittances/create-a-remittance"
/>

**Response:**

```json theme={null}
{ "id": "rem_01STU" }
```

<Note>
  Omit `paymentDetails` to use Cadana's internal default routing for the authority. Provide it when you want to specify the routing yourself — useful when you manage your own statutory-payment account mapping. The `paymentDetails` shape is the same `paymentMethods` object used by vendor payments and beneficiaries elsewhere in the API, so the routing primitives (`bank`, `momo`) work the same way across products.
</Note>

### Step 3: Track and Reconcile

Fetch the remittance to see the FX conversion, the destination Cadana used, and the lifecycle:

<ApiExample method="GET" path="/v1/statutory/remittances/rem_01STU" reference="/api-reference/statutory/remittances/get-a-remittance" />

**Response:**

```json theme={null}
{
  "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",
  "paymentDetails": {
    "preferredMethod": "bank",
    "bank": {
      "accountName": "SAT — ISR Federal Treasury",
      "accountNumber": "012345678901234567",
      "bankName": "BBVA México",
      "bankCode": "012",
      "currency": "MXN"
    }
  },
  "paymentReference": "0123456ABCD7890EF",
  "receiptUrl": "https://api.cadanapay.com/v1/statutory/remittances/rem_01STU/receipt",
  "createdAt": 1741590000
}
```

`paymentReference` echoes the value Cadana attached to the transfer — defaulted from the filing's `filingReference` (Línea de Captura) unless you overrode it explicitly on the remittance.

***

## After-Filing Walkthrough (Cadana Filing)

When Cadana prepared and submitted the filing (`source: cadana`), the remittance step is simpler — there's no destination to specify and Cadana already knows the period reference. Once the filing reaches `accepted`, create the remittance with just the filing IDs and the funding currency:

<ApiExample method="POST" path="/v1/statutory/remittances" body={{ businessId: "biz_01ABC", countryCode: "MX", filingIds: ["fil_01JKL"], fundFromCurrency: "USD" }} reference="/api-reference/statutory/remittances/create-a-remittance" />

<Tip>
  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 `fundFromCurrency` to `"MXN"`.
</Tip>

***

## Remittance Statuses

| Status       | Description                                            |
| :----------- | :----------------------------------------------------- |
| `pending`    | Payment initiated, awaiting processing                 |
| `processing` | Payment is being processed through local payment rails |
| `completed`  | Payment delivered to the government authority          |
| `failed`     | Payment failed — check the error details and retry     |

<Note>
  The status progresses: `pending` → `processing` → `completed`. Listen for the `remittance.completed` webhook event to be notified, or poll [`GET /v1/statutory/remittances/{id}`](/api-reference/statutory/remittances/get-a-remittance).
</Note>

***

## Download Receipt

Once the remittance is `completed`, download the receipt for your audit trail:

<ApiExample method="GET" path="/v1/statutory/remittances/rem_01STU/receipt" reference="/api-reference/statutory/remittances/download-remittance-receipt" />

The receipt is returned as a PDF containing the authority's confirmation of payment, the amount, and the filing reference number.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Statutory Filing" icon="file-lines" href="/statutory/filing">
    Create Cadana-prepared or external filings before remitting
  </Card>

  <Card title="The Full Loop" icon="arrows-rotate" href="/statutory/the-full-loop">
    See filing and remittance together in an end-to-end walkthrough
  </Card>

  <Card title="Getting Started" icon="rocket" href="/statutory/getting-started">
    Discover jurisdictions, required fields, and requirements
  </Card>

  <Card title="Remittance API Reference" icon="code" href="/api-reference/statutory">
    Full endpoint documentation
  </Card>
</CardGroup>
