facturas SDK covers WSMTXCA with exactly the same high-level methods as WSFE: issue(), issueCreditNote(), issueDebitNote(), preview(), previewCreditNote(), and previewDebitNote(). You never build SOAP arrays manually — the SDK handles both encodings.
Opt in per call
Pass{ service: "wsmtxca" } as the second argument to any issuance or preview method. The SDK never switches services automatically — not after a rejection, not after a timeout, and not based on invoice content.
service option, or with { service: "wsfe" }, the call goes to WSFE. The TypeScript return type narrows to the chosen service: with { service: "wsmtxca" }, result.request and result.sent carry WSMTXCA-specific types without any casts.
The details array
Add a details array to your input to supply line-item breakdown. Each element represents one line on the invoice.
string
required
Human-readable description of the product or service.
number
required
Quantity of units.
number
required
ARCA unit-of-measure code (e.g.
7 for units).string
required
Unit price as a decimal string in major currency units with up to six decimal places (e.g.
"100.000000"). This is the only monetary field in the SDK that is not an integer number of centavos.number
required
ARCA VAT condition code for this item (e.g.
5 for 21%).number
VAT amount for this item in integer centavos. Required for Class A invoices.
number
required
Total line amount including VAT, in integer centavos.
number
Optional discount amount in integer centavos.
string
Optional product or service code.
string
Optional ARCA matrix code.
number
Optional matrix unit quantity.
unitPrice is the only monetary exception in the SDK. Every other amount — vatAmount, amount, discount, header totals — is an integer in centavos. unitPrice is a decimal string in major units (e.g. pesos) to preserve the vendor’s full price precision, which can have up to six decimal places.Totals must reconcile
Itemamount values include VAT. The sum of your details items must reconcile with the fiscal header totals you supply through the items or amounts fields — the same fields WSFE uses. The details array adds line-item detail to the voucher; it does not replace the fiscal breakdown.
Full example
Previewing a WSMTXCA request
Callpreview() with { service: "wsmtxca" } to inspect the full WSMTXCA request the SDK would send, without reserving a voucher number or contacting ARCA:
include: { exactInput: true } to issue(). The result.sent field will contain the WSMTXCA request object.
FCE invoices
Electronic credit invoices (FCE) work the same way across both WSFE and WSMTXCA. Supplyfce: { cbu, alias?, transfer?, reference? } on the invoice and fce: { annulment, reference? } on the credit note — the SDK translates the fields to the correct encoding for each service:
Do not duplicate these entries through
optionalFields when you are already using the fce option — the SDK populates them automatically.
Idempotency and retries
WSMTXCA reservations are stored asv: 2 records in your store and always carry the provider name. A reservation written by a WSMTXCA call cannot be replayed through WSFE — this prevents a rollback to an older SDK version from silently re-sending an itemized invoice as a header-only WSFE voucher.
On a retry, WSMTXCA evidence verification compares the full line-item detail, not just the header total. If the lookup returns incomplete evidence, the result is indeterminate and nothing is re-sent.
For direct access to the lower-level client.wsmtxca methods — issue(), getLastAuthorizedVoucher(), getVoucher() — see the Exact Layer reference.