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

# Mexico: fields and invoice flow

> Add Mexican CFDI fields to the shared customer and invoice structure.

Use this guide when **the issuing business is configured for Mexican invoicing**.
Start with [shared fields](/concepts/shared-fields), then add the recipient's Mexican
fiscal data. The examples below describe the API's CFDI flow.

## Before the first invoice

Complete [issuer setup](/concepts/issuer-setup#mexico) for the intended team and environment.
The owner must supply a valid CSD and complete the invoicing connection. The
[team SAT connection guide](/guides/teams#upload-sat-csd-certificates) documents certificate upload.
Use a test key and the synthetic fiscal customer from the recipe for the first practice run.

## Customer fields

| Field | Mexican meaning | Example |
| - | - | - |
| `tax_id` | Recipient RFC | Use the recipient's registered RFC |
| `legal_name` | Registered name / razón social | Use the registered name |
| `tax_system` | Recipient's SAT fiscal regime code | `601` in the test fixture |
| `address.zip` | Fiscal postal code, as a string | `"42501"` in the test fixture |
| `address.country` | Recipient country | `"MEX"` for a domestic recipient |
| `use` | Intended Uso CFDI | `"G03"` in the tutorial |

The [customer recipe](/recipes/customer#test-fiscal-customer) includes a complete test
fixture. Its example values are not defaults for your own customers.
Creating a contact alone does not establish fiscal validity; inspect
`fiscal_validation` when returned.

## Invoice fields

| Field | Mexican meaning | Tutorial example |
| - | - | - |
| `use` | Uso CFDI for this invoice | `"G03"` |
| `payment_method` | Payment timing | `"PUE"` or `"PPD"` |
| `payment_form` | SAT payment instrument code | `"03"` for a transfer; `"99"` in the PPD example |
| `items[].product_key` | SAT product/service classification | `"80101500"` for the consulting example |
| `items[].unit_key` | SAT unit code | `"E48"` in the consulting example |
| `items[].taxes` | Applicable tax type, rate, inclusion, and withholding | The tutorial uses `IVA` with rate `0.16` |
| `currency`, `exchange_rate` | Invoice currency and conversion | `"MXN"`, `1` in the tutorial |

Choose the fiscal codes and taxes that match the actual sale. The tutorial's 16% IVA
example is not a universal rate. Use the **Mexico · SAT catalogs** section for code lists.

## Follow a complete example

* [CFDI in five minutes](/concepts/invoicing): documents and payment timing explained through one sale.
* [Draft, preview, and issue](/recipes/invoice): review before issuance, then retrieve XML and PDF.
* [Invoice now, get paid later](/recipes/paid-later): PPD, partial payments, and payment complements.
* [Create an invoiceable receipt](/recipes/receipt): the customer requests their invoice later.
* [Issue a credit note](/recipes/credit-note): adjust the fiscal document without assuming a refund.
* [Cancel and verify a CFDI](/recipes/cancellation): separate a submitted cancellation from its final state.
* [Record or request a refund](/recipes/refund): distinguish refund records from returning money.

These Mexico recipes were exercised in staging with `livemode: false`. See
[verification coverage](/verification) for the operations, observed responses, and limits.
They do not establish equivalent behavior for another country's provider.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.