Skip to main content
QR Order Pay is a user-initiated payment flow in which the merchant generates a QR code containing an order or transaction request. The user scans this QR code using the Rebell SuperApp and completes the payment within the app. This flow works for both static QR codes (fixed merchant reference) and dynamic QR codes (unique order-specific QR). It is ideal for unattended or user-driven scenarios and enables seamless payments without POS hardware.

When to Use QR Order Pay

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
Common scenarios:
  • 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 API
3

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

POST /v1/payments/createQrOrder — see the API reference for all fields.
string
required
QR business type. Use ORDER_CODE for the Merchant Presented Dynamic QR scenario.
string
required
Fixed product code assigned by Rebell: 51051000101000100048 for C Scan B Dynamic (a different code, e.g. 51051000101000100053, is assigned for payments from a merchant PC website). The exact value is provided during the SIT stage.
string
required
QR code protocol. Only CGCP is supported.
object
required
Merchant order details
string
URL that receives the payment notification
Example Request:

Response Parameters

object
required
Result details (resultCode, resultStatus, resultMessage)
string
required
Echo of the merchant transaction ID
string
Rebell’s unique ID of the payment order
string
QR code payload string (NOT an image). Must be rendered using a QR library.
Example Response:
Important Notes:
  • qrCode is a string payload, NOT an image
  • Merchant must render it using a QR library (SVG/canvas/img)
  • Payload encoding is handled by Rebell and must not be altered

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

Critical Don’ts:
  • ❌ Reuse a previously generated QR code for a different order
  • ❌ Modify or shorten the QR payload
  • ❌ Generate QR codes client-side (always via backend)
  • ❌ Rely on the Rebell API response alone — webhook is the final authority

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

Symptom: The user cannot pay a QR that was created a long time ago; no SUCCESS notification arrives.Cause: User scans a QR long after creation. Check the order with inquiryPayment (merchantTransId) before creating a new one.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
Symptom: The Rebell app cannot read the QR code.Causes:
  • Wrong encoding used when rendering
  • Resizing too aggressively (QR became unreadable)
  • Using lossy image formats
Recovery:
  • 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
Symptom: The amount the user sees differs from the current order total.Cause: 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
Symptom: The payment notification arrives with paymentStatus FAIL, or no payment happens.Cause: User explicitly cancels in the appRecovery:
  • Display: “Payment not completed”
  • Offer option to generate new QR
  • Allow alternative payment methods
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

Security Best Practices:
  • ✅ QR codes should not expose sensitive merchant logic
  • ✅ Do not embed personal data in order description
  • ✅ Always generate QR codes server-side (never client-side)
  • ✅ Verify webhook signatures before updating order status
  • ✅ Keep QR validity time limited (recommended < 5 minutes for dynamic QR)
  • ✅ Implement rate limiting on QR generation
  • ✅ Log QR generation attempts for fraud monitoring

UX Recommendations

Create optimal user experiences for different QR types:
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

Next Steps

Webhooks

Implement webhook handlers for payment notifications

Inquiring Payment API

Poll payment status as alternative to webhooks

Link Pay

Alternative mobile app-to-app payment flow

Error Handling

Complete error codes reference