# Creating a Payment

## Creating a Payment

<mark style="color:green;">`POST`</mark> `https://api.payouter.com/payments`

**Headers**

| Name         | Value               |
| ------------ | ------------------- |
| Content-Type | `application/json`  |
| Signature    | Signed request body |
| Merchant     | Merchant ID         |

**Body**

<table><thead><tr><th width="214">Name</th><th width="104">Type</th><th width="114">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>amount</code></td><td>string</td><td>true</td><td>Amount to be paid. If the amount includes pennies, use a ‘.’ as a decimal separator. Example: 10.28</td></tr><tr><td><code>currency</code></td><td>string</td><td>true</td><td><a href="../general/available-currencies">Currency code</a></td></tr><tr><td><code>order_id</code></td><td>string</td><td>true</td><td>Order identifier in your system. Must be a string consisting of letters, digits, underscores, and hyphens. <strong>No spaces</strong> or special characters allowed.<br><br><strong><code>order_id</code></strong> must be unique among seller’s invoices</td></tr><tr><td><code>upi_id</code></td><td>string</td><td>false</td><td>Extra parameter when creating an invoice with payment method <a href="../general/payment-methods">UPI_INTENT</a><br><br>If not provided, the user will be prompted to enter it on the payment terminal page</td></tr><tr><td><code>payment_type</code></td><td>string</td><td>true</td><td><a href="../general/payment-methods">Payment method </a>through which the payment will be made</td></tr><tr><td><code>fingerprint</code></td><td>string</td><td>true</td><td>Unique user identifier</td></tr><tr><td><code>url_success</code></td><td>string</td><td>false</td><td>After successful payment, the user can click a button on the payment form to return to this URL</td></tr><tr><td><code>url_error</code></td><td>string</td><td>false</td><td>In case of any error or cancellation of the created invoice, the user can click a button on the payment form to return to this URL</td></tr><tr><td><code>url_callback</code></td><td>string</td><td>false</td><td>URL where the webhook will be sent</td></tr><tr><td><code>additional_data</code></td><td>string</td><td>false</td><td>Additional information for you (not shown to the client)</td></tr></tbody></table>

**Response**

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

```javascript
     {
      type: string, // Payment type PayIn/PayOut
      uuid: string, // Unique identifier in our system
      order_id: string, // Your order ID sent during creation
      lifetime: number | null, // Unix timestamp for expiration date/time
      amount: string, // Fiat amount of the created order
      payment_link: string | null, // Link to the payment terminal
      fact_amount: string | null, // Fiat amount of actual execution of the order
      balance_change: string | null, // Amount credited to the platform account
      commission: string | null, // Amount taken as commission
      is_test: boolean, // Whether the order is a test order
      status: string, // Current order status
      payment_type: string, // Payment method code
      refer: string | null, // Recipient details
      recipient_name: string | null, // Recipient full name
      bank: string | null, // Recipient bank code
      currency: string, // Currency code
      additional_data: string | null, // Extra info sent at order creation 
      convert: {
        to_currency: string, // Currency or cryptocurrency code for credited amount
        rate: string | null // Conversion rate
      },
      extra: null, // Additional invoice information 
      created_at: string, // ISO-8601 order creation date/time
    }
```

{% endtab %}

{% tab title="UPI 200" %}

<pre class="language-javascript"><code class="lang-javascript"><strong>    {
</strong>      type: string, // Payment type PayIn/PayOut
      uuid: string, // Unique identifier in our system
      order_id: string, // Your order ID sent during creation
      lifetime: number | null, // Unix timestamp for expiration date/time
      amount: string, // Fiat amount of the created order
      payment_link: string | null, // Link to the payment terminal
      fact_amount: string | null, // Fiat amount of actual execution of the order
      balance_change: string | null, // Amount credited to the platform account
      commission: string | null, // Amount taken as commission
      is_test: boolean, // Whether the order is a test order
      status: string, // Current order status
      payment_type: string, // Payment method code
      refer: string | null, // Recipient details
      recipient_name: string | null, // Recipient full name
      bank: string | null, // Recipient bank code
      currency: string, // Currency code
      additional_data: string | null, // Extra info sent at order creation 
      convert: {
        to_currency: string, // Currency or cryptocurrency code for credited amount
        rate: string | null // Conversion rate
      },
      extra: { // Additional invoice information 
         paymentLink: string // Deeplink for payment
      }, 
      created_at: string, // ISO-8601 order creation date/time
    }
</code></pre>

{% endtab %}

{% tab title="UPI\_INTENT 200" %}

```javascript
     {
      type: string, // Payment type PayIn/PayOut
      uuid: string, // Unique identifier in our system
      order_id: string, // Your order ID sent during creation
      lifetime: number | null, // Unix timestamp for expiration date/time
      amount: string, // Fiat amount of the created order
      payment_link: string | null, // Link to the payment terminal
      fact_amount: string | null, // Fiat amount of actual execution of the order
      balance_change: string | null, // Amount credited to the platform account
      commission: string | null, // Amount taken as commission
      is_test: boolean, // Whether the order is a test order
      status: string, // Current order status
      payment_type: string, // Payment method code
      refer: string | null, // Recipient details
      recipient_name: string | null, // Recipient full name
      bank: string | null, // Recipient bank code
      currency: string, // Currency code
      additional_data: string | null, // Extra info sent at order creation 
      convert: {
        to_currency: string, // Currency or cryptocurrency code for credited amount
        rate: string | null // Conversion rate
      },
      extra: { // Additional invoice information 
        "googlePayLink": string, // Deeplink for payment
        "paytmLink": string, // Deeplink for payment
        "phonePeLink": string, // Deeplink for payment
        "upiLink": string // Deeplink for payment
      }, 
      created_at: string, // ISO-8601 order creation date/time
    }
```

{% endtab %}

{% tab title="IMPS 200" %}

```javascript
      {
      type: string, // Payment type PayIn/PayOut
      uuid: string, // Unique identifier in our system
      order_id: string, // Your order ID sent during creation
      lifetime: number | null, // Unix timestamp for expiration date/time
      amount: string, // Fiat amount of the created order
      payment_link: string | null, // Link to the payment terminal
      fact_amount: string | null, // Fiat amount of actual execution of the order
      balance_change: string | null, // Amount credited to the platform account
      commission: string | null, // Amount taken as commission
      is_test: boolean, // Whether the order is a test order
      status: string, // Current order status
      payment_type: string, // Payment method code
      refer: string | null, // Recipient details
      recipient_name: string | null, // Recipient full name
      bank: string | null, // Recipient bank code
      currency: string, // Currency code
      additional_data: string | null, // Extra info sent at order creation 
      convert: {
        to_currency: string, // Currency or cryptocurrency code for credited amount
        rate: string | null // Conversion rate
      },
      extra: { // Additional invoice information 
        bankName: string, // Name of the bank 
        ifscCode: string // IFSC code
      }, 
      created_at: string, // ISO-8601 order creation date/time
    }
```

{% endtab %}

{% tab title="400" %}

```json
{
    "data": null,
    "error": {
        "status": 400,
        "name": "BadRequestError",
        "message": "Bad request, Order already Exist",
        "details": {}
    }
}
```

{% endtab %}
{% endtabs %}


---

# 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.payouter.com/en/payin/creating-a-payment.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.
