Sarraf API
    Preparing search index...

    Function verifyRedirect

    • Read the params a provider appends to returnUrl on a thank-you page. For UX only: never fulfil an order from it, use the webhook or a status query.

      Unlike pay.redirects.verify, it never throws for a provider that does not sign redirects (Fawry) or is not configured: it returns authenticated: false, status: "unknown".

      export default async function Thanks({ params, searchParams }) {
      const { provider } = await params;
      const result = await verifyRedirect(pay, provider, searchParams);
      if (result.authenticated && result.status === "failed") return <TryAgain />;
      }

      Parameters

      Returns Promise<RedirectResult>