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:
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
externalto return via Safari instead of the in-app browser - base64 (optional) - Set to
yesto 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:
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:
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
yesif 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-13ean8- EAN-8upca- UPC-Aupce- UPC-Ecode39- Code 39code93- Code 93code128- Code 128codabar- 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:
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:
- Open Qrafter's scanner
- Display "MyApp" as the source
- On successful scan, redirect to
https://example.com/process?code=SCANNED_VALUE - 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.