# Signing the URL

The Pay Widget is configured by URL query parameters.&#x20;

As the first step, you need to provide 2 params in the URL that will identify your merchant in our system:

1. <mark style="color:yellow;">**source**</mark> - the "source param" value from the merchant dashboard
2. <mark style="color:yellow;">**signature**</mark> - the JWT token generated using the "URL signature secret" from the merchant dashboard

### Generating the signature

You must provide a unique **signature** parameter, which is a JWT token (HS256 encryption algorithm) generated using the "URL signature secret" value as a secret. You must add some unique value to the token payload to make each token unique because we don't allow creating more than 1 order using the same signature. During testing, you can generate a JWT signature using this website: <https://jwt.io/>. You can also provide URL configuration parameters in the JWT token payload.

An example of signature generation

```typescript
import * as jsonwebtoken from 'jsonwebtoken';
import { v4 as uuid } from 'uuid';

const signature = jsonwebtoken.sign(
    {
      uid: uuid(),
    },
    YOUR_SIGNATURE_SECRET,
    {
      algorithm: 'HS256',
    },
 );
```

After you have the source and the signature params, you can proceed to configure the widget with [URL params](/widget-integration/url-params.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fonbnk.com/widget-integration/signing-the-url.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
