Checkout Popup Library¶
Using the library allows opening the QIWI form as a popup (over the partner’s site). The library implements methods for:
To install and use the library, add the script to the website code:
<script src='https://oplata.qiwi.com/popup/v2.js'></script>
Please note
If the payment form is opened as a popup from the partner’s site, QIWI Wallet payment may be unavailable. During authenticating in QIWI Wallet, qiwi.com domain cookies are set, and some browsers block third-party domain cookies. For more information, see the WebKit documentation.
Creating an invoice¶
To create an invoice and open the payment form, call the QiwiCheckout.createInvoice
method with the following parameters:
Parameter | Description | Type/Format |
---|---|---|
publicKey amount phone comment |
See the description and type of the same-named parameters in the following section: «Internet Acquiring» → «QIWI Form Payment» → «QIWI Form Payment without using the API» → «Payment by Link or QR code» → «Creating a payment link» | |
account | Client identifier in the partner’s system | String |
customFields | Additional invoice data. See the list of available fields in the same-named parameter description of the invoice creation request | Object |
lifetime | See the description in the following article: «Internet Acquiring» → «Terms and Business Entities» → «Invoice Lifespan» | YYYY-MM-DDTHH:mm:ss.SSSZ |
Displaying the Payment Form for an Existing Invoice¶
This method can be used in the 4th stage of a single-step or two-step scenario for QIWI Form Payment.
To open the payment form for a previously created invoice, call the QiwiCheckout.openInvoice
method with the following parameters:
Parameter | Description | Type/Format |
---|---|---|
payUrl | Required parameter. See the description in the following article: «Internet Acquiring» → «QIWI Form Payment» → «Payment Form Overview» → «Form URL» | String |