Skip to content

AfipQueryInvoice

Queries Argentina’s AFIP for the complete data of an already-authorized voucher. Lets you verify the CAE, total amount, and CAE expiry date for any voucher issued from a given point of sale.

FieldTypeRequiredDescription
credentials_idcredentialsYesAFIP SDK server credential
voucher_typeselectNoType: 1=Invoice A, 6=Invoice B, 11=Invoice C (default: 6)
point_of_salenumberYesPoint of sale number
voucher_numbernumberYesVoucher number to query

Requires an afip credential type:

  • Server URL: URL of the AFIP SDK server
  • Token: Authentication token (optional)
  • CUIT: Tax ID of the company
  • Environment: homologation or production
{
"success": true,
"cae": "71234567890123",
"cae_fch_vto": "20251231",
"voucher_number": 42,
"voucher_type": 6,
"point_of_sale": 1,
"total_amount": 1210.00,
"raw": { ... }
}
{
"credentials_id": "cred-afip-prod",
"voucher_type": "6",
"point_of_sale": "1",
"voucher_number": "42"
}

Query the last voucher (chained with AfipGetLastVoucher)

Section titled “Query the last voucher (chained with AfipGetLastVoucher)”

The voucher_number field can take the value from data.last_voucher of the previous node:

{
"credentials_id": "cred-afip-prod",
"voucher_type": "6",
"point_of_sale": "1"
}

In this case voucher_number is read from data.last_voucher if not explicitly configured.

  • If voucher_number is 0 or no valid number is provided, the node returns an error
  • The raw field contains the full SDK server response for debugging
  • Useful for reprinting invoices or verifying authorizations in reconciliation processes