Qrafter and x-callback-url

Qrafter and Qrafter Pro support the x-callback-url specification, allowing external apps and web pages to invoke QR code scanning and barcode creation functionality.

Scanning Codes

To invoke Qrafter for scanning a code, use the following URL scheme:

URL Scheme
qrafter://x-callback-url/scan?x-success=SUCCESS_RETURN_URL[&x-source=YOUR_SOURCE_NAME][&x-cancel=CANCEL_RETURN_URL][&browser=external]

Scanning Parameters

  • x-success (required) - The callback URL that will receive results after a successful scan
  • x-source (optional) - Identifies your app or page name to the user
  • x-cancel (optional) - URL to invoke if the user cancels the operation
  • browser (optional) - Set to external to return via Safari instead of the in-app browser
  • base64 (optional) - Set to yes to base64-encode results, which helps avoid encoding issues with special characters

Receiving Scan Results

Include {CODE} in your success URL where you want Qrafter to substitute the scan result:

Example
x-success=https://yoursite.com/return.php?code={CODE}

All parameter values must be URL encoded for proper functionality.

Creating Codes

To invoke Qrafter for creating a barcode, use the following URL scheme:

URL Scheme
qrafter://x-callback-url/create?content=STRING_TO_ENCODE[&base64=yes][&format=CODE_FORMAT]

Creation Parameters

  • content (required) - The data to encode into the barcode
  • base64 (optional) - Set to yes if the content is base64-encoded
  • format (optional) - Specify the barcode type; defaults to QR Code if omitted

Supported Barcode Formats

The following format values are supported for the format parameter:

  • ean13 - EAN-13
  • ean8 - EAN-8
  • upca - UPC-A
  • upce - UPC-E
  • code39 - Code 39
  • code93 - Code 93
  • code128 - Code 128
  • codabar - Codabar

If no format is specified, Qrafter will create a QR Code by default.

Example Integration

Here's a complete example that opens Qrafter for scanning, then returns the result to your website:

Complete Example
qrafter://x-callback-url/scan?x-success=https%3A%2F%2Fexample.com%2Fprocess%3Fcode%3D%7BCODE%7D&x-source=MyApp&x-cancel=https%3A%2F%2Fexample.com%2Fcancelled

This URL will:

  1. Open Qrafter's scanner
  2. Display "MyApp" as the source
  3. On successful scan, redirect to https://example.com/process?code=SCANNED_VALUE
  4. If cancelled, redirect to https://example.com/cancelled

The x-callback-url integration makes Qrafter a powerful tool for automating QR code workflows in iOS. Whether you're building a custom app, creating a web-based solution, or using automation tools like Shortcuts, you can leverage Qrafter's scanning and creation capabilities seamlessly.