Validate Invoice Payment

View as Markdown
Validates an invoice before online payment starts or before final confirmation. Required query params: `invoiceNo`, `amount`, `currencyPaid` currency ObjectId, `type` (`start` or `confirm`), `processor` (`paystack`, `Paypal`, or `authorize.net`), `partPaymentFromWalletBalanceBefore`, `partPaymentFromWalletBalanceCurrent`. Response fields: `verStatus` boolean, `verType`, `cloneId` when `type=start`, `invoice` document. If invalid invoice state, response may contain `verStatus:false`, `error`, and `invoice`. Possible errors: - 400: Missing One or More Required Parameters - invoice validation query is incomplete. - 400: You must set a billing address before you proceed - billing address missing. - 404: Invoice not found - invoice number does not belong to the customer. - 400: Wrong Currency - `currencyPaid` does not match invoice currency. - 400: Payment method is disabled - requested processor is not active for the currency. - 400: Wrong Amount - amount does not match invoice payable amount. - 200: Bad Invoice response - `verStatus:false` when invoice is already paid or in bad payment state. - 400: Missing One or More Required Parameters - required body/query fields were not supplied. - 401: Unauthorized - token is missing, expired, invalid, or the account/token pair was not found. - 403: Access denied - gateway traffic guard/rate policy blocked the request. - 429: Too many requests - gateway rate limit exceeded. - 500: Unexpected Error - unhandled gateway or downstream service failure.

Query parameters

invoiceNointegerOptional

Query parameter supported by the gateway/downstream service.

amountintegerOptional

Query parameter supported by the gateway/downstream service.

currencyPaidstringOptional

Query parameter supported by the gateway/downstream service.

typestringOptional

Query parameter supported by the gateway/downstream service.

processorstringOptional

Query parameter supported by the gateway/downstream service.

partPaymentFromWalletBalanceBeforeintegerOptional

Query parameter supported by the gateway/downstream service.

partPaymentFromWalletBalanceCurrentintegerOptional

Query parameter supported by the gateway/downstream service.

Response

OK
key_0integer
key_1string
key_2double
key_3string
key_4boolean

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error