> For the complete documentation index, see [llms.txt](https://passimpay.gitbook.io/passimpay-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://passimpay.gitbook.io/passimpay-api/create-an-invoice-link.md).

# Create an invoice link

<mark style="color:green;">`POST`</mark> `https://api.passimpay.io/v2/createorder`

This endpoint allows you to create a new payment link for an invoice.

**For displaying fiat currencies, this payment method must be enabled in your account settings. To enable it, please contact technical support.**

#### Headers

| Name           | Type   | Description                 |
| -------------- | ------ | --------------------------- |
| `x-signature`  | string | SHA-256 encrypted signature |
| `Content-Type` | string | application/json            |

#### Request Body

| Name         | Type    | Description                                                                                                                                                                                                                                 |
| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `platformId` | integer | Platform Id                                                                                                                                                                                                                                 |
| `orderId`    | string  | Order ID of your platform. Type string, maximum length 64, allowed characters 'A-Za-z0-9+/=-:.,\_'                                                                                                                                          |
| `amount`     | string  | Amount format requires two decimal places, like '50.00' or '199.99'.                                                                                                                                                                        |
| `currencies` | string  | List the currency ID separated by commas. Not required. You can get the list of currency IDs [here](/passimpay-api/list-of-cryptocurrencies.md).                                                                                            |
| `symbol`     | string  | The currency for the `amount` field follows the ISO 4217 standard. It should be 3 characters in uppercase. This field is optional; if not provided, the default currency is USD.                                                            |
| `type`       | integer | <p>Currency type to display in the payment link:<br><code>0</code>: display all currencies (both cryptocurrencies and fiat currencies)<br><code>1</code>: display only cryptocurrencies<br><code>2</code>: display only fiat currencies</p> |

#### Additional Client Information (Optional)

You can provide additional information about your client, although it is not mandatory. The following fields are supported:

| Name      | Type    | Description                                                                                                                                                                     |
| --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| firstName | string  | The first name of the client.                                                                                                                                                   |
| lastName  | string  | The last name of the client.                                                                                                                                                    |
| email     | string  | The client's email address.                                                                                                                                                     |
| phoneNo   | integer | The client's phone number.                                                                                                                                                      |
| returnUrl | string  | The returnUrl parameter specifies the URL to which the user should be redirected after payment (Applicable only for INR (**Indian rupees**) transactions for specific on-ramp). |

#### Successful response (200)

| Name   | Type    | Description                                                   |
| ------ | ------- | ------------------------------------------------------------- |
| result | integer | <p>Request result: <br><code>1</code>: success </p>           |
| url    | string  | The URL of the payment link where the customer is redirected. |

#### Error Response (400)

| Name    | Type    | Description                                      |
| ------- | ------- | ------------------------------------------------ |
| result  | integer | <p>Request result: <br><code>0</code>: error</p> |
| message | string  | Error description                                |
