Skip to content

Create payment

With Tegro.money, both the seller and the buyer receive an "electronic cashier", which greatly simplifies transactions and speeds up payments.

To create a payment, you need to transfer the necessary parameters to a special url https://tegro.money/pay/?params

Required parameters

Key Description
shop_id Public key of the project
amount Payment amount
order_id Order ID (payment number or customer email)
currency Payment currency (RUB, USD, EUR)
sign Request signature

Extra options

Key Description
lang Interface language (ru, en)
test If it is specified with the value "1" - payment will take place in test mode
payment_system Payment system ID
success_url Url of Success
fail_url Url errors
notify_url Url notifications

To generate a signature, you need to sort all required parameters by key, combine key / value pairs with & and add your secret key to the end. Then hash the resulting MD5 string, for example

<?php 
$secret = 'GB%^&*YJni677';
$data = array(
    'shop_id'=>'D0F98E7D7742609DC508D86BB7500914',
    'amount'=>100,
    'currency'=>'RUB',
    'order_id'=>'123',
);
ksort($data);
$str = http_build_query($data);
$sign = md5($str . $secret);

Attention! If the test payment flag test = 1 was passed to the payment form, this parameter is also involved in the formation of the signature:

<?php 
$secret = 'GB%^&*YJni677';
$data = array(
    'shop_id'=>'D0F98E7D7742609DC508D86BB7500914',
    'amount'=>100,
    'currency'=>'RUB',
    'order_id'=>'123',
    'test'=>1,
);
ksort($data);
$str = http_build_query($data);
$sign = md5($str . $secret);

You can go directly to the payment system if you are ready to transfer all the data for payment in the incoming request. To do this, send the data using the POST method to the URL https://tegro.money/pay/form/, be sure to specify the payment_system parameter and pass all the required fields for this payment method. In most cases, this is email, contact support for more information.

Example:

<form action="https://tegro.money/pay/form/" method="post">
    <input type="hidden" name="shop_id" value="D0F98E7D7742609DC508D86BB7500914">
    <input type="hidden" name="amount" value="100">
    <input type="hidden" name="order_id" value="123">
    <input type="hidden" name="lang" value="ru">
    <input type="hidden" name="currency" value="RUB">
    <input type="hidden" name="payment_system" value="11">
    <input type="hidden" name="fields[email]" value="user@site.ru">
    <input type="hidden" name="sign" value="e51845e62b106d245cc96c431d8aae42">
    <input type="submit" value="Оплатить">
</form>
Back to top