Creating a payment (widget)
Last updated
Last updated
A widget is a pop-up window with a payment form. To use the widget, you just need to add its code to the site page, configure the transfer of parameters and create an event for its call (for example, clicking on a button).
The example code and description of the used widget parameters are located in the Unitpay personal account in the project settings on the "Payment widget" tab.
If you have any additional questions during the integration process, you can ask the support team.
Value
Description
publicKey
string
You can find it under the Settings Tab of your project
sum
number
Payment amount (for example, 10.00)
account
string
Customer ID in your system (e-mail or order number, for example)
desc
string
The order's description for customer
domainName
string
unitpay.money
signature
string
Digital signature.
It is formed as sha256(account + "{up}" + currency + "{up}" + desc + "{up}" + sum + "{up}" + secretKey), where sha256 is the hashing method; {up} is the parameter separator in the hash function; account, sum, currency, desc are the payment initialization parameters described above; secretKey is the secret key of the project (available in your personal account).
Important Note: If you do not transmit currency to the payment form, this parameter should not be used in signature generation.
Value
Description
paymentType
string
Code of the payment system, through which the payment will be made.
locale
ru, en
Forcing the language of the widget.
currency
string
The order currency according to ISO 4217 (EUR, USD, RUB, UAH, BYN etc. Currency codes). If the payment system does not support the required currency, the amount will be converted to the payment system currency.
hideMenu
true, false
It hides the menu with the payment method options.