Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Метод для показу даних інвойсуMethod for displaying invoice data

Tip

URI

POST 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
languagejs
{
    "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

id інвойсу

invoice id 

string, uuid

Code Block
"edacfce8-eb97-4f4f-8fa2-0fb044932ac3"

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

Code Block
"
тестовый
test 
платеж
payment"

invoiceStatus

статус інвойсу

invoice status

string

"ACTIVE" или "'INACTIVE'"

redirectUrl

адреса перенаправлення

redirect address

string

Code Block
"https://uapay.ua"

callbackUrl

адреса відправки пост-відповідей

callback address

string

Code Block
"http://ptsv2.com/t/test_server/post"

createdAt

дата створення інвойсу

the date of creation of the invoice

integer

Code Block
"2018-09-07T16:53:21.000Z"

type

тип інвойсу

invoice type

string

"PAY", "HOLD", "SUBSCRIBE"

email

електронна пошта, задана при створенні інвойсу

e-mail specified when creating the invoice

string

"test@uapay.ua"

extraInfo

поле для передачі додаткової інформації щодо інвойсу

field for additional information about the invoice

object

Code Block
{"base":true,"origin":"invoicer","email":"test@ukr.net"}

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

Code Block
"UAPAY"

cardToId

id карти зарахування

enrollment card id 

string, uuid

Code Block
"91c78d52-4a28-4c1e-ac5a-079ca5cd029c"

recurringData

дані за рекурентними платежами

data on recurrent payments

object


recurringData.{}.endSubscribeDate

Дата завершення підписки

Subscription expiration date

string

Code Block
"2018-09-12"

recurringData.{}.prevPaymentDate

Дата останнього платежу по інвойсу

Date of last invoice payment

string

Code Block
"2018-09-11 09:00:03"

recurringData.{}.nextPaymentDate

Дата наступного платежу по інвойсу

Date of next invoice payment

string

Code Block
"2018-09-12"


Возможные статусы платежей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
(connection was terminated, payment was suspended at an intermediate stage
due to the payer's fault).

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
languagejs
{
    "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": {}
    }
}

...