When to Use QR Order Pay
- Best For
- QR Types
Ideal use cases:
- Payment is initiated by the user, not the merchant
- No POS hardware available
- Hands-off checkout flow desired
- Printed or digital QR codes
- Desktop QR checkout support needed
- Restaurants (table QR)
- Cafés and takeaway counters
- Parking machines / mobility services
- Self-service kiosks without scanner hardware
- Digital invoices or screens
- E-commerce desktop checkout (scan-to-pay)
Payment Flow
1
Create Order
Merchant creates an order on their backend system
2
Generate QR Code
Merchant backend calls Rebell
createQrOrder API3
Display QR
Rebell responds with a QR code payload to be rendered on screen or printed
4
User Scans
User scans the QR code with the Rebell SuperApp
5
User Confirms
The app displays the order and requests confirmation from the user
6
Process Payment
Rebell processes the payment
7
Webhook Notification
Rebell sends webhook notification to the merchant backend
8
Complete Order
Merchant backend confirms order and completes the business flow
Sequence Diagram
API Specification
Endpoint
Request Headers
Include standard authentication headers:Request Body
Payment product type assigned by Rebell
Unique order identifier (idempotency key). Must be unique per transaction.
Payment amount details
Order details
Response Parameters
Result details
QR code payload string (NOT an image). Must be rendered using a QR library.
Rendering the QR Code
The API returns a string payload that you must render into a visual QR code:Merchant Behavior Rules
Merchant MUST
Merchant MUST NOT
Handling Payment Completion
Upon Receiving Webhook SUCCESS
Payment completed successfullyActions to take:
- Mark the order as paid in your system
- Update frontend (web/mobile/table display)
- Proceed with order fulfillment
- Send confirmation to customer (email, SMS, etc.)
Upon Receiving Webhook FAIL
Error Scenarios & Recovery
QR Expired
QR Expired
ResultCode:
QR_EXPIREDCause: User scans a QR long after creation (typically > 5 minutes)Recovery:- Generate a fresh QR code with a new API call
- Display “QR code expired, please refresh” message
- Implement auto-refresh mechanism for dynamic QR
Invalid QR Payload
Invalid QR Payload
ResultCode:
INVALID_QR_CODECauses:- Wrong encoding used when rendering
- Resizing too aggressively (QR became unreadable)
- Using lossy image formats
- Use error correction level ‘M’ or ‘H’
- Ensure minimum size of 200x200px
- Use PNG or SVG format (not JPEG)
- Don’t modify the payload string
Amount Mismatch
Amount Mismatch
ResultCode:
ORDER_AMOUNT_INVALIDCause: Merchant changes the amount after QR generationFix:- Always generate a new QR for updated amounts
- Never reuse QR codes for different amounts
- Implement order amount locking
User Rejects Payment
User Rejects Payment
ResultCode:
PAYMENT_REJECTEDCause: User explicitly cancels in the appRecovery:- Display: “Payment not completed”
- Offer option to generate new QR
- Allow alternative payment methods
Risk / Compliance Issues
Risk / Compliance Issues
ResultCode:
RISK_REJECTCause: Payment blocked by risk/fraud controlsRecovery:- Encourage user to try another payment method
- Contact support if issue persists
- Don’t retry automatically
Security Considerations
UX Recommendations
Create optimal user experiences for different QR types:- Dynamic QR
- Static QR
- Desktop Checkout
For order-specific QR codes:
- Show a countdown timer (optional)
- Auto-refresh QR every few minutes if needed
- Display order amount prominently
- Allow user to retry easily
- Show “Scan with Rebell to pay” instruction
- Update UI immediately on webhook receipt
Mobile Web Considerations
If the user is on mobile web, consider offering a direct app link instead of QR code:This provides better UX than asking mobile users to scan a QR on their own device.
Testing Checklist
Test these scenarios in sandbox before going live:Implementation Example
Here’s a complete implementation example:Complete Flow Example