Obtaining invoice data (Invoices show)

Method for displaying invoice data

URI

POST api/invoicer/invoices/show

 

Request:

Key

Description

Type

Mandatory

Example

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

1 2 3 4 5 6 { "params": { "sessionId": "00684a7f-3d5c-43f4-b4d1-ea994226be9c", "id": "5ecb426d-185b-40e8-857a-e40c9864e5de" } }


Reply:

Key

Description

Type

Example

Key

Description

Type

Example

status

Status. 0 - error, 1 - success

integer

1

data







id

invoice id 

string, uuid

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

1 "test payment"

invoiceStatus

invoice status

string

"ACTIVE" или "'INACTIVE'"

redirectUrl

redirect address

string

1 "https://uapay.ua"

callbackUrl

callback address

string

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

createdAt

the date of creation of the invoice

integer

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

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

1 "UAPAY"

cardToId

enrollment card id 

string, uuid

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

recurringData

data on recurrent payments

object



recurringData.{}.endSubscribeDate

Subscription expiration date

string

1 "2018-09-12"

recurringData.{}.prevPaymentDate

Date of last invoice payment

string

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

recurringData.{}.nextPaymentDate

Date of next invoice payment

string

1 "2018-09-12"


Possible payment statuses:

Status

Description

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 { "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": {} } }