https://api.pay4bit.net/pay?
public_key=1ab24-2&sum=100.00&account=user&desc=Description
public_key – Public key, which can be obtained in the project settings.
account – The customer account ID in your system (This could be a phone number, email, invoice number, or something else).
sum – Payment amount.
desc – Description.
paySystem – Optional parameter that specifies which payment system to redirect the user to immediately without showing the selection page. Possible values:
amex, discover, unionpay, jcb, visa, mastercard, litecoin, xrp, dot, solana, bitcoin, usdt, trx, bank_us, bank_eu, bank_uk, bank_tr
currency – Optional parameter that specifies the currency in which the payment should be made. Possible values:
AZN, AED, USD, EUR, GBP, UAH, BGN, BRL, CAD, CDF, CZK, CHF, DKK, GEL, HUF, INR, MDL, NGN, NOK, RON, ETB, THB, TRY, PLN, KZT, KGS, TJS, UZS, MAD. If not specified, the default currency is EUR.
sign – Optional parameter that specifies the digital signature check_sign of the request.
IMPORTANT: When the digital signature verification feature is enabled, multiple payments cannot be processed using the same signature. In this case, please ensure the uniqueness of the desc or account parameters.
PHP:
<?php
$secret_key = "YOUR_MERCHANT_SECRET_KEY";
$public_key = "YOUR_MERCHANT_PUBLIC_KEY";
$ordernum = "ABCDEFGH"; // Unique order number in your system
$account = "demo";
$desc = "Payment for Invoice #". $ordernum ."";
$currency = "EUR";
$sum = "10";
$amount = number_format($sum, 2, ".", ""); // 10.00
$check_sign = hash("sha256", $desc.$account.$amount.$secret_key);
?>
<form action="https://api.pay4bit.net/pay">
<input type="hidden" name="public_key" value="<?php echo $public_key; ?>">
<input type="text" name="account" value="<?php echo $account; ?>">
<input type="text" name="sum" value="<?php echo $sum; ?>">
<input type="hidden" name="desc" value="<?php echo $desc; ?>">
<input type="hidden" name="currency" value="<?php echo $currency; ?>">
<input type="hidden" name="sign" value="<?php echo $check_sign; ?>">
<input class="btn" type="submit" value="Pay">
</form>
Receipt Data
After payment initiation, the user is redirected to a receipt page where the payment status is tracked. Upon receiving either a successful or error status, the user is redirected to the partners website (Fail URL/Success URL fields in the personal account settings) with GET parameters:
account – Customer ID in the partners system provided during payment
paymentId – Payment number in Pay4Bit system
Digital Signatures of the Request
As an additional security measure for your payments, we have created a digital signature system for requests. The presence of a signature ensures protection against tampering with transmitted values (e.g., changing the payment amount or order number).
sign – MD5 hash. The result of concatenating the parameters: payment id, account, sum, and merchant secret key.
PHP:
$sign = md5($paymentid.$account.$sum.$merchant_secret_key);
check_sign – SHA256 hash. The result of concatenating the parameters: desc, account, amount, and merchant secret key.
PHP:
$check_sign = hash("sha256", $desc.$account.$amount.$secret_key);