---
title: "Qrafter and x-callback-url"
description: "Learn how to integrate Qrafter with other apps using the x-callback-url specification for QR Code scanning and barcode creation."
date: 2017-09-25
updated: 2026-02-11
canonical: https://qrafter.app/blog/posts/x-callback-url
---

# Qrafter and x-callback-url

Published on September 25, 2017 · Updated February 11, 2026
By Kerem Erkan

Qrafter and Qrafter Pro support the [x-callback-url](http://x-callback-url.com/) 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 `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:

```
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 `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:

```
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.
