> For the complete documentation index, see [llms.txt](https://apidocs.paygateway.paytota.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.paygateway.paytota.com/prn/generate-prn.md).

# Generate PRN

The PRN API allows merchants to create unique payment references for customers. Integrate the API to generate secure, traceable PRNs with a simple request, specifying amount and customer details. The API returns a unique reference, enabling efficient transaction tracking. Streamline payment workflows and enhance user experience with reliable PRN generation for seamless merchant operations.

**Live**

```javascript
POST https://paygateway.paytota.com/v1/collections/prn
```

**Sandbox**

```
POST  https://sandbox.paygateway.paytota.com/v1/collections/prn
```

{% tabs %}
{% tab title="Headers" %}

#### Request

| Header            | Value                  | Required |
| ----------------- | ---------------------- | -------- |
| **Content-Type**  | **`application/json`** | YES      |
| **Accept**        | **`application/json`** | YES      |
| **Authorization** | **`JWT ***`**          | YES      |
|                   |                        |          |

#### Request

| Parameter Name      | Type    | Description                                         | Required |
| ------------------- | ------- | --------------------------------------------------- | -------- |
| merchant\_reference | string  | The Merchant reference of the transaction to track. | YES      |
| amount              | integer | The amount of money that should be transacted       | YES      |
| currency            | string  | The currency that should be used to transact        | YES      |
| narration           | string  | Description of what is being paid for               | YES      |
|                     |         |                                                     |          |

<table data-header-hidden><thead><tr><th width="238">Parameter Name</th><th width="151">Type</th><th width="357">Description</th></tr></thead><tbody><tr><td>Parameter Name</td><td>Type</td><td>Description</td></tr><tr><td>id</td><td></td><td></td></tr><tr><td>paytota_reference</td><td>string</td><td>The Paytota paygateway reference of the transaction to refund. This is usually included in the API request responses or IPN's</td></tr><tr><td>transaction_amount</td><td>integer</td><td>The amount of money to refund</td></tr><tr><td>transaction_currency</td><td>string</td><td>The currency being refunded</td></tr><tr><td>merchant_reference</td><td>string</td><td>The reference provided by the merchant</td></tr><tr><td>transaction_status</td><td>string</td><td>One of either PENDING, COMPLETED</td></tr><tr><td>transaction_type</td><td>string</td><td>One of either COLLECTION, DISBURSEMENT</td></tr></tbody></table>

You can also generate the PRN by Navigation to business account and clicking Generate PRN

<figure><img src="https://content.gitbook.com/content/H91Fre7tLAMbrH4HpCTA/blobs/VyKVLLhpewY30eb9em5R/Screenshot%202025%2009%2023%20at%2015.59.43.png" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.paygateway.paytota.com/prn/generate-prn.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
