{"id":64587,"date":"2026-01-15T17:00:00","date_gmt":"2026-01-18T02:00:00","guid":{"rendered":"https:\/\/jaybranding.com\/?p=64587"},"modified":"2026-01-15T12:37:34","modified_gmt":"2026-01-15T05:37:34","slug":"tich-hop-vnpay-gateway-cong-thanh-toan-chuan-ngan-hang-cho-doanh-nghiep","status":"publish","type":"post","link":"https:\/\/jaybranding.com\/en\/tich-hop-vnpay-gateway-cong-thanh-toan-chuan-ngan-hang-cho-doanh-nghiep\/","title":{"rendered":"T\u00edch H\u1ee3p VNPay Gateway: C\u1ed5ng Thanh To\u00e1n Chu\u1ea9n Ng\u00e2n H\u00e0ng Cho Doanh Nghi\u1ec7p"},"content":{"rendered":"<p class=\"wp-block-paragraph\">N\u1ebfu b\u1ea1n c\u1ea7n m\u1ed9t c\u1ed5ng thanh to\u00e1n &#8220;chu\u1ea9n ng\u00e2n h\u00e0ng&#8221;, uy t\u00edn v\u00e0 h\u1ed7 tr\u1ee3 h\u1ea7u h\u1ebft c\u00e1c lo\u1ea1i th\u1ebb t\u1eeb n\u1ed9i \u0111\u1ecba \u0111\u1ebfn qu\u1ed1c t\u1ebf, th\u00ec <strong>VNPay<\/strong> ch\u00ednh l\u00e0 c\u00e1i t\u00ean \u0111\u1ea7u ti\u00ean ph\u1ea3i nh\u1eafc \u0111\u1ebfn. L\u00e0 \u0111\u1ed1i t\u00e1c chi\u1ebfn l\u01b0\u1ee3c c\u1ee7a h\u01a1n 40 ng\u00e2n h\u00e0ng t\u1ea1i Vi\u1ec7t Nam, VNPay mang l\u1ea1i s\u1ef1 tin t\u01b0\u1edfng tuy\u1ec7t \u0111\u1ed1i cho kh\u00e1ch h\u00e0ng khi th\u1ef1c hi\u1ec7n giao d\u1ecbch gi\u00e1 tr\u1ecb l\u1edbn.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">B\u00e0i vi\u1ebft n\u00e0y, JAYbranding s\u1ebd h\u01b0\u1edbng d\u1eabn b\u1ea1n t\u00edch h\u1ee3p VNPay Gateway &#8211; gi\u1ea3i ph\u00e1p thanh to\u00e1n to\u00e0n di\u1ec7n \u0111\u01b0\u1ee3c c\u00e1c \u00f4ng l\u1edbn nh\u01b0 Vietnam Airlines, Vietjet Air tin d\u00f9ng.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. \u0110i\u1ec3m M\u1ea1nh C\u1ee7a VNPay Gateway<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0110a d\u1ea1ng ph\u01b0\u01a1ng th\u1ee9c:<\/strong> Ch\u1ea5p nh\u1eadn th\u1ebb ATM N\u1ed9i \u0111\u1ecba (Napas), Th\u1ebb qu\u1ed1c t\u1ebf (Visa\/Master\/JCB\/UnionPay), v\u00e0 qu\u00e9t m\u00e3 VNPay-QR.<\/li>\n<li><strong>H\u1ed7 tr\u1ee3 tr\u1ea3 g\u00f3p:<\/strong> T\u1ef1 \u0111\u1ed9ng t\u00ednh to\u00e1n ph\u01b0\u01a1ng \u00e1n tr\u1ea3 g\u00f3p 0% l\u00e3i su\u1ea5t cho th\u1ebb t\u00edn d\u1ee5ng.<\/li>\n<li><strong>Uy t\u00edn cao:<\/strong> Giao di\u1ec7n thanh to\u00e1n mang th\u01b0\u01a1ng hi\u1ec7u VNPay t\u1ea1o c\u1ea3m gi\u00e1c an to\u00e0n nh\u01b0 giao d\u1ecbch tr\u00ean E-Banking.<\/li>\n<li><strong>M\u1ea1ng l\u01b0\u1edbi r\u1ed9ng:<\/strong> H\u01a1n 25 tri\u1ec7u ng\u01b0\u1eddi d\u00f9ng Mobile Banking \u0111\u00e3 t\u00edch h\u1ee3p s\u1eb5n t\u00ednh n\u0103ng qu\u00e9t m\u00e3 VNPay.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">2. Quy Tr\u00ecnh \u0110\u0103ng K\u00fd \u0110\u01a1n V\u1ecb Ch\u1ea5p Nh\u1eadn Thanh To\u00e1n (Merchant)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Quy tr\u00ecnh c\u1ee7a VNPay th\u01b0\u1eddng ch\u1eb7t ch\u1ebd h\u01a1n c\u00e1c v\u00ed \u0111i\u1ec7n t\u1eed:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Li\u00ean h\u1ec7 b\u1ed9 ph\u1eadn kinh doanh VNPay ho\u1eb7c qua \u0111\u1ed1i t\u00e1c t\u00edch h\u1ee3p nh\u01b0 JAYbranding.<\/li>\n<li>N\u1ed9p h\u1ed3 s\u01a1: GPKD + Website \u0111\u00e3 th\u00f4ng b\u00e1o B\u1ed9 C\u00f4ng Th\u01b0\u01a1ng.<\/li>\n<li>K\u00fd h\u1ee3p \u0111\u1ed3ng v\u00e0 \u0111\u00f3ng ph\u00ed setup (n\u1ebfu c\u00f3).<\/li>\n<li>Nh\u1eadn th\u00f4ng tin test tr\u00ean m\u00f4i tr\u01b0\u1eddng Sandbox (Test):\n<ul>\n<li><code data-no-translation=\"\" data-no-auto-translation=\"\">vnp_TmnCode<\/code>: M\u00e3 \u0111\u1ecbnh danh website (Terminal ID).<\/li>\n<li><code data-no-translation=\"\" data-no-auto-translation=\"\">vnp_HashSecret<\/code>: Chu\u1ed7i b\u00ed m\u1eadt d\u00f9ng \u0111\u1ec3 t\u1ea1o Checksum.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">3. H\u01b0\u1edbng D\u1eabn T\u00edch H\u1ee3p K\u1ef9 Thu\u1eadt (VNPay API)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VNPay s\u1eed d\u1ee5ng ph\u01b0\u01a1ng th\u1ee9c Redirect (Chuy\u1ec3n h\u01b0\u1edbng) \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o an to\u00e0n th\u1ebb. B\u1ea1n kh\u00f4ng \u0111\u01b0\u1ee3c l\u01b0u th\u00f4ng tin th\u1ebb c\u1ee7a kh\u00e1ch h\u00e0ng tr\u00ean website.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">B\u01b0\u1edbc 1: T\u1ea1o URL Thanh To\u00e1n<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code data-no-translation=\"\" data-no-auto-translation=\"\">$vnp_Url = \"https:\/\/sandbox.vnpayment.vn\/paymentv2\/vpcpay.html\";\n$vnp_Returnurl = \"https:\/\/yourwebsite.com\/vnpay_return.php\";\n$vnp_TmnCode = \"CGXZ...\"; \/\/ M\u00e3 website t\u1ea1i VNPay\n$vnp_HashSecret = \"XNBC...\"; \/\/ Chu\u1ed7i b\u00ed m\u1eadt\n\n$vnp_TxnRef = date(\"YmdHis\"); \/\/ M\u00e3 \u0111\u01a1n h\u00e0ng\n$vnp_OrderInfo = \"Thanh toan don hang #123\";\n$vnp_OrderType = \"billpayment\";\n$vnp_Amount = 100000 * 100; \/\/ S\u1ed1 ti\u1ec1n (nh\u00e2n 100)\n$vnp_Locale = \"vn\";\n$vnp_BankCode = \"NCB\"; \/\/ M\u00e3 ng\u00e2n h\u00e0ng (\u0111\u1ec3 tr\u1ed1ng n\u1ebfu mu\u1ed1n kh\u00e1ch t\u1ef1 ch\u1ecdn)\n$vnp_IpAddr = $_SERVER['REMOTE_ADDR'];\n\n$inputData = array(\n    \"vnp_Version\" => \"2.1.0\",\n    \"vnp_TmnCode\" => $vnp_TmnCode,\n    \"vnp_Amount\" => $vnp_Amount,\n    \"vnp_Command\" => \"pay\",\n    \"vnp_CreateDate\" => date(\"YmdHis\"),\n    \"vnp_CurrCode\" => \"VND\",\n    \"vnp_IpAddr\" => $vnp_IpAddr,\n    \"vnp_Locale\" => $vnp_Locale,\n    \"vnp_OrderInfo\" => $vnp_OrderInfo,\n    \"vnp_OrderType\" => $vnp_OrderType,\n    \"vnp_ReturnUrl\" => $vnp_Returnurl,\n    \"vnp_TxnRef\" => $vnp_TxnRef\n);\n\n\/\/ S\u1eafp x\u1ebfp d\u1eef li\u1ec7u theo alphabet \u0111\u1ec3 t\u1ea1o checksum\nksort($inputData);\n$query = \"\";\n$i = 0;\n$hashdata = \"\";\nforeach ($inputData as $key => $value) {\n    if ($i == 1) {\n        $hashdata .= '&' . urlencode($key) . \"=\" . urlencode($value);\n    } else {\n        $hashdata .= urlencode($key) . \"=\" . urlencode($value);\n        $i = 1;\n    }\n    $query .= urlencode($key) . \"=\" . urlencode($value) . '&';\n}\n\n$vnp_Url = $vnp_Url . \"?\" . $query;\nif (isset($vnp_HashSecret)) {\n    $vnpSecureHash =   hash_hmac('sha512', $hashdata, $vnp_HashSecret); \/\/ D\u00f9ng SHA512\n    $vnp_Url .= 'vnp_SecureHash=' . $vnpSecureHash;\n}\n\n\/\/ Redirect kh\u00e1ch h\u00e0ng\nheader('Location: ' . $vnp_Url);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">B\u01b0\u1edbc 2: X\u1eed L\u00fd K\u1ebft Qu\u1ea3 Tr\u1ea3 V\u1ec1 (Return URL)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Sau khi thanh to\u00e1n, kh\u00e1ch h\u00e0ng \u0111\u01b0\u1ee3c chuy\u1ec3n v\u1ec1 <code data-no-translation=\"\" data-no-auto-translation=\"\">vnp_Returnurl<\/code> k\u00e8m theo c\u00e1c tham s\u1ed1 GET. B\u1ea1n ph\u1ea3i ki\u1ec3m tra l\u1ea1i ch\u1eef k\u00fd (SecureHash) \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o d\u1eef li\u1ec7u kh\u00f4ng b\u1ecb s\u1eeda \u0111\u1ed5i.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code data-no-translation=\"\" data-no-auto-translation=\"\">\/\/ File: vnpay_return.php\n$vnp_SecureHash = $_GET['vnp_SecureHash'];\n$inputData = array();\nforeach ($_GET as $key => $value) {\n    if (substr($key, 0, 4) == \"vnp_\") {\n        $inputData[$key] = $value;\n    }\n}\nunset($inputData['vnp_SecureHash']); \nksort($inputData);\n$i = 0;\n$hashdata = \"\";\nforeach ($inputData as $key => $value) {\n    if ($i == 1) {\n        $hashdata .= '&' . urlencode($key) . \"=\" . urlencode($value);\n    } else {\n        $hashdata .= urlencode($key) . \"=\" . urlencode($value);\n        $i = 1;\n    }\n}\n\n$secureHash = hash_hmac('sha512', $hashdata, $vnp_HashSecret);\n\nif ($secureHash == $vnp_SecureHash) {\n    if ($_GET['vnp_ResponseCode'] == '00') {\n        echo \"Giao d\u1ecbch th\u00e0nh c\u00f4ng!\";\n        \/\/ C\u1eadp nh\u1eadt tr\u1ea1ng th\u00e1i \u0111\u01a1n h\u00e0ng\n    } else {\n        echo \"Giao d\u1ecbch th\u1ea5t b\u1ea1i. L\u1ed7i: \" . $_GET['vnp_ResponseCode'];\n    }\n} else {\n    echo \"Ch\u1eef k\u00fd kh\u00f4ng h\u1ee3p l\u1ec7 (Sai checksum)\";\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. Nh\u1eefng L\u01b0u \u00dd Quan Tr\u1ecdng Khi T\u00edch H\u1ee3p VNPay<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Checksum Algorithm:<\/strong> VNPay d\u00f9ng <strong>SHA512<\/strong> (tr\u01b0\u1edbc \u0111\u00e2y l\u00e0 MD5\/SHA256). H\u00e3y ch\u1eafc ch\u1eafn b\u1ea1n code \u0111\u00fang thu\u1eadt to\u00e1n m\u1edbi nh\u1ea5t.<\/li>\n<li><strong>IPN (Instant Payment Notification):<\/strong> T\u01b0\u01a1ng t\u1ef1 MoMo, b\u1ea1n c\u1ea7n setup th\u00eam m\u1ed9t URL IPN \u0111\u1ec3 nh\u1eadn k\u1ebft qu\u1ea3 ng\u1ea7m, \u0111\u1ec1 ph\u00f2ng tr\u01b0\u1eddng h\u1ee3p kh\u00e1ch t\u1eaft tr\u00ecnh duy\u1ec7t tr\u01b0\u1edbc khi Redirect v\u1ec1 Return URL.<\/li>\n<li><strong>M\u00f4i tr\u01b0\u1eddng Sandbox:<\/strong> Link API Sandbox v\u00e0 Production kh\u00e1c nhau ho\u00e0n to\u00e0n. Nh\u1edb thay \u0111\u1ed5i khi Go Live.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">5. D\u1ecbch V\u1ee5 H\u1ed7 Tr\u1ee3 T\u00edch H\u1ee3p To\u00e0n Di\u1ec7n C\u1ee7a JAYbranding<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Vi\u1ec7c l\u00e0m vi\u1ec7c v\u1edbi c\u00e1c h\u1ec7 th\u1ed1ng ng\u00e2n h\u00e0ng th\u01b0\u1eddng y\u00eau c\u1ea7u quy tr\u00ecnh b\u1ea3o m\u1eadt kh\u1eaft khe. JAYbranding s\u1ebd gi\u00fap b\u1ea1n:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 <strong>Fast-track H\u1ed3 s\u01a1:<\/strong> H\u1ed7 tr\u1ee3 \u0111\u1ea9y nhanh qu\u00e1 tr\u00ecnh duy\u1ec7t h\u1ed3 s\u01a1 Merchant v\u1edbi VNPAY.<\/li>\n<li>\u2705 <strong>T\u00edch h\u1ee3p chu\u1ea9n:<\/strong> X\u1eed l\u00fd \u0111\u1ea7y \u0111\u1ee7 c\u00e1c API: Thanh to\u00e1n, Truy v\u1ea5n (QueryDR), Ho\u00e0n ti\u1ec1n (Refund) t\u1ef1 \u0111\u1ed9ng.<\/li>\n<li>\u2705 <strong>Giao di\u1ec7n t\u00f9y bi\u1ebfn:<\/strong> T\u00edch h\u1ee3p VNPay v\u00e0o lu\u1ed3ng thanh to\u00e1n (Checkout flow) m\u01b0\u1ee3t m\u00e0, kh\u00f4ng g\u00e2y kh\u00f3 ch\u1ecbu cho kh\u00e1ch.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#f0f0f1;padding-top:20px;padding-right:20px;padding-bottom:20px;padding-left:20px;font-size:20px\"><strong>\ud83d\udcde T\u00edch h\u1ee3p VNPay ngay &#8211; Uy t\u00edn trong t\u1eebng giao d\u1ecbch!<\/strong><br>Hotline: <a href=\"tel:0899991131\"><strong>0899991131<\/strong><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ V\u1ec1 VNPay Gateway<\/h2>\n\n\n<p>[faqs]<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">VNPay-QR kh\u00e1c g\u00ec so v\u1edbi MoMo\/ZaloPay QR?<\/h4>\n\n\n<p class=\"wp-block-paragraph\">VNPay-QR c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c qu\u00e9t b\u1edfi \u1ee9ng d\u1ee5ng Mobile Banking c\u1ee7a h\u01a1n 40 ng\u00e2n h\u00e0ng (Vietcombank, BIDV, Agribank&#8230;) m\u00e0 kh\u00f4ng c\u1ea7n c\u00e0i th\u00eam v\u00ed \u0111i\u1ec7n t\u1eed.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Ph\u00ed giao d\u1ecbch VNPay l\u00e0 bao nhi\u00eau?<\/h4>\n\n\n<p class=\"wp-block-paragraph\">Th\u01b0\u1eddng giao \u0111\u1ed9ng t\u1eeb 0.8% &#8211; 1.5% cho giao d\u1ecbch QR v\u00e0 cao h\u01a1n cho th\u1ebb qu\u1ed1c t\u1ebf. Li\u00ean h\u1ec7 JAYbranding \u0111\u1ec3 c\u00f3 ch\u00ednh s\u00e1ch ph\u00ed t\u1ed1t nh\u1ea5t.<\/p>\n\n\n<p>[\/faqs]<\/p>","protected":false},"excerpt":{"rendered":"<p>N\u1ebfu b\u1ea1n c\u1ea7n m\u1ed9t c\u1ed5ng thanh to\u00e1n &#8220;chu\u1ea9n ng\u00e2n h\u00e0ng&#8221;, uy t\u00edn v\u00e0 h\u1ed7 tr\u1ee3 h\u1ea7u h\u1ebft c\u00e1c lo\u1ea1i th\u1ebb t\u1eeb n\u1ed9i \u0111\u1ecba \u0111\u1ebfn qu\u1ed1c t\u1ebf, th\u00ec VNPay ch\u00ednh l\u00e0 c\u00e1i t\u00ean \u0111\u1ea7u ti\u00ean ph\u1ea3i nh\u1eafc \u0111\u1ebfn. L\u00e0 \u0111\u1ed1i t\u00e1c chi\u1ebfn l\u01b0\u1ee3c c\u1ee7a h\u01a1n 40 ng\u00e2n h\u00e0ng t\u1ea1i Vi\u1ec7t Nam, VNPay mang l\u1ea1i s\u1ef1 tin [&hellip;]<\/p>","protected":false},"author":0,"featured_media":64588,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1025,1024,1026,1022,1023],"class_list":["post-64587","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tin-tuc","tag-code-php-vnpay","tag-cong-thanh-toan-ngan-hang","tag-thanh-toan-the-visa","tag-tich-hop-vnpay","tag-vnpay-qr"],"_links":{"self":[{"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/posts\/64587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/comments?post=64587"}],"version-history":[{"count":1,"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/posts\/64587\/revisions"}],"predecessor-version":[{"id":64618,"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/posts\/64587\/revisions\/64618"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/media\/64588"}],"wp:attachment":[{"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/media?parent=64587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/categories?post=64587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaybranding.com\/en\/wp-json\/wp\/v2\/tags?post=64587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}