JAYbranding

OnePay Gateway Integration: International Visa/Mastercard Payment Solution

When your business begins expanding into the global market or selling high-ticket products (Tours, Hotels, Airline Tickets), the biggest barrier is: How do you accept payments from international customers? Domestic e-wallets like MoMo or ZaloPay typically do not support international credit cards issued abroad. This is where OnePay comes in—a payment gateway specializing in Visa/Mastercard/Amex/JCB cards with international security standards.

1. OnePay - Official Partner of MasterCard International

- Card Specialist: Supports payments from almost all major card networks worldwide: Visa, MasterCard, American Express (Amex), JCB, and UnionPay. - Multi-Currency: Accepts payments in USD, EUR, AUD, and more, automatically converting funds to VND for your business. - 3D-Secure Security: Integrates 2-factor authentication (OTP sent to the cardholder's phone) to minimize Chargeback risks (fraudulent disputes). - Recurring Payments: Tokenization enables automatic monthly billing (ideal for Hosting and Subscription businesses).

2. OnePay Merchant Registration Process

Because it involves international cash flows, OnePay's review process is quite strict: - Contact the OnePay Sales department. - Provide documentation: Business License, Website demo, Refund Policy, and Shipping Policy. The website MUST have an English version. - Risk Assessment: OnePay and the acquiring bank (Vietcombank) will evaluate your business risk profile. - Account Issuance: Receive Test (Sandbox) and Production (Live) credentials.

3. Technical Integration Guide (OnePay API)

OnePay provides two main gateways: Domestic and International. Technically, they are quite similar, differing only in the Endpoint URL.

Step 1: Generate the Request URL

<code>// Config for International Gateway $vpc_URL = "https://mtf.onepay.vn/vpcpay/vpcpay.op"; // Sandbox $SECURE_SECRET = "A1D3..."; // Hash Key $vpc_Merchant = "TESTONEPAY"; // Merchant ID $vpc_AccessCode = "6BE5..."; $vpc_Amount = 100 * 100; // Amount (VND, multiplied by 100) $vpc_ReturnURL = "https://yourwebsite.com/onepay_dr.php"; $md5HashData = ""; $data = array( 'vpc_AccessCode' => $vpc_AccessCode, 'vpc_Amount' => $vpc_Amount, 'vpc_Command' => 'pay', 'vpc_Locale' => 'en', // English interface for international customers 'vpc_MerchTxnRef' => date('YmdHis'), // Order reference code 'vpc_Merchant' => $vpc_Merchant, 'vpc_OrderInfo' => "Order #999", 'vpc_ReturnURL' => $vpc_ReturnURL, 'vpc_Version' => '1' ); ksort($data); $appendAmp = 0; foreach ($data as $key => $value) { if (strlen($value) > 0) { if ($appendAmp == 0) { $md5HashData .= $key . "=" . $value; $appendAmp = 1; } else { $md5HashData .= "&" . $key . "=" . $value; } } } // Generate signature (Checksum) $vpc_SecureHash = strtoupper(hash_hmac('sha256', $md5HashData, pack('H*', $SECURE_SECRET))); $link = $vpc_URL . "?" . $md5HashData . "&vpc_SecureHash=" . $vpc_SecureHash; // Redirect customer header("Location: " . $link);</code></pre>

Step 2: Handle the Response (DR - Digital Receipt)

<p>When the customer returns to your website, you need to check the <code>vpc_TxnResponseCode</code>. <code>// File: onepay_dr.php $vpc_Txn_Secure_Hash = $_GET["vpc_SecureHash"]; unset($_GET["vpc_SecureHash"]); // ... (Sort logic and regenerate hash as in Step 1 for comparison) ... if ($hashValidated && $txnResponseCode == "0") { // 0: Transaction successful echo "Success!"; } elseif ($txnResponseCode != "0") { // Handle common error codes // 1: Bank Declined // 3: No Reply (Connection lost) // 7: Insufficient Funds echo "Transaction failed. Error code: " . $txnResponseCode; }</code></pre>

4. OnePay Tokenization (Recurring Payments)

<p>This is OnePay's most powerful feature. Instead of requiring customers to re-enter their card details every month, you can store a "Token" (encrypted card reference) to charge them automatically. - First payment: The customer pays and selects "Save card". OnePay returns a <code>vpc_Token</code>. - Subsequent payments: You send a request with <code>vpc_Token</code> instead of asking the customer for their card number. OnePay will charge the card associated with that Token.

5. Services from JAYbranding

Integrating international payments carries significant security and operational risks. JAYbranding provides: - ✅ Multi-currency consulting: Set up systems to display USD prices for US customers and EUR for European customers while settling in VND. - ✅ 2-way IPN handling: Ensure order statuses are updated reliably even if the customer closes their browser. - ✅ Custom Checkout UI: Customize the card entry interface directly on your website (using iFrame) to improve user experience instead of redirecting. 📞 Ready to sell globally? Contact JAYbranding: 0989 971 131

OnePay FAQ

[faqs] #### What is the transaction fee for international cards? Approximately 2.5% - 3.5% + a fixed fee per transaction. This rate is higher than domestic cards because fees must be paid to international card networks (Visa/Master). #### How long does it take to receive my funds? For international cards, the settlement period is typically longer—around T+7 to T+14 (depending on your industry's risk level) to reserve against potential customer disputes (Chargebacks). [/faqs]