Instant payment notification

The Velespay system sends messages to the specified URL about all successful transactions in the background process. These notifications contain payment data as well as personal information about the buyer.

Activation - IPN

Before you begin, you must perform the following steps:

  • Go to your personal account;
  • Menu Profile - > Wallets;
  • Select Wallet;
  • Open "Business" tab;
  • Verify your business;
  • Section "Payment notification (IPN):";
  • Activate this functionality;
  • Specify URL which the payment status request will be sent after successful payment;
  • Specify a method for sending parameters;
  • Specified Password;

Parameters that the Velespay platform sends to your server upon successful payment:

vm_txn = <Transaction ID in the system Velespay (integer)>;
vm_invoice = <Invoice number, according to your accounting system>;
vm_wallet = <Wallet on which the payment is credited (Yours). Example: VM123456789>;
vm_who_fee = <who pays fees. false = buyer, true = seller>;

vm_amount[gross] = <Amount of the invoice. This amount must be checked if the seller has paid the fees.>;
vm_amount[fee] = <Fees>;
vm_amount[net] = <Amount credited. This amount must be checked if the fees paid by the buyer.>;

vm_currency[id] = <Digital currency code according to ISO 4217. Example: 0840>;
vm_currency[code] = <Currency code according to ISO 4217. Example: USD>;

vm_ps[system] = <Code of the payment system through which the invoice was paid, field "code" of the "Information data" -> "Payment systems/banks">;
vm_ps[code] = <Code of the electronic currency with which the invoice was paid, field "code" of the "Information data" -> "Electronic currency">;
vm_ps[currency] = <National currency code (USD), field "code" of the "Information data" -> "Currencies">;
vm_ps[gross] = <How much the buyer paid>;
vm_ps[fee] = <Fee in the currency of payment>;
vm_ps[net] = <Difference is the amount of payment and fees>;
vm_ps[rate] = <Exchange Rate if the account currency and the payment currency are different>;

vm_buyer[wallet] = <Internal wallet. Example: VM123456789> или <Card/account/wallet number in a third-party system>;
vm_buyer[account] = <Account (integer), if the payer is from Velespay>;
vm_buyer[email] = <E-mail of the payer>;
vm_buyer[phone] = <Payer's phone>;
vm_buyer[name] = <Payer's name (First and Last Name or Company Name)>;
vm_buyer[country] = <Country (ISO 3166-1 Digital country code), if the payer is from Velespay>;
vm_buyer[lang] = <The language of the payer>;
vm_buyer[status] = <Account status (integer) if the payer is from Velespay>;
vm_buyer[ip] = <IP address when paying>;
vm_buyer[bank_name] = <Bank name, if payment is made by SWIFT/SEPA/Card>;
vm_buyer[bank_country] = <Bank country, if payment is made by SWIFT/SEPA/Card>;

vm_status = <Status of the invoice. Transaction status (integer). If the invoice is fully paid, status = 7>;
vm_description = <Seller's comment or message>;
vm_sign = <Control signature. Used to verify the authenticity of the information received>;

If the buyer is not registered in the Velespay system, the vm_buyer field will have only one email parameter.

vm_sign check

You need to create and compare the you have a signature with a field vm_sign.

Using the following algorithm:

  • Generate URL-encoded string of all of the parameters except vm_sign;
  • Generate hash code based on using HMAC method with sha512 algorithm;

Example in PHP:

//Depending on which data transfer method was selected in the settings
$params = $_POST;//or $_GET

//Create a signature
$secretKey = "Your Password from the IPN";
$hash = hash_hmac('sha512', urldecode(http_build_query($params)), $secretKey);

//If signatures match and payment status = 7 (Completed)
if($_POST['vm_sign'] === $hash && $_POST['vm_status'] === 7){
	//This is where actions are taken when the invoice is successfully paid

//If payment verification is not passed
exit('false');//Or true, and the system Velespay do not repeat requests

Payment processor must necessarily return true. Otherwise, the notification will be sent until the correct answer is received. No more than 10 attempts.

For the security of received notifications, check the IP address of the Velespay notification server. Our notification server IP addresses:

Keep in mind that the IP addresses of the notification servers may change.

You can always see what response your payment processor sends. Go to Your account: Menu Profile -> IPN-History.