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. Online cash desk

Parameters for generating a receipt

PreviousOnline cash deskNextUnit.Reciepts

Last updated 29 days ago

Was this helpful?

To generate a receipt you need to specify additional parameters in the request to :

Parameter

Type

Description

customerEmail

string

Payer's Email

customerPhone

number

Payer's phone number in international format without "+"

cashItems

string

Order Items

Obtained by encoding a base64 value in json format. For example:

base64_encode(json_encode([["name" => "Hosting for 1 month", "count" => 1, "price" => 10.00, "type" => "commodity"]]));

It is sufficient to pass cashItems to generate a receipt. CustomerEmail or customerPhone are not required

The paymentMethod parameter is optional and can also be set in the checkout settings in the Unitpay personal account. In this case, the priority of the choice will be as follows:

  1. Data from the cashItems request to create a payment

  2. Data from the checkout settings

  3. If items 1 and 2 are not specified, then by default - full_payment

The cashItems parameter is formed from:

Parameter

Type

Description

name

string

Item name (required parameter): no more than 128 characters per position

count

number

Quantity (required parameter): the total amount in the receipt can not be more than 100 items

price

number

Price per unit (required parameter)

currency

string

vat

string

Amount of VAT rate:

none

vat0

vat5

vat7

vat10

vat20 vat110 (rate 10/110, applies only to receipts with the payment method characteristics Prepayment, 100% prepayment and Advance vat120 (rate 20/120, applies only to reciepts with the payment method characteristics Prepayment, 100% prepayment and Advance) vat105 (rate 5/105, applies only to reciepts with the payment method characteristics Prepayment, 100% prepayment and Advance) vat107 (rate 7/107, applies only to reciepts with the payment method characteristics Prepayment, 100% prepayment and Advance)

type

string

paymentMethod

string

The sign of the payment method: full_payment - full payment (used by default) full_prepayment - 100% prepayment prepayment - advance payment advance - advance payment

sum

number

sum (optional parameter): required only when using promotional codes, coupons and discount certificates (the value is passed to sum after applying the discount on goods, sum must always be equal to the product of price*count).

When selling labeled goods from March 1, 2020, the labeling attribute: markCode must be displayed. Additional parameters must be transmitted when generating a receipt for marked goods:

Parameter

Type

Description

markCode

string

Product labeling code in the format required by the Federal Tax Service of Russia (http://www.consultant.ru/document/cons_doc_LAW_362322/a25979352fed3ee44244249284fb21451e8118c5/)

quantity

number

Quantity of items. In total in the check can not be more than 100 items.

measure

number

Units of measurement of the calculation item quantity. Can take one of the values: 0 - applies to items of settlement that can be sold by the piece or units;

10 - gram;

11 - kilogram;

12 - ton;

20 - centimeters.

If sold by the unit, the measure always = 0.

If there is one label for one particular item, then quantity = 1 is specified and mark_quantity is not included in the query.

markQuantity

array

The volume of items in the marked batch. If a single labeled package contains, for example, 10 units of product and you sell 2 units out of the box, then specify quantity = 1, and in mark_quantity in the numerator numerator = 2, in the denominator denominator = 10. Example: "mark_quantity":{"numerator":2, "denominator":10}

Important:

The order amount (sum) must be greater than or equal to price*count (from cashItems).

If the amount of the order is more, then the receipt will add an additional title "Adjustment of total".

If the amount of the order is less than price*count, then when you go to pay by generated link / when initiating such request to API, the response from the server will look like this:

"Amount of items is more than the cost of the order".

By default it is always RUB (if your goods/services are in rubles, then currency may not be transmitted separately). Currency of the order according to ISO 4217 standard (UAH, BYN, EUR, USD etc. ). The user will always have rubles in the receipt, even if you transmitted a currency other than RUB (conversion takes place on the Unitpay side).

Position type list:

create a payment
refund
Full list of currencies
https://help.unitpay.ru/v/master/online-cash-desk/receipt-items