← All tools

Return Apps

Integrate with returnUrl

Open a helper with query params. The user does one action, then the app redirects back with value + format (contract v1).

Quick start

Always pass an absolute returnUrl and preferably allowedOrigins. Pin/sign default to delivery=hash (parse the fragment, or use the SDK).

import { openReturnApp, parseReturnResult } from '../sdk/return-apps.mjs';

location.href = openReturnApp('pin', {
  returnUrl: location.href,
  allowedOrigins: [location.origin],
  state: 'order-42',
});

const { value, format, error } = parseReturnResult(location);

Resources

Per-app docs & demos