Unitpay
en
en
  • Home
  • First steps
    • Registration
    • Adding a Project
      • Adding a VK Community Project
    • Project Moderation
    • Transfer of the Project
    • Video tutorials
  • Payments
    • Creating a payment (easy way)
    • Creating a Payment
    • Creating a payment (widget)
    • Parameters for receipts
    • Creating Payment Links in Your Personal Account
    • Payment Handler
    • Payment information
    • Payment Refund
    • Payments with Pre-authorization
    • Recurring payments
      • Creating a Subscription
      • Getting Information About Subscription
      • Getting a List of Active Subscriptions
      • Closing a Subscription
  • Mass payouts
    • Creating a payout
    • Information about Payout
    • Card information by BIN
    • Payments based on a CSV registry
  • Online cash desk
    • Parameters for generating a receipt
    • Unit.Reciepts
    • Adding online cash desk
    • Types of Online Cash Register Receipt Items
    • Advance credit reciepts
  • Modules
    • Payment handler
    • Unitpay SDK
    • CMS modules
      • Amiro
      • PHPShop
      • 1C Bitrix
      • CS-Cart
      • DIAFAN.CMS
      • Drupal 7 (commerce)
      • Drupal 7 (ubercart 3)
      • Drupal 8, 9 (commerce)
      • Ecwid by Lightspeed
      • HostCMS
      • InSales
      • Joomshopping 4 (joomla 3)
      • LogicBoxes
      • Magento
      • Magento 2
      • OpenCart
      • osCommerce
      • Prestashop
      • ReadyScript
      • ShopCMS
      • Simpla
      • Tilda
      • Netcat CMS
      • UMI.CMS
      • VamShop 2
      • VirtueMart 3 (joomla 3)
      • Webasyst Shop Script 7 (8)
      • Wix
      • Woocommerce Wordpress
      • Zen Cart
      • Amiro CMS
      • CMS NWICODE
      • MODX (miniShop2)
  • Manage Unitpay
    • Interface Instructions
    • SP documents
    • Legal entity documents
    • Current Balance
    • Commissions
    • Currency Conversion Rates
  • Book of reference
    • System IP addresses
    • Payment Form Appearance
    • Using the Test API
    • Operator Codes
    • Payment System Codes
    • Currency codes
    • Qiwi Country Codes
  • Referral program
    • Interface of Referrer's (Agent's) Account
  • Support
  • Other
    • Telegram bot
    • Using the Test API
  • Google Payâ„¢
Powered by GitBook
On this page

Was this helpful?

  1. Payments

Creating a payment (easy way)

PreviousPaymentsNextCreating a Payment

Last updated 4 years ago

Was this helpful?

If your website was created using CMS please take a look at the list of our .

To initiate a payment through a single form of payment, you just need to direct the user to a special URL and transfer a number of required parameters.

pay

GET https://unitpay.ru/pay/PUBLICKEY?sum&account&desc&signature

The request is used to initialize a payment

Path Parameters

Name
Type
Description

publickey

string

public key. You can find it under the Settings tab of your project

Query Parameters

Name
Type
Description

backurl

string

The user's return address from the payment form without making a purchase; the project address is used by default. The project domain must be used in the address. Examples: https://redirect.<project domain>/?someParams", "https://<project domain>/redirect/

locale

string

It is mandatory to specify the payment form language, acceptable values: ru, en. By default, the form language is determined based on the country that the user's IP address belongs to

currency

string

The order currency according to ISO 4217 (RUB, UAH, BYN, EUR, USD etc. Currency codes https://help.unitpay.ru/v/master/book-of-reference/payment-system-codes). If the payment system does not support the required currency, the amount will be converted to the payment system currency

signature

string

It protects you from hackers: substituting the description or price of the order, placing a link to the payment on the resources of fraudsters.

desc

string

Order description. It is used only for informing when making a payment

account

string

Subscriber ID in your system (for example, email or order number).

sum

number

Payment amount. In rubles by default. See the additional currency parameter

Example:

https://unitpay.ru/pay/111111-11111?sum=100&account=222111&desc=Online%20course&signature=2c38bb3114b2f02222ee35f6b60c6bbe628ad31bed59633787204ae59659a02e

****

PUBLIC KEY: The value of the project public key can be found on the project page in the special Payment Form section of your personal account.

Request digital signature

For additional security of your payments, we perform mandatory verification of the digital signature when creating a payment. The signature guarantees protection against the substitution of the transmitted values (e.g., changing the payment amount or order number).

Value

Description

signature

line

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.

Example of creating a digital signature in PHP:

Default payment method

Return to the store's website

After initializing the payment, the user goes to the receipt page where the payment status is tracked. After users have received a successful or error status, they are redirected to the partner's site (Fail URL/Success URL fields in the personal account settings) with GET parameters:

Value

Description

account

text

Subscriber ID in the partner's system (for example, the subscriber's login or email)

paymentId

number

Payment number in the UnitPay system

You can define the payment system that will be used for the user by default. To do this, add parameter / system_code corresponding to the at the end of the URL of your payment form (for example: ).

modules
alphabetic code of the payment system
https://unitpay.money/pay/demo\
https://d33v4339jhl8k0.cloudfront.net/docs/assets/551a91dbe4b0221aadf24410/images/5524082ee4b06103140228d7/file-avRGChLd0b.png
https://d33v4339jhl8k0.cloudfront.net/docs/assets/551a91dbe4b0221aadf24410/images/5523ef72e4b0221aadf2588c/file-AJvZZEWITT.png