Guides
Markdown
QR Code Wallet Payments (Apple Pay, Google Pay, PayPal)

Diddo supports frictionless wallet payments through a QR-based checkout flow.

Instead of redirecting users directly to a hosted checkout page, you display a Diddo QR Code that customers scan with their phone.

Scanning launches a Diddo-hosted checkout page on their device where they can complete payment with Apple Pay, Google Pay, or PayPal.

๐Ÿ’ก Wallets automatically preload customer information (shipping address, saved cards, etc.), creating an extremely fast checkout with minimal user actions โ€” driving higher conversion rates.

Screen_Shot_2025-10-08_at_10.48.36_PM.png

๐Ÿ”—ย This demo shows a sample QR code checkout experience after the initial cart flow.


This section covers:

  • How Diddoโ€™s QR-based wallet checkout works
  • Supported payment methods
  • Customizing the QR checkout experience
  • Error handling

๐ŸŒ€ How QR Checkout Works

๐Ÿ“˜ Note: Full request/response schemas are available in the API reference.

  1. Create a Cart

    Build a cart with items and shipping details via the Diddo API.

  2. Generate QR Code

    Call the QR endpoint to receive the raw QR code image (SVG or PNG).

  3. Customer Scan

    The customer scans the code with their mobile device.

  4. Wallet Payment

    On the Diddo-hosted page, the customer sees wallet options available on their device (Apple Pay, Google Pay, PayPal).

  5. Success Redirect

    Once payment completes, Diddo redirects to your configured success URL (defaults to Diddoโ€™s hosted success page).


๐Ÿ”Œ Endpoint

Endpoint:

bash

To get SVG:

  • Set header: Accept: image/svg+xml
  • Or force with extension: /checkout/:cart_id/qr.svg

To get PNG:

  • Set header: Accept: image/png
  • Or force with extension: /checkout/:cart_id/qr.png

Response:

  • Body: raw image bytes
  • Content-Type: image/svg+xml (SVG) or image/png (PNG)
  • Cache-Control: no-store (sessions are short-lived)

cURL Examples:

bash

๐Ÿ–ผ๏ธ Frontend Rendering Examples

โœ… Simplest (recommended)

html

Optional: Inline SVG (for custom styling)

javascript

๐Ÿ’ก In most cases, simply pointing an <img> tag at the Diddo QR endpoint is all thatโ€™s required.


๐Ÿ“ฑ Supported Payment Methods

  • Apple Pay (iOS & Safari; preloaded shipping + cards)
  • Google Pay (Android & Chrome; saved cards + addresses)
  • PayPal (global coverage; linked addresses + balances)

๐Ÿ’ก Wallet flows often preload shipping addresses directly inside the wallet interface. Customers typically just confirm and pay.


๐Ÿ”„ย Cart Status Polling

You can track checkout progress in real time by polling the cart status endpoint.

This is useful in QR or cross-device flows to detect when the customer has completed payment.

plain

Status Values

  • IN_PROGRESS โ€“ checkout active
  • SUBMITTED โ€“ payment complete

Poll every 3โ€“5 seconds until the cart returns SUBMITTED, then display your confirmation screen.


๐Ÿ› ๏ธ Customizing the Success Page

  • By default, customers are redirected to a Diddo-hosted success page.

  • Need a branded success page? Or a custom redirect page?

    Reach out to Diddo โ€” our team will design and provision this for your account.


โš ๏ธ Common Wallet Checkout Errors

  • WALLET_NOT_SUPPORTED

    Device/browser does not support any configured wallets.

  • SESSION_EXPIRED

    QR session expired (sessions auto-expire after X minutes).

  • PAYMENT_FAILED

    Wallet declined or the user canceled.

  • UNSUPPORTED_MEDIA_TYPE

    The requested image type isnโ€™t supported (ensure Accept: image/svg+xml or image/png).

Error responses follow the same structured format as the Checkout Errors guide.


๐Ÿ“ฑSample QR Checkout Flow (Apple Pay)

Screenshot_2025-09-26_at_8.07.59_AM.png


๐Ÿ”— Next: Error Handling โ†’