For iOS below are some guidelines for app to app. Make sure to URL encode the parameters.

  1. Register a URL schema for their app in the info.plist file. (This is so that we can navigate back to the merchant app when the transaction is done). This screenshot shows an example:

Register a URL Schema

  1. Generate a QR Code using the Create Code API request

  2. Construct a URL with the correct format (passing the QR Code and return URL as parameter) and call it when you want to make a purchase. Sample request:

- (IBAction)purchase:(id)sender 
    //The product QR Code
    NSString *qrCode = self.codeView.text;

    //URL to call when transaction is done. Register your schema in info.plist file
    NSString *returnUrl = @"";

    //Remember to URL encode
    NSString *encodedReturnUrl = [self urlEncode:returnUrl];

    //Construct the URL with the parameters
    //The URL format is schema://hostname/qrCode/returnUrl
    NSString *urlStr = [NSString stringWithFormat:@"Scan to to", qrCode, encodedReturnUrl];
    NSURL *url = [NSURL URLWithString:urlStr];

    //Open the URL, this
    [[UIApplication sharedApplication] openURL:url];

*iPhone will not give you an option to select which Scan to Pay App to use to handle the payment. It will select one for you. This is completely out of our control at this point in time.