Method for displaying invoice data

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

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

"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

"test payment"

invoiceStatus

invoice status

string

"ACTIVE" или "'INACTIVE'"

redirectUrl

redirect address

string

"https://uapay.ua"

callbackUrl

callback address

string

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

createdAt

the date of creation of the invoice

integer

"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

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

"UAPAY"

cardToId

enrollment card id 

string, uuid

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

recurringData

data on recurrent payments

object


recurringData.{}.endSubscribeDate

Subscription expiration date

string

"2018-09-12"

recurringData.{}.prevPaymentDate

Date of last invoice payment

string

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

recurringData.{}.nextPaymentDate

Date of next invoice payment

string

"2018-09-12"


Possible payment statuses:

Status

Description

FINISHED

Payment completed successfully, money sent to recipient

HOLDED

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

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