Создание счета
Запрос создает платежный счет.
Примеры
- Одношаговый
- Двухшаговый
- Оплата по токену
- Рекуррентный
Запрос
PUT /sites/site-01/bills/0102313fsdfj82
Accept: application/json
Authorization: Bearer 5628af1c-26d9-42e7-8a6a-c22d491d79fb
Content-type: application/json
Host: qpay-api.qiwi.kz
{
"amount": {
"currency": "KZT",
"value": "100.00"
},
"expirationDateTime": "2022-12-12T10:10:19+06:00",
"comment": "Payment for testing.",
"flags": ["SALE"],
"successUrl": "https://test.com/#success",
"failedUrl": "https://test.com/#failure",
"customer": {
"account": "123456",
"email": "test@test.kz"
}
}
Ответ
{
"siteId": "site-01",
"billId": "0102313fsdfj82",
"invoiceUid": "7828af1c-26d9-42e7-8a6a-c22d491d79fb",
"amount": {
"currency": "KZT",
"value": "100.00"
},
"flags": ["SALE"],
"status": {
"value": "CREATED",
"changedDateTime": "2022-12-12T10:10:19+06:00"
},
"creationDateTime": "2022-12-12T10:10:19+06:00",
"expirationDateTime": "2022-12-15T10:10:19+06:00",
"customer": {
"account": "123456",
"email": "test@test.kz"
},
"payUrl": "https://qpay-payform.qiwi.kz/form/invoice?invoiceUid=7828af1c-26d9-42e7-8a6a-c22d491d79fb"
}
Запрос
PUT /sites/site-01/bills/0102313fsdfj82
Accept: application/json
Authorization: Bearer 5628af1c-26d9-42e7-8a6a-c22d491d79fb
Content-type: application/json
Host: qpay-api.qiwi.kz
{
"amount": {
"currency": "KZT",
"value": "100.00"
},
"expirationDateTime": "2022-12-12T10:10:19+06:00",
"comment": "Payment for testing.",
"successUrl": "https://test.com/#success",
"failedUrl": "https://test.com/#failure",
"customer": {
"account": "123456",
"email": "test@test.kz"
}
}
Ответ
{
"siteId": "site-01",
"billId": "0102313fsdfj82",
"invoiceUid": "7828af1c-26d9-42e7-8a6a-c22d491d79fb",
"amount": {
"currency": "KZT",
"value": "100.00"
},
"status": {
"value": "CREATED",
"changedDateTime": "2022-12-12T10:10:19+06:00"
},
"creationDateTime": "2022-12-12T10:10:19+06:00",
"expirationDateTime": "2022-12-15T10:10:19+06:00",
"customer": {
"account": "123456",
"email": "test@test.kz"
},
"payUrl": "https://qpay-payform.qiwi.kz/form/invoice?invoiceUid=7828af1c-26d9-42e7-8a6a-c22d491d79fb"
}
Запрос
PUT /sites/site-01/bills/0102313fsdfj82
Accept: application/json
Authorization: Bearer 5628af1c-26d9-42e7-8a6a-c22d491d79fb
Content-type: application/json
Host: qpay-api.qiwi.kz
{
"amount": {
"currency": "KZT",
"value": "100.00"
},
"expirationDateTime": "2022-12-12T10:10:19+06:00",
"comment": "Payment for testing.",
"flags": ["BIND_PAYMENT_TOKEN"],
"successUrl": "https://test.com/#success",
"failedUrl": "https://test.com/#failure",
"customer": {
"account": "123456",
"email": "test@test.kz"
}
}
Ответ
{
"siteId": "site-01",
"billId": "0102313fsdfj82",
"invoiceUid": "7828af1c-26d9-42e7-8a6a-c22d491d79fb",
"amount": {
"currency": "KZT",
"value": "100.00"
},
"status": {
"value": "CREATED",
"changedDateTime": "2022-12-12T10:10:19+06:00"
},
"creationDateTime": "2022-12-12T10:10:19+06:00",
"expirationDateTime": "2022-12-15T10:10:19+06:00",
"customer": {
"account": "123456",
"email": "test@test.kz"
},
"payUrl": "https://qpay-payform.qiwi.kz/form/invoice?invoiceUid=7828af1c-26d9-42e7-8a6a-c22d491d79fb"
}
Запрос
PUT /sites/site-01/bills/0102313fsdfj82
Accept: application/json
Authorization: Bearer 5628af1c-26d9-42e7-8a6a-c22d491d79fb
Content-type: application/json
Host: qpay-api.qiwi.kz