Welcome to LiqPay!
The main stages of store registration and settings required for work
What you need to check before you start registering
To accept payments as a legal entity, resident of Ukraine - make sure that your site meets the recommendations:
- Contacts for feedback are indicated: phone and email address.
- The product image on the site corresponds to the description.
- There are no prohibited products on the site.
- The registration of the combat account must be on the telephone of the legal entity in whose favor it is planned to accept payments.
Registration
To connect payment acceptance, register your company in the LiqPay system:
- Register on the website using the scanner of the Privat24 application or by entering your phone number.
- Fill out the company data form (name, web address or social media, e-mail, phone number and category of services or goods).
- Specify the details of the company's account, to which we will transfer the refund for accepted payments.
- Sign the application form.
After registration you received:
public_key - the unique identifier of your company in the system LiqPay;
private_key - private API access key.
Connection
To form a request for payment, you will need:
- Determine the connection method depending on your work model:
- Client-Server (Payment button, SDK, Plugin),
- Server-Server (SDK, API).
- Integration to the site/resource according to the documentation.
- Test integration in test mode (use sandbox keys).
- Start using payments in combat mode.
Forming a request to API for self-integration:
Required URLs for work depending on the model chosen:
- https://www.liqpay.ua/api/request — Server-Server;
- https://www.liqpay.ua/api/3/checkout — Client-Server;
To call the LiqPay API you need to pass the data and signature (Server - Server) parameters via the POST method or redirect the client (Client-Server) using the POST method, where:
data
- json string with APIs parameters encoded by the function base64, base64_encode( json_string ),
signature
- is the unique signature of each request base64_encode( sha1( private_key + data + private_key) ),
base64_encode
- returns a string encoded by the base64,
sha1
- the hash is returned as a binary string of 20 characters.
Forming data and signature, example:
To connect the receiving of payment via LiqPay, forming json string with parameters api call, wherein:
Parameter | Required | Type | Description | |
---|---|---|---|---|
version | Required | Number | Версія API. Наприклад: 3 | |
public_key | Required | String | Public_key - the identifier of the created company. For example: i00000000 | |
private_key | Required | String | Private key of the created company (not available to anyone except your developer). For example: a4825234f4bae72a0be04eafe9e8e2bada209255 | |
action | Required | String | Transaction type. Possible values: pay - payment, hold - amount of hold on sender's account, subscribe - payment payment, paydonate - donation | |
amount | Required | Number | Payment amount. For example: 5, 7.34 | |
currency | Required | String | Payment currency. Possible values: USD, EUR, UAH. Additional currencies can be added by company's request | |
description | Required | String | Payment description | |
order_id | Required | String | Unique purchase ID in your shop. Maximum length is 255 symbols |
More parameters in the documentation
Example of creating json_string:
json_string =
{"public_key":"i00000000","version":"3","action":"pay","amount":"3","currency":"UAH","description":"test","order_id":"000001"}
Example of coding json_string function base64_encode, the company receives data:
data = eyJwdWJsaWNfa2V5IjoiaTAwMDAwMDAwIiwidmVyc2lvbiI6IjMiLCJhY3Rpb24iOiJwYXkiLCJhbW91bnQiOiIzIiwiY3VycmVuY3kiOiJVQUgiLCJkZXNjcmlwdGlvbiI6InRlc3QiLCJvcmRlcl9pZCI6IjAwMDAwMSJ9
An example formation of signature, the company forms the string sign_string by concatenating private_key + data + private_key:
sign_string = a4825234f4bae72a0be04eafe9e8e2bada209255eyJwdWJsaWNfa2V5IjoiaTAwMDAwMDAwIiwidmVyc2lvbiI6IjMiLCJhY3Rpb24iOiJwYXkiLCJhbW91bnQiOiIzIiwiY3VycmVuY3kiOiJVQUgiLCJkZXNjcmlwdGlvbiI6InRlc3QiLCJvcmRlcl9pZCI6IjAwMDAwMSJ9a4825234f4bae72a0be04eafe9e8e2bada209255
After applying the functions base64_encode( sha1( sign_string) ) we get the string:
signature = wR+UZDC4jjeL/qUOvIsofIWpZh8=
Example of sending a request to LiqPay:
1.To redirect the client to the LiqPay payment page (Client - Server), you need to generate an HTML form
<form method="POST" action="https://www.liqpay.ua/api/3/checkout" accept-charset="utf-8">
<input type="hidden" name="data"
value="eyJwdWJsaWNfa2V5IjoiaTAwMDAwMDAwIiwidmVyc2lvbiI6IjMiLCJhY3Rpb24iOiJwYXkiLCJhbW91bnQiOiIzIiwiY3VycmVuY3kiOiJVQUgiLCJkZXNjcmlwdGlvbiI6InRlc3QiLCJvcmRlcl9pZCI6IjAwMDAwMSJ9"/>
<input type="hidden" name="signature" value="wR+UZDC4jjeL/qUOvIsofIWpZh8="/><input
type="image" src="//static.liqpay.ua/buttons/payUk.png"/></form>
<input type="hidden" name="data"
value="eyJwdWJsaWNfa2V5IjoiaTAwMDAwMDAwIiwidmVyc2lvbiI6IjMiLCJhY3Rpb24iOiJwYXkiLCJhbW91bnQiOiIzIiwiY3VycmVuY3kiOiJVQUgiLCJkZXNjcmlwdGlvbiI6InRlc3QiLCJvcmRlcl9pZCI6IjAwMDAwMSJ9"/>
<input type="hidden" name="signature" value="wR+UZDC4jjeL/qUOvIsofIWpZh8="/><input
type="image" src="//static.liqpay.ua/buttons/payUk.png"/></form>
2.For interaction (Server - Server), the received data and signature must be sent to the url https://www.liqpay.ua/api/request
curl --silent -XPOST https://www.liqpay.ua/api/request --data-
urlencodedata="eyJwdWJsaWNfa2V5IjoiaTAwMDAwMDAwIiwidmVyc2lvbiI6IjMiLCJhY3Rpb24iOiJwYXkiLCJhbW91bnQiOiIzIiwiY3VycmVuY3kiOiJVQUgiLCJkZXNjcmlwdGlvbiI6InRlc3QiLCJvcmRlcl9pZCI6IjAwMDAwMSJ9"/>
--data-urlencode
signature="wR+UZDC4jjeL/qUOvIsofIWpZh8="
urlencodedata="eyJwdWJsaWNfa2V5IjoiaTAwMDAwMDAwIiwidmVyc2lvbiI6IjMiLCJhY3Rpb24iOiJwYXkiLCJhbW91bnQiOiIzIiwiY3VycmVuY3kiOiJVQUgiLCJkZXNjcmlwdGlvbiI6InRlc3QiLCJvcmRlcl9pZCI6IjAwMDAwMSJ9"/>
--data-urlencode
signature="wR+UZDC4jjeL/qUOvIsofIWpZh8="
3.The status of the operation will be sent to server_url
4.Successful completion of payment
Advanced settings
Customize checkout design
We have developed a universal designer, with which you can customize the individual design of the payment page without a single line of code
Billing page settings
Block settings with payment data
Automatically adapts to all major devices
Choose payment methods
Internet Banking Privat24
Apple Pay
Google Pay
Visa checkout
Mastercard and Visa
Pay per click with QR code
Tokens
FacePay24
Payment by parts
Self-service terminals
Cash payment
Post office bill
You can set up payment methods in the Company Settings or by using the API Сheckout.
Do you have any questions?
Contact our technical department by email:
liqpay.support@privatbank.ua