Invoice by email. PayMe4 - issue an invoice online Invoice for goods with a discount

This is a section in your Cashier account where you can:

If your personal account does not have a section Customer accounts, you can create an additional store specifically for accounts - upon request, through the manager.

How to issue an invoice

What then:

If the client received an invoice by email, he will check the order directly in the letter, click Pay

What does an invoice letter look like?

If the client received an invoice via SMS or chat, he will open the link from the message and be taken to a page with a shopping list. Then he will check everything and press Go to the payment and pay off the bill in a convenient way. You will receive a payment notification.

Invoice for discounted goods

If you sell something at a reduced price, show it on the invoice. The buyer will immediately see how much he saves.

How to issue an invoice with a discount

An example of an invoice that the buyer will receive:

Example of displaying discounts in Account history:

Parameters for 54-FZ

For those who have enabled the Yandex.Checkout solution for 54-FZ and send data for checks to their online cash register, additional fields appear when creating an account.

Buyers will not see them - this is only for generating a receipt in order to comply with the law.

VAT- just indicate your bet.

You can select values:

    Excise goods

  • Bet in game

    Winning the game

    Lottery ticket

    Winning the lottery

    Results of intellectual activity

  • Agent's commission

    Property rights

    Non-operating income

    Insurance fee

    Trade fee

    Resort fee

    Several variants

    You can select values:

    • Prepayment

      Partial prepayment

      Full payment

      Partial payment and credit

    • Loan repayment

    How to avoid filling out fields every time

    If you sell the same thing, you can set for Subject of calculation And Calculation method constant values ​​- they will apply to all accounts.

    1. Click Create an account.

    2. Go to the account settings - using the gear on the right.

    3. Select the values ​​that suit you. They will appear on this invoice and will be selected when creating all future invoices.

    4. To hide fields from the form, check the box Do not show when creating an account(it appears when the fields are already filled in). Then you won't see them anymore. You can change values ​​or return fields to the form right there, in the settings.

    If you reissue such an invoice, all the values ​​that you specified in the settings of this invoice will be saved, but you will be able to change them.

    How to create an account with any number

    By default, when you create a new account, the number for it is generated automatically. If necessary, you can assign any number to the invoice - for example, an order number in your system.

      Click Create an account.

      Go to account settings.

      Check the box next to the item Your account number.

    Done, a new field has appeared in the account creation form - for entering a number. This number will be visible to the buyer when he receives the invoice.

    How to find out your account status

    Open the tab Customer accounts: At the bottom there will be a list of invoices issued. For each invoice, the status is indicated to the left of the amount.

    In addition, all paid invoices appear in the list of payments: enter the invoice number in the field Transaction, order, customer and press Find. If the invoice is paid, this payment will be on the list.

    How to find the right account

    IN Account history there is a search field. Enter some account information into it: account number, part of a phone or mail number, customer name or product name. Then click Find- the service will show all accounts with such data.

    How to cancel an account

    While the account is in status Sent, you can cancel it at any time.

    For this:

      Open the tab Customer accounts.

1. Business schemes

The interaction between the IntellectMoney system, the online store and the User (Buyer) occurs according to the following scheme:

  1. The user (Buyer) fills out the payment form (clause 4.2.1, Table 2) on the online store website.
  2. The online store sends a payment request to the IntellectMoney system with the transfer of payment form data, and redirects the User (Buyer) to the IntellectMoney website.

    IntellectMoney requests the User (Buyer) to confirm the correctness of the received data.

    The User (Buyer) confirms the data.

    If the User (Buyer) has chosen instant payment, IntellectMoney immediately accepts the User's (Buyer) payment. If payment by deferred payment is selected, step 5 is not performed.

    IntellectMoney displays a message about the completion of the payment procedure, redirects the User (Buyer) to the online store website and informs about the completion of the payment procedure ( Successful payment URL, clause 4.1, Table 1)

    If deferred payment is selected, the User (Buyer) asynchronously pays for the purchase made in the online store.

    In a general queue, IntellectMoney processes all available payments and asynchronously notifies the online store about the fact of receipt of funds to its account ( Payment Alert URL, clause 4.2.1, Table 2).

2. general information

The IntellectMoney.Merchant system provides online stores (hereinafter referred to as the seller) with the opportunity to pay for purchases by Users (hereinafter referred to as the buyer) in various ways, for example, from an account in the IntellectMoney system, by bank card, money transfer, terminal or bank payment.

The buyer forms an order on the seller’s website, selects a payment method through IntellectMoney and goes to the IntellectMoney.Merchant website, where the buyer is issued an invoice for payment (hereinafter referred to as ICO) based on the data received from the seller’s website. Each purchase has an invoice for payment (hereinafter referred to as ACO), this is a unique number in the system, starting with 3 and consisting of 10 digits and having an expiration date (maximum 6 months from the date of creation) and the purchase amount.

Payment

The seller can choose which payment methods will be available to the buyer. The buyer can pay for the SKO in several payments.

If, after the payment is credited to the SKO, it is not fully confirmed, then it is considered partially confirmed. A partially confirmed SCO can be canceled by the buyer from the personal account or the merchant’s website. When an account is cancelled, all funds credited to the SKO are credited to the buyer's account. If the buyer is not registered in the system, then an invoice is created for the specified email on the merchant’s website, in this case the buyer can use the change by registering in the system, indicating the email specified in the SKO as a login.

If, after the payment is credited to the SKO, there are funds remaining, two payments are created, a “final” payment is created for the amount of the SKO - it is credited to the store’s account minus the IntellectMoney commission, and a “change” is created for the amount of the overpayment and credited to the buyer’s account. Once the “final” payment is created, the SCO becomes confirmed. The user can continue to make payments to such a standard payment system, and all funds will go towards the buyer’s change.

Expiration date of SKO

The SKO has an expiration date; this is a parameter that the seller transmits to the merchant’s website along with the purchase amount. If the seller did not convey the expiration date, then IntellectMoney sets the expiration date of the standard expiration date as 6 months from the date of purchase. At the moment of expiration of the validity period of the SKO, the partially confirmed SKO transfers all the money to the buyer's change. If the SKO was frozen, then all money is transferred to the seller’s account minus IntellectMoney’s commission.

If the payer's funds fall into the canceled SKO, the funds fall into the payer's change.

Holding

The seller can configure the operation of the SKO in the “holding” mode. To configure this mode, just pass the parameters holdModeexpireDate and holdTime, and also necessary Enable the “Accept only unique purchase IDs” option in the store settings.

This mode is used to freeze the SKO account. This mode is mainly convenient to use if users of an online store often pay with bank cards. Having written out the SKO in holding mode and paid from a bank card, the amount on the bank card is not debited, but blocked; the SKO itself, upon full payment, will not change its state until the set holding time, but can change the state at the request of the store. Or cancel the SKO, in which case the funds that were in the SKO will be returned to the user. If confirmation occurs, the funds are credited to the store.

If the SCO is canceled by the store, the blocked amount on the bank card is returned back, and all other funds will be written off as change. For example, a buyer wrote out a SKO for 100 rubles, he paid 30 rubles from the terminal, and he paid the rest of the amount from a bank card. The store or buyer has canceled the SKO, 30 rubles will be credited as change to the buyer, and 70 rubles will be returned to the bank card. In the case of payment for the SKO by methods other than bank cards, when the SKO is cancelled, the funds are returned to the user’s account.

The maximum holding date for CKO is 119 hours (4 days 23 hours) from the date of payment. If before the expiration date of the SKO, the seller does not send a request to the IntellectMoney system to cancel or credit the SKO, then the SKO will be automatically credited to the store’s account or returned to the buyer’s account (depending on what is in the personal account) automatically.

The user (Buyer) selects a product in the online store, the store calculates the amount of the Order and sends a payment request to the IntellectMoney system. IntellectMoney accepts payment fromUser (Buyer) and informs the online store about receipt of payment.

Payments are accepted by the IntellectMoney system using the secure SSL data transfer protocol.

The interfaces of the IntellectMoney system allow online stores to instantly learn about accepted payments, as well as the fact of receiving deferred payments.

3. The sequence of accepting payments by the IntellectMoney system through the online store

The interaction between the IntellectMoney system, the online store and the user (buyer) occurs according to the following scheme:



  1. The buyer selects a product on the online store website;
  2. The online store creates an order (purchase), generates and displays the “Payment Request Form” to the buyer to send it for payment to IntellectMoney (clause 4.2.1, Table 2, Example 1).
  3. The user (buyer) goes to the IntellectMoney website, selects a payment method (from those specified by the preference parameter in the “Payment Request Form” (if specified), or from all possible ones (if not specified). Enters identification data: E-mail , or login/password (if available).
  4. The IntellectMoney system creates an invoice for payment (APO) based on the data received from the “Payment Request Form”.
  5. Information about the created (issued) SKO and the method of payment is displayed to the buyer.
  6. The IntellectMoney system sends a notification to the online store about the creation of a CCO through the “Payment Notification Form” (clause 4.2.2, Table 3, Example 2) with the paymentStatus field = 3 (CCO created).
  7. The buyer pays for the purchase using one of the available methods.
  8. If, when creating a purchase, the online store did not specify (pass) the holdMode parameter in the “Payment Request Form,” then execution continues from step 10, immediately crediting funds to the online store’s account.
    Otherwise (the holdMode parameter is set), the IntellectMoney system sends a notification to the online store about the creation of a standard payment system via the “Payment notification form” (clause 4.2.2, Table 3, Example 2) with the paymentStatus field = 6 (the required amount is blocked on the standard payment system, a request to write off or unblock funds or the expiration of the blocking period is pending).
  9. The online store sends a request to the IntellectMoney system for an action with blocked funds through the “Request Form for crediting or unblocking funds” (clause 4.2.3, Table 4, Example 3) with the parameter action = Refund (to unblock funds (return to the user), or ToPaid (to credit funds to the online store account).
  10. In accordance with the request received at step 9, the IntellectMoney system credits funds to the online store account, or cancels the SCO and returns the funds to the user.
    If the online store did not send a request in accordance with step 9, then after the expiration of the funds blocking period for the SKO, the IntelectMoney system automatically credits the funds to the online store’s account, or returns the funds to the user, depending on the store’s settings in the personal account.
  11. The IntellectMoney system sends a notification to the online store about the payment of the standard payment system, or cancellation (only in the case of blocking of funds) of the standard payment system via the “Payment Notification Form” (clause 4.2.2, Table 3, Example 2) with the paymentStatus field = 5 (the standard payment system is completely confirmed, the money has been transferred to the online store account), paymentStatus = 4 (RMS is cancelled, the money is returned to the user), paymentStatus = 7 (RMS is partially confirmed, in this case the amount that has already been confirmed will be transferred), paymentStatus = 8 (RMS has been fully paid and a refund was made on it).

4. Interfaces

4.1. Registration data of the online store

Before accepting data using the IntellectMoney system, in addition to registering in the system, the online store must configure a number of parameters governing the procedure for accepting payments and notifications about changes in the payment status, and information shown to users when making a purchase.

For an online store website, the system stores its own set of values. Page in the personal account of the legal entity. faces To edit the parameters, click on the “Edit” link of the selected store. It is necessary to fill out the fields, as well as select the correct account to which payments will be credited. For the convenience of testing the protocol, you need to select an account with a test currency (tst.). After successful testing, you need to switch to an account with ruble currency.

The second step is to configure the IntellectMoney protocol. On the page https://www.intellectmoney.ru/ru/enter/ps_organization_shop/ you need to go to the protocol settings by clicking on the “IntellectMoney” link in the store you are setting up. The list of protocol parameters and their purpose is given in Table 1:

Table 1. List of protocol parameters

Parameter name

Format

Description

Information URL about payment (Result URL)

up to 512 characters

URL (on the online store website) to which the IntellectMoney system sends HTTP/S POST requests to make a payment. If the online store has not defined this URL, it will not be notified by the system about completed payments.

The URL must begin with the prefix “http://” or “https://”.

Secret Key

up to 32 characters

A string of characters used to sign data transmitted by the IntellectMoney system to the store. This line is used to improve the reliability of identification of the alert being sent. The contents of the line are known only to the IntellectMoney system and the online store!

Send Secret Key to Result URL
(only with HTTPS)


If you use a secure connection to the store (https), then you can use the “secret key” as evidence that the data was sent from IntellectMoney.

BackURL

up to 512 characters

The address to which the user (buyer) will be redirected after issuing an invoice if the user has chosen an “offline” payment method (for example: terminals).

Debug mode

Checkbox

It is recommended to enable it while developing the module that implements the protocol. Allows the developer to receive information about errors in an expanded version, with suggested solutions. After switching the store to combat mode, disable the parameter.

4.2. HTML Forms

HTML forms are used to transfer information between the online store website and the IntellectMoney system:

Payment request form - generated by the website of the online store to generate a request for the creation (issuance) of an invoice for payment (invoices payable) to pay for a purchase in the IntellectMoney system. Transmitted via the user's (buyer's) web browser.

Payment notification form - generated by the IntellectMoney system to notify the online store about the creation or change of the status of the SKO. The notification is transmitted without using the user's (buyer's) web browser to the online store's website.

Request form for crediting or unblocking funds - generated by the online store to request the release of funds (return to the user), or crediting of funds to the online store’s account in the IntellectMoney system. Used if, when creating the CCO, the date of blocking (holding) of funds for the CCO was specified. The request is transmitted without using the user's (buyer's) web browser to the IntellectMoney website.

4.2.1. Payment request form

This form transmits a request from the online store website to the IntellectMoney system through the user's (buyer's) web browser. It must have the following attributes and fields:
Action - https://merchant.intellectmoney.ru/ru/

Method- POST, GET

Multilingual payment page Expand source

Https://merchant.intellectmoney.ru/ru/ - Russian language https://merchant.intellectmoney.ru/en/ - English language https://merchant.intellectmoney.ru/de/ - German language https://merchant .intellectmoney.ru/fr/ - French language https://merchant.intellectmoney.ru/es/ - Spanish language https://merchant.intellectmoney.ru/pt/ - Portuguese language https://merchant.intellectmoney.ru/ it/ - Italian language https://merchant.intellectmoney.ru/jp/ - Japanese language https://merchant.intellectmoney.ru/bg/ - Bulgarian language

Table 2.1 Payment request form fields

Name

HTML form field name

Required

Description

Store ID

eshopId

Yes

https://www.intellectmoney.ru/ru/enter/ps_organization_shop/ in the "ID" column

orderId

Yes

Purpose of payment

serviceName

No

Sum

payment

recipientAmount

Yes

The payment amount that the online store wishes to receive from the user (buyer). The amount must be greater than zero, the fractional part is separated by a dot, two digits after the dot.

The maximum length is 10 digits including decimals.

Currency

payment

recipientCurrency

Yes

Payment currency. Can take values:

  • RUB and RUR - for payments in rubles
  • TST - for test payments
  • USD - for payments in American dollars
  • EUR - for payments in euros

Attention: USD and EUR can be transferred only for payments via bank card (preference=bankCard). You can obtain detailed information about connecting foreign currencies from your personal manager.


Etc The rules for using TST currency are described in this article -

Attention!When using currencyRUB and RUR invoices can only be issued to an email to which the organization is not registered.

Username

userName

No

User's (buyer's) full name. Entered by the user (buyer).

User email

user_email

No

User (buyer) email. Entered by the buyer himself.

Maximum length is 255 characters.

Successful payment address

successUrl

No

The address to which the user (buyer) will be redirected in case of successful payment

The maximum length is 512 characters.

Return address to the online store backUrlNo

The address to which the user (buyer) will be redirected if the link is clicked" Return to store" on the payment page

The maximum length is 512 characters.

Payment methods for the user - go directly to the details entry page

preference

No

Payment methods that will be available for selection when paying for your purchase. If one parameter is specified, the user will be redirected to the details entry page. (when setting the bankCard parameter and specifying the user's email, the user will go straight to entering the bank card number, and the account will already be created. If email is not specified, the user will be redirected to the email entry page)

Possible values ​​(if several are selected, they are separated by a comma):

Payment from IntellectMoney account - inner;

Bank card Visa/MasterCard - bankCard;

Attention! If you pass the preference or lmi_pay_method parameter when requesting a payment, only the passed payment methods will be displayed, even if all others are enabled. For example, if you pass preference=BankCard, the user will immediately be taken to the page for entering card details. If you click on the "Change payment method" button, the user will return to the payment selection page, but only the payment method by bank card will be shown. .

Turning on the holding mode holdModeNo

Responsible for turning on the holding mode, and can take three states:

  1. "1" - turns on the holding mode, in this case, it is necessary to pass the expireDate and/or holdTime parameters
  2. "0" - turns off the holding mode, accounts will not be held
  3. "null" = do not pass this parameter - the holding mode is determined in your personal account

It is also necessary include in the “Accept only unique purchase IDs” option.

Lifetime of the SKO

expireDate

No

The date and time, upon reaching which it will no longer be possible to pay the invoice in the IntellectMoney system.

Transfer to format “yyyy-MM-dd HH:mm:ss”.

Holding period for fundsholdTimeNo

The time after which the held (frozen) funds will be credited to the store’s account or returned to the buyer is measured in hours.

An integer from 0 to 119 hours.

Check details
merchantReceiptNo

This parameter is required for stores with online checkout enabled

Compact designframeNoWhen passing the value 1, the payment page will be displayed in a compact design

Additional online store options

No

All form fields that have the prefix “UserField_N” or “UserFieldName_N” in their names (where N is a serial number) are processed automatically by the IntellectMoney system and transmitted to the online store website.

The maximum length of all additional fields in total is 4000 characters.
More details about additional fields are written in the section:

Signature for committed data

hash

No

The formation algorithm is described in section .

Important: For scheduled operations, the signature generation algorithm is described in the section " ".

The parameter is required when enabling the "Require HASH" option in the store settings.

Recurrent operation type

The type of recurrence operation takes one value - " Activate".

With this command, the card is registered in the payment chain. Next, for all operations with this card, you need to transfer the paid invoice (Invoice Number for Payment) in the recurringSourceInvoiceId field, other operations on issued invoices are carried out by the system automatically without user intervention. By passing this parameter, you link the card the buyer used to pay to the SCO number by which the payment was made.

ShortPan plastic card 2

shortPan

Short number of the plastic card (first and last four digits of the plastic card) with which the invoice was paid.

Country 2

country

The country in which the plastic card was issued. 2

Issuer bank 2

bank

The bank that issued the plastic card. 2

IP address 2

ipAddress

IP address of the user who paid the invoice. 1

The secret key

secretKey

Value Secret key, known only to the online store and the IntellectMoney system. Sent if the "Send secret key" function is enabled. This field will be empty if the "Payment Alert URL" parameter does not provide privacy (the HTTP protocol is used, not HTTPS).

Verification signature

hash

The control signature of the payment execution notification, which is used to verify the integrity of the received information and uniquely identify the sender.

The formation algorithm is described in the " " section.

Online store parameters

Determined by the online store

All fields submitted from the online store website in the "Payment Request Form" with the prefix "UserField_N", "UserFieldName_N" (where N is the serial number)

Scheduled operation status reccurringState

Displays the status of the scheduled operation for this payment.


Example 2.

Payment notification form Expand source

... ...

... ...
...

4.2.3. Request form for crediting or unblocking funds

This form is transmitted by the online store without using the user's (buyer's) web browser to the IntellectMoney website.

The request is intended to be used if blocking (holding) of funds for CKO is used. The request can be sent by the online store only after receiving payment alerts with purchase status (paymentStatus) = 6 (the required amount is blocked at the SKO, a request for debiting or unblocking of funds or the expiration of the blocking period is awaiting).

In response, the IntellectMoney website returns the string “OK” if the request was successful, or a line describing the error otherwise.
The form must have the following attributes and fields:

Method- POST

Table 4. Fields fForms for requesting credit or unblocking of funds

Name

HTML form field name

Required

Description

Store ID

eshopId

Yes

The number of the online store website to which the user (buyer) must make a payment. Can be seen on the page https://www.intellectmoney.ru/ru/enter/ps_organization_shop/ in the "ID" column

Internal online store purchase number

orderId

Yes

In this field, the online store sets the purchase number in accordance with its accounting system. It is advisable to use a unique number for each payment, which will allow you to quickly obtain information related to it through the IntellectMoney system.

Maximum length is 50 characters.

Transaction amount No

The amount by which it is necessary to perform an operation to unblock funds under a held SKO, or the amount by which the initial amount of SKO must be reduced in case of partial payment, or the amount by which a refund must be made on a paid SKO.

This parameter is passed only to unlock funds with a held RMS, or to reduce the initial amount of RMS in case of partial payment (action=Refund), or when making a return for a paid RMS

When funds are credited (action=ToPaid) or when funds are returned in full, this parameter is not transmitted.

Requested Action actionYes

The action that needs to be performed with the CSE: Refund to unblock funds (for a held CSE), to return funds (for a paid CSE) or to reduce the amount of CSE (for partial payment). Or ToPaid to credit funds to the online store account (with a held RMS).

Purpose of payment

serviceName

No

Description of the product or service. Formed by an online store.

The maximum length is 1024 characters.

New check parameters merchantReceiptNo

Data for generating a new receipt at the online cash register.

Used in the case of a partial reduction in the amount of the RMS or a partial refund under the RMS (the action=Refund and operationAmount parameters were passed) for a store that has an online cash register connected to the IntellectMoney system. In the case of a partial reduction in the SKO amount, you need to submit a new check (i.e., the item of goods for which payment will be made), in the case of a partial return under the SCO, you need to submit a return receipt (i.e., the item of goods for which the return is made).

Signature for committed data

hash

No

The control signature of the request, which is used to verify the integrity of the information received from the store and uniquely identify the sender.

The generation algorithm is described in the section “Verified signature of payment data”. Only required when you enable the "Require HASH" option in your store settings.

The secret keysecretKey

In case the signature (hash) is not used.

Example 3.1. Request form for crediting funds to an online store

... ...

..

Example 3.2. Request form for unlocking funds (refund) to the buyer Expand source

... ...

..

operationAmount- d This parameter is used in the case of partial payment of the SKO, or if it is necessary to partially unblock funds on a held SKO, or in the case of a partial refund of funds on a paid SKO.

Case 1:A held standard deviation was set at 30.00 rubles. The buyer paid for this SCO with a plastic card, funds in the amount of 30.00 rubles are blocked on the plastic card account. The store needed to reduce the amount of standard deviation by 10.00 rubles. The store sends a request with the parameters action=Refund and operationAmount=10.00. After this, 10.00 rubles are unlocked on the buyer’s plastic card account and the RMS amount is reduced to 20.00 rubles.

Case 2:The usual standard deviation was set at 30 rubles. The client partially paid the SCO in the amount of 20.00 rubles. The SKO is in the “partially paid” state and cannot be credited to the store’s account. The store sends a request with the parameters action=Refund and operationAmount=10.00. The amount of standard deviation changes to 20.00 rubles. The SCO goes into the “fully paid” state and is credited to the store’s account.

Case 3:The usual standard deviation was set at 30 rubles. The client paid in full the SCO in the amount of 30.00 rubles. The SKO is in the “fully paid” state and the funds have been credited to the store’s account. The store sends a request with the parameters action=Refund and operationAmount=10.00. According to SKO, funds are returned to the payer in the amount of 10.00 rubles.


Example 3.3

Request form for partial unblocking (refund) of funds to the buyer Expand source

... ...

..

Example 3.4

Depositing funds in the PHP programming language

To implement this example you will need the libcurl package.

Example

"Your store number in IntellectMoney", "orderId" => "Order number in the online store system", "action" => "ToPaid", "secretKey" => "Shop secret key in IntellectMoney", "hash" => " create hash", ]; $URL = "https://merchant.intellectmoney.ru/ru/index.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $URL); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $result = curl_exec($ch); curl_close($ch); print_r($result); ?>

4.3. Checking payment information

When a payment is made, the IntellectMoney system sends a notification about the payment via " Payment notification form" on " Payment information URL", specified by the online store.
We recommend that you check the data received through " Payment notification form":

  1. Check whether the data is actually transferred from the IntellectMoney system (Checking the data source) to the IP address.
  2. Check whether the data was corrupted during transmission (Data Integrity Check)
  3. Check payment amount
  4. Check the online store website number

4.3.1. Checking the data source

As stated above, the value of the "Secret Key" parameter should be known only to the IntellectMoney system and the online store. Based on this, The secret key can be used to authenticate the source that sent the payment data. An online store can authenticate using several methods, depending on whether the functionality is enabled "Send secret key."
Requests to the store from the IntellectMoney system can only come from the subnet 91.212.151.0/24 . An example of checking whether an IP belongs to a subnet:

Example

If (!preg_match("/91.212.151.\d(0,255)/", $_SERVER["REMOTE_ADDR"]))( return "ERROR! IP MISMATCH!"; die; )

It is advisable to use the HTTPS protocol for data transfer.

4.3.2.1. Formation of a control signature

When generating a control signature, the IntellectMoney system “glues” the field values ​​into one line, separating them with “::”.
For " Payment notification forms
eshopId);
orderId);
3. Description of purchase ( serviceName);
4. Account number in the IntellectMoney system ( eshopAccount);
5. Payment amount ( recipientAmount);
6. Payment currency ( recipientCurrency);
7. Payment status ( paymentStatus);
8. Username ( userName);
9. User Email ( userEmail);
10. Date and time of payment ( paymentData);
11. Secret key ( secretKey)

Example 4. Generating a string and signature for verification in "Payment notification form"

Signature line: 17354::order_0000001::Book::4356091274::12.30::RUB::5::Artem Dvoryadkin:: [email protected]::2010-01-17 13:12:03::myKey
Received hash:
When implementing signature verification, it is recommended to compare the result obtained with the example above.

For "" the following fields are merged in the following order:

  1. Online store website number ( eshopId);
  2. Online store purchase number ( orderId);
  3. Requested action ( action);
  4. The secret key ( secretKey)

Example 5. Formation of a line and signature for "Request forms for crediting or unblocking funds"

Signature line: 17354::order_0000001::ToPaid::myKey
Received hash:
When implementing signature generation, it is recommended to check the result obtained with the example above.
MD5 is formed by a sequence of 32 hexadecimal digits (example "f849a1c57c66b372ec4a3a2e04d2feba") in accordance with the widely used Message Digest 5 algorithm (MD5) developed by Ron Rivest of the MIT Laboratory for Computer Science and RSA Data Security, Inc. The algorithm was published on the Internet in April 1992 (RFC 1321).

4.3.2.2. Verification of control signature

Checking the control signature on the online store website using the following algorithm:

  1. Form a string by "gluing" together the parameter values ​​obtained via " Payment notification form", in the same order as when forming a control signature, separating them with "::" in the IntellectMoney system (see above). Remember that when forming a signature, The secret key.
  2. Calculate the MD5 of the resulting string.
  3. Compare the resulting value with the value of the parameter " hash"received through " Payment notification form". If the generated signature matches the one received via " Payment notification form", the data has not been changed, and the data source is indeed the IntellectMoney system.

4.3.2.3. Checking the amount and currency of payment

Despite the fact that the user (buyer) cannot change the payment amount, the online store is recommended to control information about the amount and currency of payment transmitted through the parameters " recipientAmount" And " recipientCurrency".

4.3.2.4 Checking the site number (ID) of the online store

Despite the fact that the user (buyer) cannot change the number of the site to which the payment is made, the online store is recommended to control information about the site number, which is transmitted through the parameter " eshopId", especially when using several sites to accept payments through the IntellectMoney system.

4.4.1 Checking the request form data


1. Online store website number ( eshopId);
2. Online store purchase number ( orderId);
3. Description of purchase ( serviceName);
4. Payment amount ( recipientAmount);
5. Payment currency ( recipientCurrency);
6. Secret key ( secretKey);

Example

  1. eshopId= 17354
  2. orderId=1
  3. serviceName=buying a book I want to know everything
  4. recipient Amount=10,10
  5. recipientCurrency=RUB
  6. secretKey=test


Signature line: "17354::1::buying the book I want to know everything::10,10::RUB::test".

Signature for example

The correctness of signature formation can be checked in the hash signature calculator

4.4.2 Checking request form data for scheduled operations

To exclude the possibility of substitution of data transmitted by the store, the store can sign it. In this case, the IM will check the received data according to the signature. If a discrepancy between the transmitted data and the signature is detected, the purchase will not be created. To enable the mode, you need to check the box next to the “Require Hash” field in the IntellectMoney protocol settings and save the protocol parameters. The signature is formed by “gluing” the field values ​​into one line using the “::” separator.
1. Online store website number ( eshopId);
2. Online store purchase number ( orderId);
3. Description of purchase ( serviceName);
4. Payment amount ( recipientAmount);
5. Payment currency ( recipientCurrency);
6. Secret key ( secretKey);

Example

  1. eshopId= 17354
  2. orderId=1
  3. serviceName=buying a book I want to know everything
  4. recipient Amount=10,10
  5. recipientCurrency=RUB
  6. recurringType=Activate
  7. secretKey=test


Signature line: "17354::1::buying the book I want to know everything::10,10::RUB::Activate::test".

Signature for example

4.5 Rules for generating a receipt for an online cash register (merchantReceipt)

Data for generating a receipt at the online cash register. Represents a JSON string. To correctly display the name of the product in a receipt, the text parameter must be passed in UTF-8 encoding. You can correctly generate a JSON string from an array of data using the PHP json_encode programming language function. You can check the correctness of the JSON string using the PHP json_decode function.

Important: Documents are generated by the fiscal drive (FN), this fact affects the encoding of the transmitted strings, the exchange of messages via http with the cash register is carried out in UTF-8 encoding, but when writing to the FN, the lines are transmitted in CP866 encoding, which supports a smaller character set than UTF-8 , for example: in CP866 there are no characters "" and they will not be transmitted to the FN - instead of the string " Juice "Pear"" in the document will be " Pear juice." Escaping characters is possible using the backslash "\" or the addslashes function in PHP.

JSON structure - strings

( "inn":"7704019762", "group":"Main", "content": ( "type":1, "customerContact":" [email protected]" "positions":[ ( "quantity":2.000, "price":12.45, "tax":6, "text":"Bulka" ), ( "quantity":1.000, "price":5.10, "tax" :4, "text":"Matches" ) ], ) )

Name

Element

Description

Amount ValidationskipAmountCheck

Disable the built-in check that check item amounts correspond to the invoice amount. By default, if the parameter is not passed - 0

Can take values ​​0 or 1

Your Taxpayer Identification Number.innIndividual Taxpayer Number obtained from the Federal Tax Service
Group name. group

Default is "Main". In order to put it in another group, you need to create a new group in Orange Data.

If you pass a group that does not exist, Orange Data will return an error.

Document Contents contentFor the content of this field, see the Content Table.

Table content

Name

Element

Description

Document typetype

You need to pass the number according to the action:

  1. Coming
  2. Receipt return
  3. Consumption
  4. Return of consumption
Buyer details customerContact

Phone or Email - buyer

Phone format: +ХХХХХХХХХ

Agent signagentType

Optional field. Transmitted if the registration report and (or) the current re-registration report contains the “agent attribute” attribute (tag 1057), which has a value identical to the value of the “agent attribute” attribute (tag 1057) of the cash receipt.

For agent types, the following values ​​must be passed:

  1. bank payment agent - agentType = 1
  2. bank payment subagent - agentType = 2
  3. paying agent - agentType = 4
  4. payment subagent - agentType = 8
  5. attorney - agentType = 16
  6. commission agent - agentType = 32
  7. other agent - agentType = 64

If the seller has several agent characteristics, for example, a bank payment subagent (agentType = 2), a verified agent (agentType = 16), and another agent (agentType = 64), then the value of the agentType parameter must be the sum of the agentType values ​​of each of the characteristics agent, i.e. for the types listed in this example, the parameter agentType = 2 + 16 + 64 = 82

Can take values ​​from 1 to 127

List of items in the check positions

List of goods for which payment is made. The maximum number of products is 170 units. See the positions table for the content of this field.

Positions table

Name

Mandatory

Description

quantityYes

Quantity of goods.

A decimal number accurate to 3 characters after the period.

priceYes

The price of the product including all discounts and surcharges.

Decimal number accurate to two decimal places.

taxYes

VAT rate. You need to pass a number from 1 to 6:

1 - VAT rate 20%

2 - VAT rate 10%

3 - VAT rate 20/120

4 - VAT rate calculated. 10/110

5 - VAT rate 0%

6 - VAT is not assessed

textYes

Description of the item on the receipt (product).

String up to 128 bytes.

paymentSubjectType

No

Subject of calculation. You need to pass a number from 1 to 13:

Product = 1,
Excise goods = 2,
Work = 3,
Service = 4,
Gambling bet = 5,
Gambling winnings = 6,
Lottery ticket = 7,
Lottery winnings = 8,
Providing RID = 9,
Payment = 10,
Agency fee = 11,
Composite calculation item = 12,
Other calculation item = 13

paymentMethodTypeNo

Method of calculation. You need to pass a number from 1 to 7 (If null is passed,
then the value 4 - Full calculation will be transferred to the calculation item.):

Prepayment 100% = 1,
Partial prepayment = 2,
Advance = 3,
Full calculation = 4,
Partial payment and credit = 5,
Transfer on credit = 6,
Loan payment = 7

Example code for inserting into a form

An example of creating a merchantReceipt in PHP

$inputPositions = array(array("quantity"=>"1", "price"=>"10", "tax"=>"6", "text"=>"Product number 1"), array("quantity "=>"1", "price"=>"11", "tax"=>"6", "text"=>"Product number 2"), array("quantity"=>"1", "price "=>"12", "tax"=>"6", "text"=>"Product number 3")); function createMerchantReceipt($inputPositions)( $inn = "Your IIN"; $customerContact = " [email protected]";//Payer's mail $positions = array(); foreach($inputPositions as $position)( $positions = array("quantity" => $position["quantity"], "price" => $position["price "], "tax" => $position["tax"], "text" => $position["text"],); ) $merchantReceipt = array("inn" => $inn, "group" => "Main", "content" => array("type" => "1", "positions" => $positions, "customerContact" => $customerContact)); return json_encode($merchantReceipt); )

Extra options. Additional parameters are needed to transfer additional information or data to ResultURL and the page in your personal account.
Important: when passing an additional parameter other than userField_N and userFieldName_N, such parameters will not be passed anywhere.
Below is an example of a form that submits five values: " UserField_1", "UserField_2", "UserFieldName_2", "UserFieldName_3", "AnotherField":

Example of a payment request form with additional parameters Expand source

rub.

More details about the values:

Value name

Meaning

ResultURL

Personal Area

UserField_1value_1Name: "UserField_1"
Value: "value_1"

Name: "UserField_1"
Value: "value_1"

UserField_2value_2Name: " UserField_2"
Meaning: " value_2"

Name: "Param name for value_2"

Value: "value_2"

UserFieldName_2
Param name for value_2Name: "UserFieldName_2"
Meaning: "

Today we would like to pay attention to this method of collecting online payment using a buyer’s bank card, such as issuing a “payment link” or sending an invoice by e-mail. Having received such a link, the buyer clicks on it, goes to the secure payment page of the electronic payment processor, enters his bank card details and confirms the payment in favor of the seller by clicking the “Pay” button.

It should be noted that this is the simplest functionality of a payment link. Modern payment service providers have long developed additional options for using links for their clients.

If you are not an online store and you do not have automated sales from your website, before choosing a particular payment service provider, inquire about the capabilities of this link. Remember, details matter.

Beware of archaic systems, they slow down your sales process and force you to spend more time creating an invoice and paying for it.

The link should not be one-time use. Those. you should be able to copy it and paste it wherever you need it: on the website, in the QR code, under the “Buy” button, send it to any messenger, or send it to several clients at once. And also set up a subscription plan if you sell something by subscription and you need to automatically debit money from the buyer’s card on a monthly basis.

Which business is comfortable generating payment links and issuing invoices to customers?

1. A business that sells services to individuals or individual entrepreneurs.

2. Businesses with a small list of goods/services - 10-20 pieces. Because in order to receive a payment link, you need to create each product/service in your personal account.

3. A business that does not have a “cart” on the website, but wants to sell goods/services through the website automatically, i.e. via the "Buy" button.

How a seller creates payment links in his bePaid personal account

1. Logs into the bePaid system office

2. Creates a product there: enter its name, description, and cost in special fields. If necessary: ​​sets the duration of the link; the number of payments that can be made via the link; sets the amount and frequency of automatic debiting from the client’s card after the first payment, if necessary.

4. Inserts it onto the website under the “Buy” button, into a banner, into a QR code, or sends it to the buyer via convenient means of electronic communications.

5. After payment by the buyer, he receives a payment notification by email.

How does the buyer pay?

1. Clicks on the link or button “Buy” on the seller’s website and is taken to the bePaid secure payment page, on which he sees the payment amount and the name of the seller. He is asked to enter his bank card details and confirm the payment by clicking the "Pay" button.

2. After payment, you receive a payment notification to the email address entered during payment.

What is important to consider

The buyer can pay only for one service/product during one payment procedure. In other words, in order for a buyer to buy three services/products, he will need to follow the link/click the “Buy” button three times and make further payment.

And here it is important to understand that if you are selling tickets to a seminar and assume that one client can buy three tickets at once, then the method of manually generating an invoice is not suitable for you. Or, if a buyer wants to buy three items of one product, he will need to click on the buy button three times and pay three times. It is not comfortable. In this case, it is recommended that you still do simple integration and install payment module for your website's CRM.

Can these links be sent to foreign buyers?

Can! Accept VISA, MasterCard, BELKARD cards from any bank, from any country in BYN, RUB, USD, EUR. And also Halva cards.

How does the payment link work? A few of the simplest models.

1. If you sell services and the invoice amount is individual for each buyer (accounting consultation, Skype training, etc.)

In this case, you write information on your website about how you can pay for the service (bePaid managers send an example text to clients).

After the buyer has contacted you and expressed a desire to buy a service, you go to the bePaid system work account, enter data about the service provided in the proposed fields: name, amount, etc. The bePaid system automatically generates a link that you can easily copy and send to the client via email or any other method of electronic communication.

2. If you sell a service or product directly from the site with a fixed price and the client always buys only one product or one service per payment. For example, payment for an online course, personal consultation, access to content, etc.

Next to your product or service, you place a description of the cost of the product/service and a “Buy” button. Under the “Buy” button through the admin panel of your website, place a link to the payment that the system generated in your bePaid personal account.

A buyer, having visited your website, purchases a product or service without an additional call to your company. He clicks on the “Buy” button and is taken to the payment page to enter card details.

3. If you want to sell a product or service at any physical point using a QR code.

You simply create a product in your personal account. Copy the automatically generated payment link and paste it into the QR code. Using the QR app, your customer will open the payment link and be taken to bePaid's secure payment page, where they will be asked to complete the purchase process by entering their bank card details.

A QR code can be created on any free website that specializes in QR programs. Some programs allow you to add a logo, your own colors and track statistics.

4. If you are selling a product or service on a promotion and you need to track the quantity and timing.

When creating a product in your personal account, you can set a certain price, how many times you can buy this product at this price and the validity period of the payment link (hours or days). You insert the link on the website or send it to clients via electronic communication channels.

5. If you sell subscriptions to any content.

In your personal account, you can set up a subscription plan: when and how often to debit money from your regular customer card. For example, a fixed monthly tuition fee for an online programming school.

How to get the opportunity to use “magic” links?

Send us a request, and we will connect you to accepting bank card payments via the Internet and set up a personal account.

Sincerely,
bePaid Team

We will connect your business to accepting bank card payments via the Internet and to the ERIP system.

Invoice by email- a function that allows you to send invoices by email from the website service. You no longer need to save Invoices to your local computer, then open your mail, compose a new letter and attach the invoice as an attachment, now all this is available with one button.

How to send an invoice by email?

There are two ways to send an invoice by email:

  • from the list of accounts, to do this, select “Send by e-mail” from the context menu;
  • from the form for editing the Invoice, Act, TORG-12 and Invoice, to do this, click the "E-mail" button, which is located at the beginning and at the end of the form.

Send Invoice by email

Before sending the Invoice, you must tick the required documents and also indicate the recipient's email address (To).

  • By default, one document is marked for sending. Typically this is an Account if the shipment is from a list of accounts.
  • The list of recipient email addresses is taken from the Counterparty card. To add or change the recipient's email address, you must make changes to the counterparty card.
  • You can also send the document to yourself, that is, to your email address with which you are registered in the service.
  • If necessary, email addresses can be entered manually, separated by commas in the "Enter another email" field.

Sender's address

  • By default, the Sender Address is the service address website.

How to change the sender address

To be able to specify a different sender address, you must activate the “Advanced” option of the “Invoice by e-mail” service. This is what the window will look like Send email with an additional sender selection field:

Stamp and signature

When sending a document by e-mail, stamp and signature are selected by default. If necessary, you can uncheck this item.

Preview

Before sending, you can view all selected documents by clicking the button View.

To send the selected documents, click the button Send.

Extended capabilities

Activate the advanced features of the "Invoice by e-mail" function, and you will be able to:

  • Change the sender's address;
  • Send emails via an external SMTP server;
  • Edit the subject and content of the letter.