# Payment Request

How to create a payment request and get a token for redirecting customer to paymento gateway.

## Request a new payment

<mark style="color:green;">`POST`</mark> <https://api.paymento.io/v1/payment/request>

**Headers**

| Name         | Value                 |
| ------------ | --------------------- |
| Api-key      | Your Merchant API Key |
| Content Type | `application/json`    |
| Accept       | `text/plain`          |

**Body**

<table><thead><tr><th width="185">Name</th><th width="132">Type</th><th>Nullable</th><th>Description</th></tr></thead><tbody><tr><td><code>fiatAmount</code></td><td>string</td><td>true</td><td></td></tr><tr><td><code>fiatCurrency</code></td><td>string</td><td>true</td><td>(e.g.) USD or EUR</td></tr><tr><td><code>ReturnUrl</code></td><td>string</td><td>true</td><td></td></tr><tr><td><code>orderId</code></td><td>string</td><td>true</td><td>Your online store order ID</td></tr><tr><td><code>Speed</code></td><td>int</td><td>false</td><td><p> 0 = High</p><p>(Accept crypto transactions on mempool and complete order.</p><p>)</p><p>1 = Low</p><p>(Accept crypto transactions when specific number of blocks came (known as confirmed like 3 as 3) and complete order. </p><p>)</p></td></tr><tr><td><code>cryptoAmount</code></td><td>Json Object</td><td>true</td><td><p><code>[ { "coinName": "Bitcoin", "amount": "0.01854793" }, { "coinName": "Ethereum", "amount":</code> </p><p><code>"1.54848465" } ]</code></p></td></tr><tr><td><code>additionalData</code></td><td>Json Object</td><td>true</td><td><code>[ { "key": "invoice-number", "value": "A-578" }, { "key": "param2", "value": "value2" } ]</code></td></tr><tr><td><code>EmailAddress</code></td><td>string</td><td>true</td><td>Email address of the user</td></tr></tbody></table>

**Response**

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

```json
{
  "success": true,
  "message": "",
  "body": " 3256e147c6fe4d36a9341a5112ed2214"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

Now you can use the received token in body section and redirect your customer to&#x20;

* **Payment URL:** `https://app.paymento.io/gateway?token=TOKEN_HERE`

Replace `TOKEN_HERE` with the token you received.


---

# 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.paymento.io/api-documention/payment-request.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.
