Метод для показу даних інвойсуMethod for displaying invoice data
Tip |
---|
URIPOST api/invoicer/invoices/show |
ЗапитRequest:
Key |
---|
Description |
---|
Type |
---|
Mandatory |
---|
Example | ||||
---|---|---|---|---|
params | ||||
sessionId | client session id |
string, uuid |
yes | "00684a7f-3d5c-43f4-b4d1-ea994226be9c" |
id | invoice id |
string, uuid |
yes | "6e391161-94ff-41a3-bd22-c6d77509bff6" |
Приклад запитуExample of a query
Code Block | ||
---|---|---|
| ||
{ "params": { "sessionId": "00684a7f-3d5c-43f4-b4d1-ea994226be9c", "id": "5ecb426d-185b-40e8-857a-e40c9864e5de" } } |
ВідповідьReply:
Key |
---|
Description |
---|
Type |
---|
Example |
---|
status |
Status. 0 - |
error, 1 - |
success | integer | 1 | |
data | |||
id |
invoice id | string, uuid |
| ||
invoiceNumber |
invoice number | integer | 14 |
clientId | customer id |
integer | 1 | |
systemType |
type of the payment system | string | "P2P"|"ECOM"|"BILLER" |
amount |
payment amount | integer | 100 |
reusability |
reusable invoice parameter | boolean | true |
description |
description of the purpose of the invoice | string |
|
|
| |
invoiceStatus |
invoice status | string | "ACTIVE" или "'INACTIVE'" |
redirectUrl |
redirect address | string |
| ||
callbackUrl |
callback address | string |
| ||
createdAt |
the date of creation of the invoice | integer |
| ||
type |
invoice type | string | "PAY", "HOLD", "SUBSCRIBE" |
e-mail specified when creating the invoice | string | "test@uapay.ua" |
extraInfo |
field for additional information about the invoice | object |
| ||
serviceData[].{} |
an array of data on services (only for systemType = "ECOM", |
except type = "SUBSCRIBE") ['serviceId','destination','destinationName','account','mfo','okpo','bankName','description','amount'] | ||
payments |
data on payments under this invoice | array | "[ ]" |
payments[].{} |
object with payment data ['invoiceId','paymentId','number', 'receiptId', 'amount','commission','currency','cardFromMasked','cardToMasked','cardFromId','cardToId','sendOperationId', 'receiveOperationId','paymentStatus','status','paidAt','reversedAt','finishedAt','canceledAt','createdAt','updatedAt', 'chequeLink'] | ||
clientName |
client name | string |
| ||
cardToId |
enrollment card id | string, uuid |
| ||
recurringData |
data on recurrent payments | object | |
recurringData.{}.endSubscribeDate |
Subscription expiration date | string |
| ||
recurringData.{}.prevPaymentDate |
Date of last invoice payment | string |
| ||
recurringData.{}.nextPaymentDate |
Date of next invoice payment | string |
|
Возможные статусы платежейPossible payment statuses:
Status |
---|
Description |
---|
FINISHED |
Payment completed successfully, money sent to recipient |
HOLDED |
Необхідно підтвердження. Для завершення списання коштів потрібно виконати підтвердження.
CANCELED
Confirmation required. You must complete the debit to complete the write-off. | |
CANCELED | The payment process was not completed and the payment was rejected |
REVERSED |
Payment returned, funds returned to sender. |
REJECTED |
Payment failed for technical reasons. |
NEEDS_CONFIRMATION |
Payment pending confirmation (lookup or 3ds). |
PENDING |
Платіж знаходиться в стані оплати (проміжний статус)
...
Payment in progress (intermediate status) |
Example of an answer
Code Block | ||
---|---|---|
| ||
{ "status": 1, "data": { "id": "7757c47c-8d70-4089-ab6e-82515f8f6f07", "invoiceNumber": 1870, "clientId": 1, "clientName": "UAPAY", "description": "АдміністративнийAdministrative fee збірfor заstate проведенняregistration державноїof реєстраціїchanges змінto доinformation відомостейin вthe ЄДРUSR;Адміністративний збір за проведення державної реєстрації змін до відомостей в ЄДР;Информационные услугиInformational services", "systemType": "ECOM", "amount": 13500, "reusability": false, "invoiceStatus": "ACTIVE", "type": "PAY", "serviceData": [ { "serviceId": 1, "destination": "АдміністративнийAdministrative fee збірfor заstate проведенняregistration державноїof реєстраціїchanges змінto доinformation відомостейin вthe ЄДРUSR", "destinationName": "КазначействоTreasury", "description": "АдміністративнийAdministrative fee збірfor заstate проведенняregistration державноїof реєстраціїchanges змінto доinformation відомостейin вthe ЄДРUSR", "amount": 7800, "commission": 534 }, { "serviceId": 2, "destination": "АдміністративнийAdministrative fee збірfor заstate проведенняregistration державноїof реєстраціїchanges змінto доinformation відомостейin вthe ЄДРUSR", "destinationName": "ОнлайнOnline House Домof ЮстицииJustice", "description": "АдміністративнийAdministrative fee збірfor заstate проведенняregistration державноїof реєстраціїchanges змінto доinformation відомостейin вthe ЄДРUSR", "amount": 4200, "commission": 30 }, { "serviceId": 4, "destination": "ИнформационныеInformational услугиservices", "destinationName": "ОнлайнOnline House Домof ЮстицииJustice", "description": "ИнформационныеInformational услугиservices", "amount": 1500, "commission": 0 } ], "redirectUrl": "http://uapay.ua/", "callbackUrl": "http://example.com/", "extraInfo": { "origin": "invoicer" }, "cardToId": null, "createdAt": "2018-11-30T11:42:39.000Z", "payments": [ { "invoiceId": "7757c47c-8d70-4089-ab6e-82515f8f6f07", "paymentId": "b3b67d90-a0a7-4861-a3bb-b91889452823", "number": 2175, "receiptId": "E76EZFQFK2FE", "amount": 13500, "commission": 564, "currency": "980", "cardFromMasked": "5269615505", "cardFromId": "9ac4999f-79ea-40f0-9227-ef5417573c5b", "paymentStatus": "FINISHED", "status": "FINISHED", "finishedAt": "2018-11-30T11:45:37.000Z", "createdAt": "2018-11-30T11:44:38.000Z", "updatedAt": "2018-11-30T11:45:37.000Z", "chequeLink": "https://api.zero.uapay.ua/api/acquiring/receipts/v2/b3b67d90-a0a7-4861-a3bb-b91889452823.pdf" } ], "recurringData": {} } } |
...