UAPAY - національний платіжний сервіс
Creating an invoice (Invoice create)
Method for creating an invoice
URL
POST api/invoicer/invoices/create
Request:
Key | Description | Type | Mandatory | Example |
---|---|---|---|---|
params | ||||
sessionId | client session id | string, uuid | yes | "613f7045-03a2-4bbb-8ff8-e2202e71d41f" |
systemType | type of payment system | string | yes | "ECOM" or "P2P" |
data | ||||
externalId | external id (identifier in the partner system) | string | yes | "1500383075" |
type | type of operation | string | yes | "PAY", "HOLD", "SUBSCRIBE" |
cardTo{}.id | id card | string, uuid | yes (if systemType = "P2P") | "b8220f46-8c28-4068-9488-2e1b37359b06" |
reusability | reusable invoice parameter | boolean | no | true/false |
description | description of the purpose of the invoice | string | yes | "test payment" |
amount | payment amount (in kopecks) | integer | yes (if type = "SUBSCRIBE") | 100 |
recurringInterval | interval of recurrent payments (in days, up to 366) | integer | yes (if type = "SUBSCRIBE") | 1 |
expiresAt | expiration date of recurrent payments | integer | yes (if type = "SUBSCRIBE") | 1539345600000 |
redirectUrl | redirection address; if not passed - the user will not see the button "Go to website" | string | no | |
extraInfo | field for transmitting additional information about the invoice | json | no | "extraInfo":"{\"phoneFrom\":\"380971112233\",\"phoneTo\":\"380631112233\",\"cardToId\":\"216f8390-9abc-428d-89d6-7be50183afb5\"}" |
email to which the receipt will be automatically sent after successful payment, only for reusability = false | string | no | "test@uapay.ua" | |
callbackUrl | address to send callback, details here | string | no | |
payExpiresAt | the date of validity of the invoice payment | string | no | "2021-07-28 15:00:00" |
services |
|
| no |
|
serviceId | service id | integer | no |
|
destination | description of the purpose of payment | string | no | "Purpose of payment 1" |
destinationName | additional description in whose favor the payment is made | string | no | "Recipient1" |
description | the description of the order; is displayed in the receipt | string | no | "Description of the purpose of the order" |
amount | amount in kopecks | integer | no | 1000 |
Example of a query with ECOM type
{
"params": {
"sessionId": "613f7045-03a2-4bbb-8ff8-e2202e71d41f",
"systemType": "ECOM"
},
"data": {
"externalId": "1500383075",
"reusability": false,
"description": "Test payment",
"amount": 100,
"redirectUrl": "https://uapay.ua",
"type": "PAY",
"extraInfo":"{\"phoneFrom\":\"380971112233\",\"phoneTo\":\"380631112233\",\"cardToId\":\"216f8390-9abc-428d-89d6-7be50183afb5\"}"
}
}
Example of a query with ECOM type (multiservice)
{
"params": {
"sessionId": "613f7045-03a2-4bbb-8ff8-e2202e71d41f",
"systemType": "ECOM"
},
"data": {
"externalId": "1500383075",
"reusability": false,
"description": "Description of the purpose of the payment",
"redirectUrl": "https://uapay.ua",
"type": "PAY",
"services": [
{
"serviceId": 1,
"destination": "Purpose of payment 1",
"destinationName": "Recipient1",
"description": "Description of the purpose of the payment (displayed in the receipt)",
"amount": 1000
},
{
"serviceId": 2,
"destination": "Purpose of payment 2",
"destinationName": "Recipient2",
"description": "Description of the purpose of the payment (displayed in the receipt)",
"amount": 2000
}
]
}
}
Example of a query with ECOM type (dynamic)
{
"params": {
"sessionId": "613f7045-03a2-4bbb-8ff8-e2202e71d41f",
"systemType": "ECOM"
},
"data": {
"externalId": "1500383075",
"reusability": false,
"description": "Test payment",
"redirectUrl": "https://uapay.ua",
"type": "PAY",
"services": [
{
"serviceId": 1,
"iban": "UA461234560000026002001304675",
"okpo": "12345678",
"destination": "Administrative fee1",
"destinationName": "Recipient1",
"bankName": "PJSC Bank",
"description": "Administrative fee1",
"amount": 1000
}
]
}
}
Example of a query with ECOM type (recurrent payment, type = "SUBSCRIBE")
Example of a query with ECOM type (open amount)
Example of a query with P2P type
Reply:
Key | Description | Type | Example |
---|---|---|---|
status | Status. 0 - error, 1 - success | integer | 1 |
data | |||
id | invoice id | string, uuid | "d754517b-7138-46c3-9ce2-f4857910b120" |
paymentPageUrl | payment page address | string | "https://payment.demo.uapay.ua/i/d754517b-7138-46c3-9ce2-f4857910b120" |
paymentPageUrlQR | page QR code address | string | "https://api.demo.uapay.ua/api/qr/invoicer/d754517b-7138-46c3-9ce2-f4857910b120" |
Example of an answer
Related pages
UAPAY - національний платіжний сервіс
pay@uapay.ua