JAYbranding

Viettel Money API Integration: Nationwide Payment Coverage Across Vietnam

ViettelPay (now Viettel Money) is not just an e-wallet, but a true "digital bank" with a comprehensive financial ecosystem. Backed by Viettel Group and the Ministry of National Defense, Viettel Money delivers absolute reliability and nationwide coverage reaching even remote and rural areas where traditional banks have yet to expand.

1. Viettel Money's "Secret Weapon": Mobile Money

The biggest differentiator of Viettel Money is Mobile Money. Your customers can pay using only their telecom account balance (Viettel SIM) WITHOUT needing a bank account, or even a smartphone (via *998# USSD). This opens up massive business opportunities if you sell products or services targeting rural customers, seniors, or factory workers.

2. Viettel Money Merchant Registration Process

- Contact Viettel Digital Services (VDS). - Sign the payment acceptance agreement. - Viettel provides the technical documentation package: <li><code>Merchant Code</code> - <code>Access Code</code> - <code>Secret Key</code> - <code>RSA Public Key</code> (For encrypting sensitive data) </li>

3. Technical Integration Guide (ViettelPay API)

Viettel Money uses a high-security mechanism combining an RSA key pair with MD5/SHA hashing.

Step 1: Create Request (Payment Data)

<code>$url = "https://sandbox.viettelpay.vn/payment/v1/create-order"; $merchant_code = "M001"; $order_id = "VT_" . time(); $amount = 500000; $order_info = "Thanh toan may loc nuoc"; $return_url = "https://yourwebsite.com/viettel/result"; $notify_url = "https://yourwebsite.com/viettel/ipn"; $data = array( 'merchant_code' => $merchant_code, 'order_id' => $order_id, 'amount' => $amount, 'currency' => 'VND', 'order_desc' => $order_info, 'return_url' => $return_url, 'notify_url' => $notify_url, 'version' => '2.0' ); // Create Checksum (Signature) ksort($data); $signData = ""; foreach ($data as $key => $value) { if ($value != "") { $signData .= $key . "=" . $value . "&"; } } $signData = rtrim($signData, "&"); $check_sum = strtoupper(md5($signData . $secret_key)); $data['check_sum'] = $check_sum; // Send POST Request // ... (Use cURL to send $data to $url) ... // Receive the payment link (checkout_url) and redirect the customer.</code></pre>

Step 2: Handle IPN

<p>Viettel Money will send the payment result to <code>notify_url</code> via the POST method. <code>// File: ipn_viettel.php $merchant_code = $_POST['merchant_code']; $order_id = $_POST['order_id']; $amount = $_POST['amount']; $response_code = $_POST['response_code']; // 00: Success $check_sum = $_POST['check_sum']; // Verify Checksum // ... (Logic to regenerate checksum as in Step 1 and compare) ... if ($verified && $response_code == '00') { // Transaction successful echo json_encode(['error_code' => '00', 'message' => 'Success']); } else { echo json_encode(['error_code' => '99', 'message' => 'Failed']); }</code></pre>

4. "Mission-Critical" Notes

- IP Whitelist: Viettel Money is very strict about security. You must provide your Server IP for them to whitelist. If you change Hosting/Server and forget to notify them, the API will return an <code>Access Denied</code> error. - RSA Encryption: For advanced APIs (such as refunds), you need to use Viettel's Public Key to encrypt data before sending.

5. JAYbranding's Services

<p>JAYbranding is committed to delivering "military-grade" Viettel Money integration solutions: - ✅ Maximum Security: Penetration testing on the payment module to ensure no one can forge data. - ✅ SmartOTP Integration: Supports a seamless user experience for entering OTP directly on the website (if permitted by Viettel). - ✅ Mobile Money Support: Optimizes the payment flow for customers using feature phones. 📞 Expand payment coverage nationwide with Viettel Money! JAYbranding Hotline: 0989 971 131

FAQ About Viettel Money

[faqs] #### What is the Mobile Money transaction limit? It is typically lower than an e-wallet (around 10 million VND/month) as regulated by the State Bank of Vietnam, making it suitable for small retail transactions. #### Do I need a bank account to use Viettel Money? No. Neither buyers nor sellers are required to have a bank account. Cash can be withdrawn at Viettel transaction points. [/faqs]