arca.wsfe and arca.wsmtxca. Where the high-level issue() facade automatically derives the voucher type, reserves the next number, and handles indeterminate recovery, the exact layer keeps all of that control in your hands — you own the voucher number, you construct the full request, and you receive the raw fiscal evidence as returned by ARCA.
When to Use the Exact Layer
Usearca.wsfe or arca.wsmtxca directly when:
- You need a service-level method the facade does not expose, such as
getLastAuthorizedVoucherorgetServerStatus. - You need to issue a voucher in a currency, with a receiver, or with fiscal fields the
issue()facade does not support. - Your application owns its own voucher number sequence and you cannot let the SDK call
getNextVoucherNumberautomatically. - You want to read ARCA’s runtime reference catalogs (voucher types, VAT rates, currencies) rather than using static constants.
- You are building a custom workflow — for example, constructing the request in one step and authorizing it in another.
Builders
Before callingarca.wsfe.issue(), use a builder to construct the WsfeVoucherInput. Builders handle all fiscal arithmetic — net amounts, VAT, rounding — so you do not need to compute them manually.
buildFacturaB(input)
Derives a complete WsfeVoucherInput for a Factura B. Accepts integer minor units (centavos) as taxableAmount and performs VAT calculation using Round Half Even, matching ARCA’s documented rounding criterion.
BuildFacturaB input fields
BuildFacturaB input fields
number
required
Sales point number.
number
required
Concept type code. Use
ARCA_CONCEPT_TYPES.number
required
Receiver document type code. Use
ARCA_DOCUMENT_TYPES.number
required
Receiver document number. Pass
0 for consumidor final.number
required
Receiver VAT condition code. Use
ARCA_RECEIVER_VAT_CONDITIONS.string
required
Invoice date. Accepts
YYYY-MM-DD or YYYYMMDD.number
required
Taxable base amount in minor units (centavos). Must be a positive integer. When
vatRate is positive, the amount must produce at least one centavo of VAT after rounding.number
required
VAT rate as a percentage (
0, 2.5, 5, 10.5, 21, or 27)."ARS" | "USD"
default:"\"ARS\""
ISO currency code. The builder maps this to the ARCA currency ID internally.
string
Exchange rate as a decimal string. Required when
currency is not "ARS".buildFacturaC(input)
Same pattern as buildFacturaB, but constructs a Factura C with zero VAT. Accepts the same currency and exchange rate options.
arca.wsfe — WSFE Service
Issuance
wsfe.issue({ voucherNumber, data })
Sends a single WSFE FECAESolicitar request for the exact voucher number you supply. Returns a typed outcome: authorized, rejected, or indeterminate.
reason: "authentication_rejected" with typed evidence in the authentication field.
Voucher Queries
wsfe.getNextVoucherNumber({ salesPoint, voucherType })
Returns the next voucher number to use for the given sales point and voucher type. Call this immediately before authorizing if your number sequence may have moved since your last call.
wsfe.lookupVoucher({ number, salesPoint, voucherType })
Looks up a voucher at ARCA by coordinates. Returns the voucher summary or not_found (WSFE code 602). Use this after an indeterminate wsfe.issue() outcome to check whether the authorization actually went through.
wsfe.getVoucherInfo({ number, salesPoint, voucherType })
Returns full voucher detail from ARCA, or null if not found.
wsfe.getSalesPoints(input?)
Returns the list of sales points configured for the authenticated CUIT on WSFE. Accepts an optional { representedTaxId, forceRefresh } input object. Returns an empty list when no sales points are registered for web services (WSFE code 602).
Runtime Catalogs
These methods return live data from ARCA and are useful when the static constants infacturas/constants are not sufficient.
All authenticated catalog methods accept
forceRefresh: true to discard the cached WSAA ticket and request a fresh Token Authorization before the call. Pass this option when you know a ticket has expired or been invalidated externally.wsfe.getServerStatus()
Checks the WSFE backend health. Returns a status object from ARCA. Useful for health checks and operational dashboards.
arca.wsmtxca — WSMTXCA Service
WSMTXCA follows the same pattern as WSFE but adds full line-item encoding. Use it when your invoices require itemized breakdowns at the ARCA service level.
The facade also routes to WSMTXCA when you pass { service: "wsmtxca" } to arca.issue(). The exact layer is available for cases where you need to build the WsmtxcaIssueRequest yourself.
Methods
wsmtxca.issue({ data })
Issues a WSMTXCA voucher from a fully constructed WsmtxcaIssueRequest. Same outcome semantics as wsfe.issue() — one transport attempt, no automatic retries, typed indeterminate result.
wsmtxca.getLastAuthorizedVoucher({ voucherType, salesPoint })
Returns the last authorized voucher number. When no voucher has been issued for the given coordinates, WSMTXCA code 1502 returns 0.
wsmtxca.getVoucher({ voucherType, salesPoint, voucherNumber })
Returns full voucher detail. Returns not_found on WSMTXCA code 1503.
wsmtxca.lookupVoucher({ voucherType, salesPoint, voucherNumber })
Looks up a voucher at ARCA by coordinates. Returns the voucher summary or not_found on WSMTXCA code 1503. Use this after an indeterminate wsmtxca.issue() outcome to verify whether the authorization succeeded.
wsmtxca.getSalesPoints(input?)
Returns the sales points registered for the authenticated CUIT on WSMTXCA. Accepts an optional { representedTaxId, forceRefresh } input object.
All authenticated WSMTXCA methods accept
forceRefresh: true to renew the WSMTXCA WSAA ticket before the call.WsfeVoucherInput — Full Escape Hatch
When you need fiscal fields the facade and builders do not expose — exemptions, untaxed amounts, multiple VAT rates, or custom totals — construct a WsfeVoucherInput directly. Amounts use decimal values in major units (e.g., 100.00 for ARS 100); the SDK validates them locally and serializes them as canonical two-decimal strings before sending to ARCA.
Absence and Not-Found Semantics
Exact-layer absence handling varies by operation and service:Not-found codes by operation
Not-found codes by operation
Note: WSMTXCA code 602 is not an absence indicator — it remains an error.
Authentication Retry Behavior
Catalog and query operations (read-only methods) may retry once with a forced credential refresh after an explicit, typedArcaAuthenticationError. Issuance operations (wsfe.issue(), wsmtxca.issue()) never refresh credentials or retry automatically — any form of uncertainty results in an indeterminate outcome, not a retry.
Pass forceRefresh: true to any authenticated method to disable automatic authentication recovery for that call and force a fresh WSAA ticket request unconditionally.