# Creating a Payment Order

<mark style="color:green;">`POST`</mark> `api.pay.astral.money/api/v1/orders`

Creates a new payment order for a merchant

#### Headers

| Name                                            | Type   | Description             |
| ----------------------------------------------- | ------ | ----------------------- |
| authorization<mark style="color:red;">\*</mark> | String | Astral Merchant API Key |

#### Request Body

| Name                                            | Type   | Description                                                                         |
| ----------------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| order\_id<mark style="color:red;">\*</mark>     | String | The merchant tracking ID for the order.                                             |
| merchant<mark style="color:red;">\*</mark>      | String | Name of the merchant                                                                |
| wallet<mark style="color:red;">\*</mark>        | String | Wallet address that the payment is to be made to                                    |
| amount<mark style="color:red;">\*</mark>        | Number | Exact amount to be paid to the merchant in decimal value. E.g $16.80 would be 16.80 |
| currency<mark style="color:red;">\*</mark>      | String | <p>Fiat currency the payment is to be made in.</p><p>E.g USD</p>                    |
| redirect\_uri<mark style="color:red;">\*</mark> | String | URI where the user will be redirected to upon payment success                       |
| webhook\_url                                    | String | A optional webhook URL to be triggered upon payment success                         |

{% tabs %}
{% tab title="400: Bad Request Missing or badly formatted body values " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid API Key" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="201: Created Order created successfully" %}

```javascript
{
    // Response
}
```

{% 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.astral.money/developers/creating-a-payment-order.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.
