QR Code Payments

A session can be represented as a QR code that can be scanned by any supporting payment app or system camera.

Checkout flow

1 2 3

Session QR code is displayed on site or app. Session is pending.

User scans session QR code with payment app of choice. Session is complete and payment is authorized.

User confirms payment, webhook is sent. Payment is captured.

Your Online Store
Your Product Lorem ipsum dolor sit amet, consectetur adipiscing elit.
¥3,000 Example QR Code
Example Payment App
Example QR Code
Item: ¥3,000 Balance: ¥99,000

How to get a QR code

  1. Create a session
  2. Append /qr.svg or /qr.png to the session_url, and GET it to receive a QR code image
    • As an example: GET https://komoju.com/sessions/abc123xyz/qr.svg
  3. Render the QR code on your frontend
  4. Listen for the sessions.completed webhook to dynamically update your webpage when the customer completes the session

What is the contents of the QR code?

The QR code will always lead to a URL that customers can use to pay. The exact destination of this URL depends on a few factors.

  • When your session supports multiple payment methods, the QR code will lead to a payment method selection page hosted by KOMOJU.
  • When your session supports one payment method that natively supports QR payments, the QR code will be a native deep link to the payment app.

To get a native QR, here is how you can create a session with only one payment method:

curl -X POST https://komoju.com/api/v1/sessions \
  -u sk_123456: \
  -d "amount=8888" \
  -d "currency=JPY" \
  -d "return_url=https://example.com" \
  -d "payment_types[]=paypay" # specify only one payment type