inquireInvoice
Overview
The inquireInvoice command retrieves information about previously generated invoices from the EZcount system. This command allows merchants to fetch invoice data, download links, and status information for invoices created through the platform.
Use cases
Use inquireInvoice when you need to:
Retrieve the download link for a previously generated invoice
Check the status of an invoice created through
addCgInvoiceAccess invoice metadata such as invoice number and generation date
Obtain a merchant copy of the original customer invoice
Verify invoice details for reconciliation purposes
Request structure
The inquireInvoice command uses the following endpoint:
POST https://your-hyp-environment-url/xpo/Relay
HTTP request format
The request must be sent as a POST request with application/x-www-form-urlencoded content type, containing three required body parameters:
user
string
Your merchant username for API authentication
password
string
Your merchant password for API authentication
int_in
string
XML payload containing the command and parameters (see structure below)
XML request structure
Required parameters
Response structure
Success response example
Key Fields in Success Response:
invoiceResponseCode:100indicates successful invoice retrievalinvoiceResponseName: "Proper Invoice Request" confirms successinvoiceDocNumber: The invoice number in the EZcount systeminvoiceDocUrl: Direct download link for the invoice PDFinvoiceCreationCode:000indicates no errors during creationinvoiceCreationDate: When the invoice was generated
Error response example
Key Fields in Error Response:
Note that
resultis still000(API call succeeded)The actual error is in the invoice-specific fields:
invoiceResponseName: "Invoice not found" describes the errorinvoiceCreationCode:671is the specific invoice error codeMost fields are empty when the invoice is not found
Code examples
Error codes
General API error codes
000
Success
Invoice information retrieved successfully
325
Invalid XML format
Check XML structure and ensure all required fields are present
405
SSL HTTPS customers are not permitted to access the system
Verify username and password are correct
414
An XML field or an INT_IN parameter is too short/long
Check field lengths match API requirements
Invoice module error codes
Note: Invoice-specific errors are returned in the invoiceResponseCode and invoiceResponseName tags.
CG Gateway invoice error codes
668
Cannot Create Invoice
Invoice creation failed - check request parameters
669
Currency not supported for invoice creation
Only ILS (Israeli Shekel) invoices are supported
670
Invoice Validation Failed
Check invoice data for invalid values
671
Invoice not found
Verify the invoice identifier is correct and exists
Invoice vendor response codes
100
Success
Completed successfully
101
UsernameInvalid
Attempted transaction with invalid username
102
CompanyCodeAlreadyExists
Attempted to create a company with an existing company code
103
CompanyCodeDoesNotExist
Company code does not exist
104
CompanyCodeInvalidFormat
Company code format is not numeric
105
DocumentInvalidSubject
Subject line is invalid
106
DocumentDoesNotExit
Document number was not found
107
SendEmailAborted
E-mailing document failed
108
EmailInvalid
Invalid e-mail format
109
CultureInvalid
Invalid culture
110
KeyInvalid
Invalid key
111
AccountExpired
Account has expired
112
DocumentInvalidItemNumber
Multiple items in an invoice are in the wrong format
113
DocumentInvalidQuantity
Quantity format is not numeric
114
DocumentInvalidPrice
Price format is not numeric
116
DocumentDoesNotExistForSpecifiedCompany
The specified document doesn't exist or is incompatible with the company code provided
117
CurrencyConversionServiceNotAvailable
Currency conversion service is out of service
118
InvalidItemCode
Unacceptable item code
119
CurrencyInWrongFormat
Currency is not an integer
120
DocumentMissingItem
Quantity, price, description and code must match
121
DocumentInvalidDateFormatDDMMYY
Date format must be DDMMYY
122
PaymentAmountDoesntMatchInvoice
Total receivables must be positive
123
DocumentAmountInvalid
Amount must be double
124
CashInvalidAmount
Amount must be double
125
CheckInvalidAmount
Amount must be double
126
CCInvalidAmount
Amount must be double
127
TransInvalidAmount
Amount must be double
128
CheckInvalidDateFormatDDMMYY
Date format must be DDMMYY
129
CCInvalidDateFormatDDMMYY
Date format must be DDMMYY
130
TransInvalidDateFormatDDMMYY
Date format must be DDMMYY
131
PaymentTotalMustBeEqualToInvoiceTotal
Payment total must be equal to invoice total
132
TaxRateInTheDocsIsNotEqual
Tax rate in the docs is not equal
133
ClientCompanyNameAlreadyExists
Client company name already exists
134
ClientTicketAlreadyExists
Client ticket already exists
Related commands
addCgInvoice- Create new invoicesrefundCgInvoice- Process invoice refundsdoDeal- Process payments with automatic invoice generation
Best practices
Use invoiceAtranId when available - This is the most reliable identifier for invoice queries
Store invoice identifiers - Keep track of invoiceAtranId returned from addCgInvoice for future queries
Handle not found errors gracefully - Invoices may be deleted or expired in the EZcount system
Use for reconciliation - Regular invoice queries help maintain accurate financial records
Monitor invoice status - Check invoice status to ensure proper delivery to customers
Last updated
Was this helpful?