Client receives a pay form with a number of ways to pay for the invoice.
-
You may call the web form by two ways:
-
Simple. To identify merchant, a specific key in the form URL is used.
-
With signature. A digital signature in the form URL guarantees that the same merchant issued the invoice.
-
GET /form/create?public_key=08hvq08yw4fqw&amount=100.0&success_url=http%3A%2F%2Ftest.ru%3F&[email protected] HTTP/1.1
Host: oplata.qiwi.com
- Invoice parameters are specified in the web form URL.
Parameter | Description | Type | W/signature | Simple | Required |
---|---|---|---|---|---|
public_key | Merchant identifier key generated in QIWI Kassa | String | + | + | + |
bill_id | Invoice identifier | String(30) | + | + | W/signature |
amount | Invoice amount rounded down to 2 decimals | Number(6.2) | + | + | W/signature |
sign | Request signature | String | + | - | + |
phone | QIWI Wallet identifier (account) to which the invoice issued (with country code) | String(20) | + | + | - |
The user's e-mail where invoice payment link will be sent | String | + | + | - | |
user_id | The user's identifier in the merhcant's system | String | + | + | - |
comment | Comment to the invoice | String(255) | + | + | - |
extra_* | Additional invoice data | String(255) | + | + | - |
lifetime | Data where the invoice would become inaccessible for payment. If the invoice is not paid until this date, it becomes void with expired final status. A payment for the invoice will be impossible then.Important! Invoice will be automatically expired when 45 days is passed after the invoicing date |
YYYY-MM-DDThhmm URL-encoded |
+ | + | - |
success_url | The URL to which the user will be redirected in case of successful creation of QIWI Wallet transaction. May be parameter or anchor. URL must be within merchant's site. Redirection is performed when user pays by QIWI Wallet account's balance only. | URL-encoded string | + | + | - |
fail_url | The user is redirected to the specified URL when QIWI Wallet transaction creation is unsuccessful. May be parameter or anchor. URL must be within merchant's site. Redirection is performed when user chooses to pay by QIWI Wallet account's balance only. | URL-encoded string | + | + | - |
pay_source | Default payment method to show first for the client on QIWI Kassa Pay Form. As the Pay form automatically pre-selects the most comfortable way to pay for the user, we do not recommend to use this parameter. Possible values:qw – QIWI Wallet account;mobile – client’s cell phone account;card – a credit/debit card.When specified method is inaccessible, the page contains notice about it and the client can choose another method. |
String (predefined) | - | + | - |
Calling invoicing Pay form with authorization requires a signature of the request (sign
parameter).
GET /form/create?public_key=08hvq08yw4fqw&bill_id=Bill-1&sign=09jvrq09pwh3rq2e2&amount=100.0 HTTP/1.1
Host: oplata.qiwi.com
Signature algorithm follows:
-
Get a string with values of all required parameters of the redirect and
lifetime
parameter (if exists in the request) in alphabetical order separated by|
symbol:Invoice_parameters = "{public_key}|{bill_id}|{amount}|{lifetime}"
where
{parameter}
is the value of the corresponding notification's parameter. All parameters are treated as strings. -
Calculate HMAC-hash with SHA256-encryption on the obtained string using SECRET_KEY as a key:
sign = HMAС(SHA256, SECRET_KEY, Invoice_parameters)