> ## Documentation Index
> Fetch the complete documentation index at: https://help.hoopai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom URL redirection after signing a contract

> Set up and troubleshoot custom redirect URLs after document or contract signing in the HoopAI platform, including URL format requirements, query parameters, and common issues.

When a contact signs a document or contract in the HoopAI platform, you can redirect them to a custom URL — such as a thank-you page, onboarding form, or payment link. This guide explains how to configure redirects, troubleshoot common issues, and pass dynamic data through query parameters.

***

## Setting up a redirect URL

<Steps>
  <Step title="Open the document or contract template">
    Go to **Payments > Documents & Contracts** and open the template you want to configure. You can also set redirects when creating a new template.
  </Step>

  <Step title="Navigate to the signing options">
    Scroll to the **Post-Signing Options** section at the bottom of the template editor.
  </Step>

  <Step title="Enter your redirect URL">
    In the **Redirect URL** field, enter the full URL where the signer should be sent after completing the signature. The URL must include the protocol (e.g., `https://`).
  </Step>

  <Step title="Save the template">
    Click **Save** to apply the changes. The redirect will take effect for all new documents generated from this template.
  </Step>
</Steps>

***

## URL format requirements

Your redirect URL must meet these requirements:

| Requirement      | Details                                                      |
| ---------------- | ------------------------------------------------------------ |
| Protocol         | Must start with `https://` (recommended) or `http://`        |
| Domain           | Must be a valid, publicly accessible domain                  |
| Path             | Can include any valid URL path (e.g., `/thank-you`)          |
| Query parameters | Supported — use standard URL encoding for special characters |
| Fragments        | Hash fragments (e.g., `#section`) are supported              |
| Maximum length   | 2,048 characters including query parameters                  |

<Warning>
  Do not use `localhost`, internal IP addresses, or private network URLs. The redirect happens in the signer's browser, so the destination must be publicly reachable.
</Warning>

***

## Passing dynamic data with query parameters

You can append dynamic contact and document data to the redirect URL using Hoop merge fields. These are replaced with actual values at the time of signing.

Example redirect URL:

```text theme={null}
https://yoursite.com/thank-you?contact_id={{contact.id}}&document_id={{document.id}}&email={{contact.email}}
```

Available merge fields:

* `{{contact.id}}` — The contact's unique ID in Hoop
* `{{contact.email}}` — The signer's email address
* `{{contact.name}}` — The signer's full name
* `{{document.id}}` — The signed document's ID
* `{{document.name}}` — The document template name

<Tip>
  URL-encode any merge field values that may contain special characters. Hoop automatically encodes most values, but custom fields with spaces or symbols may need manual encoding in your receiving application.
</Tip>

***

## Troubleshooting redirect issues

<AccordionGroup>
  <Accordion title="Redirect is not happening after signing">
    Verify the redirect URL is saved in the template. Open the template editor and check the **Post-Signing Options** section. If the field is empty, the signer will see the default Hoop confirmation page instead. Also confirm the document was generated from the updated template — documents created before the change will not inherit the new redirect URL.
  </Accordion>

  <Accordion title="Signer sees a blank page or error">
    The destination URL may be down or returning an error. Test the URL directly in a browser to confirm it loads correctly. If you are using query parameters with merge fields, check that the resulting URL is well-formed and does not contain broken syntax.
  </Accordion>

  <Accordion title="Query parameters are missing or empty">
    Ensure the merge fields are spelled correctly, including the double curly braces. If a merge field value is empty (e.g., the contact has no email on file), the parameter will be included with an empty value. Check the contact record to confirm the data exists.
  </Accordion>

  <Accordion title="Redirect goes to the wrong page">
    If you recently updated the redirect URL, the change only applies to new documents generated after the update. Previously sent documents retain the original redirect URL. Resend the document if you need the new redirect applied.
  </Accordion>

  <Accordion title="Browser blocks the redirect">
    Some browsers or browser extensions block redirects to unfamiliar domains. Ask the signer to try in an incognito/private window or a different browser. HTTPS URLs are less likely to be blocked than HTTP.
  </Accordion>
</AccordionGroup>

***

## Testing your redirect

<Steps>
  <Step title="Create a test document">
    Generate a document from the template with the redirect URL configured. Send it to your own email address.
  </Step>

  <Step title="Sign the document">
    Open the signing link and complete the signature process.
  </Step>

  <Step title="Verify the redirect">
    After signing, confirm that you are redirected to the correct URL. Check the browser address bar to verify query parameters are populated with the expected values.
  </Step>
</Steps>

<Note>
  If you are integrating the redirect destination with your own application, log the incoming query parameters on your server to confirm they match the expected merge field values from Hoop.
</Note>
