Redirect iOS Players Directly Back to Your Game

This article explains how to redirect iOS players from the Checkout back into your game using Universal Links.

To redirect iOS players:

  1. Set up a dedicated subdomain. For example, my-subdomain.appcharge.com. For more information, see Apple’s official guide on supporting associated domains.
  2. On this subdomain, host a public .well-known/apple-app-site-association file. This file allows iOS to recognize the redirect URL as a Universal Link, so your app can open automatically after payment. Without this file, players will see a confirmation dialog asking if they want to open the app.
    Note: The file cannot be a .json extension, and must be served with the application/json MIME type.
  3. Run the following command with your domain to verify the MIME type:
curl -I https://my-subdomain.appcharge.com/.well-known/apple-app-site-association

The file content should follow this structure:

{
  "applinks": {
    "details": [
      {
        "appIDs": [
          "ABC123456.com.example.app"
        ],
        "components": [
          {
            "/": "/checkout*",
            "comment": "Matches any URL whose path starts with /checkout"
          }
        ]
      }
    ]
  }
}

Make sure to prefix your App ID with your Apple Developer Team ID, located on the Apple Developer Membership page.

  1. If you haven't already, pass your redirectUrl to the Create Checkout Session API, pointing to your configured redirect domain.

Once everything is set up correctly, iOS will open your app directly after a successful payment, without showing the Open in App confirmation dialog. This creates a smooth experience for players returning to your game.