Support

How to check payment status and details?

iPint, May 24, 2022

Call /invoice endpoint with HTTP GET method to verify payment status and get details once you received callback request on the invoice callback url provided by you, for more details https://github.com/devbitfia/iPint#invoice

    Important points:

  • To mark customer's payment, see transaction_status in the response from /invoice (GET).
    • CHECKING means checking for transation on blockchain
    • PROCESSING means transaction hit blockchain but confirmations are less than 3, see blockchain_confirmations in the response
    • COMPLETED means transaction is completed, you can mark the payment successful. If you get this status, do not query further.
    • FAILED means customer didn't pay the invoice or transaction is not included in any block even after waiting for long (if user paid very low mining fee), see blockchain_transaction_status in the response. If you get this status, do not query further.
    • CANCELLED means customer didn't complete payment and closed process before qr code is generated. If you get this status, do not query further.

  • To check whether invoice is full in paid, compare invoice_amount_in_local_currency, invoice_amount_in_usd, invoice_crypto_amount with received_amount_in_local_currency, received_amount_in_usd, received_crypto_amount respectively.

  • Invoice Callback is HTTP POST message sent from the iPint server to the merchant’s server. The primary purpose of callback is to alert the merchant’s server that the status of an invoice has changed.
    • HTTP POST Message (JSON) is to be sent to the invoice_callback_url provided by merchants while creating the invoice by calling /checkout endpoint.
    • It is sent for the invoice statuses COMPLETED, FAILED.
    • The body consists keys invoice_id and status.
      for successful
      { "invoice_id": 'invoice id', "status": "COMPLETED" }
      for failed
      { "invoice_id": 'invoice id', "status": "FAILED" }
      Note : (i) invoice_id and status, these two params will always be there. Additionaly, there can be more params.
      (ii) invoice_id is same as the session_id you get from the response of /checkout endpoint.
    • Make sure to not rely on whitelisting iPint’s sending IP addresses, as these IP addresses are subject to change without notice.
    • Make sure to use HTTPS for your invoice_callback_url.
    • iPint does not send a signed request, so the information in the body should not be trusted outright. It shall be used as a trigger to verify the status of a specific invoice. This is to be done via the GET /invoices endpoint since the invoice_id is provided in the body of invoice callback.
    • The iPint server expects an HTTP 200 response with an empty body. Any other HTTP response is considered by iPint as a failed delivery. The iPint server attempts to send request on the invoice_callback_url multiple times until the send is either successful or the iPint server gives up.
How to receive a payment (get payment process url)?