JAYbranding

Payoo Gateway Integration: Connect 50,000 Offline Payment Points

One of the biggest barriers to e-commerce in Vietnam is: Customers who are not tech-savvy or do not have bank accounts. They want to shop online, but only want to... pay in cash. Cash on Delivery (COD) shipping is one solution, but the risk of "order refusal" is very high. A better solution? Integrate Payoo Gateway. Payoo owns a network of over 50,000 transaction points at convenience stores (Circle K, FamilyMart, MiniStop...), allowing customers to order online and visit a nearby store to pay in cash.

1. Payoo - Bridging Online and Offline (O2O)

- Over-the-counter payment: Customers order on the website -> Receive a payment code -> Go to FamilyMart/Circle K, show the code, and pay in cash. - Bill payment: Payoo is the #1 provider for electricity, water, internet, tuition, and consumer loan collections. - Diverse ecosystem: Besides over-the-counter payments, Payoo also supports domestic cards, international cards, and the Payoo E-wallet.

2. Payoo Merchant Registration Process

- Contact Payoo Business. - Sign the payment acceptance service contract. - Receive the integration documentation and Sandbox account: <li><code>BusinessUsername</code>: API login username. - <code>ShopID</code>: Store identifier. - <code>ChecksumKey</code>: Secret key. </li>

3. Technical Integration Guide (Payoo API)

Payoo provides both SOAP and REST APIs. In this article, we will use the REST API for simplicity.

Step 1: Create Order XML

A unique characteristic of Payoo is that order data must be packaged in an XML string (even when using REST). <code>$orderXml = ' <shops> <shop> <session>' . $orderId . '</session> <username>' . $businessUsername . '</username> <shop_id>' . $shopId . '</shop_id> <shop_title>JAY Store</shop_title> <shop_domain>https://jaystore.com</shop_domain> <shop_back_url>' . $returnUrl . '</shop_back_url> <order_no>' . $orderId . '</order_no> <order_cash_amount>' . $amount . '</order_cash_amount> <order_description>' . $orderInfo . '</order_description> <validity_time>' . date('YmdHis', strtotime('+1 day')) . '</validity_time> <notify_url>' . $notifyUrl . '</notify_url> </shop> </shops>'; // Encrypt checksum (SHA512) $checksum = hash('sha512', $checksumKey . $orderXml);</code></pre>

Step 2: Redirect to the Payoo Payment Gateway

<pre><code>// Sandbox Endpoint $payooUrl = "https://newsandbox.payoo.com.vn/v2/paynow/order/create"; // Send POST Request (Form submit) echo '<form action="' . $payooUrl . '" method="POST"> <input type="hidden" name="data" value="' . base64_encode($orderXml) . '"> <input type="hidden" name="checksum" value="' . $checksum . '"> <input type="hidden" name="refer" value="jaystore.com"> <button type="submit">Pay via Payoo</button> </form>'; // JavaScript can be used to auto-submit this form</code></pre>

Step 3: Handle IPN (Notify URL)

<p>Because customers can pay in cash at a store (offline), handling IPN is MANDATORY (Your website cannot wait for the customer to go to the store and then redirect back). <code>// File: payoo_ipn.php // Payoo will call this URL right after the customer pays at the counter $data = $_POST['data']; // Webhook returns base64 XML $checksum = $_POST['checksum']; // Verify checksum if (hash('sha512', $checksumKey . $data) == $checksum) { // Valid checksum - Decode XML $xmlData = base64_decode($data); $xmlObject = simplexml_load_string($xmlData); $status = $xmlObject->status; // 1: Success $orderNo = $xmlObject->order_no; if ($status == 1) { // Update order status = Paid echo "NOTIFY_RECEIVED"; } }</code></pre>

4. Why Choose JAYbranding for Payoo Integration?

<p>Payoo has a fairly complex XML data structure and O2O (Online to Offline) workflow compared to pure e-wallets. JAYbranding will help you: - ✅ Queue handling: When a customer selects "Pay at store", the order on the website will be in "Pending" status. JAYbranding's system will automatically cancel the order if the customer does not pay at the store within 24 hours. - ✅ Send payment codes: Automatically send SMS/Email containing the payment code (Billing Code) to customers so they can easily show it to convenience store staff. - ✅ Security: Ensure XML data integrity to prevent checksum errors. 📞 Reach Offline customers today! Consultation Hotline: 0989 971 131

Payoo FAQ

[faqs] #### If I run a 100% online business, do I need Payoo? Yes, definitely. There is a large segment of customers (students, elderly people) without bank cards/e-wallets. Payoo helps you avoid missing out on this audience. #### Who bears the over-the-counter payment fee? The business bears the transaction fee (around 2% - 3%). Customers paying in-store usually do not pay any extra fees (depending on your policy). #### How long does it take to receive funds from Payoo? Payoo reconciles and transfers funds periodically (usually T+1 or T+2), aggregating all transactions. [/faqs]