Direct Implementation
Qi Digital transactions require you to redirect your Customer’s browser to the Qi Digital Checkout as part of the transaction flow. The transaction must be done in two stages with the Checkout being displayed between the stages.
Qi Digital only supports payments made using the SALE action. This section explains how to make payment requests. Management Requests are not supported.
Additional information available from Qi Digital such as the selected cryptocurrency and transaction amount in that cryptocurrency will be made available in the acquirerResponseDetails response fields.
The direct integration uses two complex fields to pass data between the Qi Digital Checkout and the Gateway, the checkoutRequest and checkoutResponse fields.
The checkoutRequest field will optionally be provided by the Gateway and is a record whose name/value properties must be sent to the Checkout, at the provided checkoutURL, via a HTTP POST request. If not provided, then the Checkout can be opened using a normal HTTP GET request.
The corresponding checkoutResponse field should be returned to the Gateway and must be a record containing name/value properties received from the Checkout when it redirects the Cardholder’s browser back to the URL provided using the checkoutRedirectURL on completion.
The contents of the checkoutDetails, checkoutRequest, checkoutResponse and acquirerResponseDetails fields are formatted using the record format detailed in the Field Formats section.
Testing can be performed against Crypto Testnets, but minimum transaction values with Qi Digital have to be greater than £10.00 and a Testnet wallet and Crypto faucet will need to be sourced and used.
Initial Request (Checkout Preparation)
To request that a transaction be processed via Qi Digital the request must contain a paymentMethod of ‘qidigital’ and a checkoutRedirectURL containing the URL of a page on your server to return to when the Qi Digital Checkout is closed
When the Gateway receives this paymentMethod, assuming there are no other errors with the request, it will attempt to find a suitable Qi Digital Merchant Account in the current account routing group (refer to the Merchant Account Routing section).
If the Gateway is unable to find a suitable account, then the transaction will be aborted, and it will respond with a responseCode of 66364 (INVALID PAYMENTMETHOD).
Otherwise, the Gateway will respond with a responseCode of 65826 (CHECKOUT REQUIRED) and included in the response will be a checkoutURL field containing the URL required to load the Checkout and optionally a checkoutRequest containing any data required to be sent to the Checkout. The response will also contain a unique checkoutRef which must be echoed back in the continuation requests.
At this point your server must redirect the Customer’s browser to the provided checkoutURL using either a HTTP POST or HTTP GET request depending on whether any checkoutRequest data was provided.
Continuation Request (Complete payment)
On completion of the Qi Digital Checkout, it will redirect the Customer’s browser to the checkoutRedirectURL provided. A new request should then be sent to the Gateway to finalise the transaction. This new request must contain the checkoutRef received in the initial response and a checkoutResponse record containing any received URL or POST parameters.
The checkoutResponse field can be sent either as the URL query string received or, if POST parameters are received, as an array of the combined decoded URL and POST parameters.