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

# Redirect After Signing

## Overview

After a consumer has finished a signing event in the UGA Finance Apply Interface, the consumer may optionally be redirected to a merchant provided URL. This URL may be unique per application or be shared across all applications under a program.

## URL Parameters

UGA Finance will add two URL parameters to the query string of the URL:

1. `status`
   * This represents the result of the consumers signing event. More details below.
2. `contract`
   * This is the UGA Finance's unique Contract Number. It references the contract and consumer data in UGA Finance's system. It may also be used in API requests to pull additional information.

UGA Finance will return the user back to the provided URL after any DocuSign event, so it is highly recommended that the merchant read the URL paramter `status` to understand the signing result. The three most common statuses are:

1. `signing_complete`
2. `cancel`
3. `decline`

However, any DocuSign `event` query parameter may be returned. DocuSign has a complete list of events documented in the `returnUrl` of the Request Body here: [https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createrecipient/#schema\_\_recipientviewrequest\_returnurl](https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createrecipient/#schema__recipientviewrequest_returnurl)

Here is quick example of reading the URL parameters in Javascript:

```javascript theme={null}
const searchParams = new URLSearchParams(window.location.search);

if (searchParams.has('status')) {
  switch(searchParams.get('status')) {
    case 'signing_complete':
      console.log('Consumer signed successfuly!');
      break;
    case 'cancel':
      console.log('Consumer will finish signing later!');
      break;
    case 'decline':
      console.log('Consumer declined to sign the agreement.');
      break;
  }
}
```

You may also use the `contract` param to make additional calls back to the UGA Finance API to get additional data about the contract or consumer. See our API implementation guide for more details: /integrations-and-api/api-v2/implementation-guide#contracts

## Contact

If you have any questions, please reach out to `salesforcedev@ugafinance.com`.
