Skip to main content

Alipay+ User-Presented Mode (UPM)

Accept in-store payments from Alipay+ users by scanning the customer's payment barcode through your point-of-sale system (POS).

Overviewโ€‹

User-Presented Mode (B scan C) allows merchants to scan a barcode or QR code displayed by the customer in their wallet app. This is ideal for high-volume retail environments where the merchant has a barcode scanner at their point-of-sale terminal.

Key Features:

  • โœ… Fast checkout - Scan and process in seconds
  • โœ… Multiple wallets - Accept payments from 12+ Alipay+ partner wallets
  • โœ… Familiar flow - Similar to scanning product barcodes
  • โœ… High volume - Perfect for busy retail environments
  • โœ… Cross-border - Accept payments from international tourists

Supported Regionsโ€‹

RegionCurrencyMin AmountMax AmountAPI Version
ThailandTHBเธฟ20.00เธฟ150,000.002017-11-02
SingaporeSGD$1.00$20,000.002017-11-02

Supported Walletsโ€‹

WalletThailandSingapore
Alipay CNโœ…โœ…
Alipay HKโœ…โœ…
KakaoPayโœ…โœ…
GCashโœ…โ€”
Touch 'n Goโœ…โœ…
TrueMoneyโœ…โ€”

How It Worksโ€‹

Payment Flow:

  1. Customer opens their wallet app
  2. Customer displays their payment barcode/QR code
  3. Merchant scans the barcode using POS terminal
  4. Charge is created automatically with the barcode
  5. Payment is processed instantly
  6. Both parties receive confirmation

Typical completion time: 5-15 seconds

Implementationโ€‹

Create Charge with Barcodeโ€‹

For UPM, you create the charge directly with the scanned barcode:

curl https://api.omise.co/charges \
-u $OMISE_SECRET_KEY: \
-d "amount=150000" \
-d "currency=THB" \
-d "source[type]=alipayplus_upm" \
-d "source[barcode]=2897991359827699709"

Handle Responseโ€‹

app.post('/pos/payment', async (req, res) => {
const { amount, barcode } = req.body;

try {
const charge = await omise.charges.create({
amount: amount,
currency: 'THB',
source: {
type: 'alipayplus_upm',
barcode: barcode
}
});

if (charge.status === 'successful') {
// Payment successful immediately
printReceipt(charge);
res.json({ success: true, charge_id: charge.id });
} else if (charge.status === 'pending') {
// Wait for webhook
res.json({ success: false, message: 'Awaiting confirmation' });
} else {
res.json({ success: false, message: charge.failure_message });
}
} catch (error) {
res.json({ success: false, message: error.message });
}
});

Handle Webhookโ€‹

app.post('/webhooks/omise', (req, res) => {
const event = req.body;

if (event.key === 'charge.complete') {
const charge = event.data;
if (charge.status === 'successful') {
notifyPOS(charge.id, 'success');
} else if (charge.status === 'failed') {
notifyPOS(charge.id, 'failed', charge.failure_message);
}
}

res.status(200).send('OK');
});

Charge Status Valuesโ€‹

StatusDescription
pendingAwaiting authorization from wallet
successfulPayment completed
failedPayment declined or failed
expiredCharge time limit exceeded

Failure Codesโ€‹

CodeDescription
payment_expiredPayment expired
payment_rejectedPayment rejected by issuer
insufficient_fundInsufficient funds or limit reached
failed_processingGeneral processing failure

Refunds & Voidingโ€‹

  • Void window: Until 16:15 UTC on the transaction date
  • Refund window: Within 1 year of the transaction
  • Partial refunds: Supported

Best Practicesโ€‹

  1. Train staff - Ensure staff know how to prompt customers to show barcode
  2. Good scanner - Use a reliable barcode scanner
  3. Handle errors - Display clear error messages
  4. Fast timeout - UPM should be nearly instant

FAQโ€‹

What is User-Presented Mode (UPM)?

UPM, also known as "B scan C" (Business scans Customer), is an in-store payment method where the customer displays a barcode/QR code from their wallet app and the merchant scans it. This is faster than MPM and ideal for high-volume retail.

What's the difference between MPM and UPM?

In MPM, the merchant displays a QR code and the customer scans it. In UPM, the customer displays a barcode and the merchant scans it. UPM is typically faster (5-15 seconds) because it requires fewer steps from the customer.

What type of scanner do I need?

Any standard barcode scanner that can read 1D and 2D barcodes will work. Most modern POS systems already include compatible scanners. The scanner needs to read the numeric barcode from the customer's wallet app.

Which wallets support UPM?

UPM is supported by all Alipay+ partner wallets: Alipay CN, Alipay HK, KakaoPay, GCash, Touch 'n Go, and TrueMoney. Availability depends on your region.

How do I handle payment failures?

Payment failures are returned immediately in the charge response. Check the failure_code field for details (e.g., insufficient_fund, payment_rejected, payment_expired). Display a clear error message and allow retry.

Is UPM faster than MPM?

Yes, UPM is typically faster. Since you're scanning a pre-generated barcode from the customer's app, there's no need to generate a QR code or wait for the customer to scan. Typical completion time is 5-15 seconds.