# Create Invoice

## /create

<mark style="color:green;">`POST`</mark> `https://seerbitapi.com/invoice/create`

This endpoint allows you to create and send an invoice to a customers email

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

#### Request Body

| Name                                            | Type   | Description                         |
| ----------------------------------------------- | ------ | ----------------------------------- |
| publickey<mark style="color:red;">\*</mark>     | String | merchant public key                 |
| orderNo<mark style="color:red;">\*</mark>       | String |                                     |
| dueDate<mark style="color:red;">\*</mark>       | String | expiration date for invoice payment |
| currency<mark style="color:red;">\*</mark>      | String | currency for invoice                |
| receiversName<mark style="color:red;">\*</mark> | String | customer name                       |
| customerEmail<mark style="color:red;">\*</mark> | String | customer email                      |
| itemName<mark style="color:red;">\*</mark>      | String | item invoiced                       |
| Quantity<mark style="color:red;">\*</mark>      | String | no of items                         |
| Rate<mark style="color:red;">\*</mark>          | String | unit price of item                  |
| tax<mark style="color:red;">\*</mark>           | String | tax                                 |

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

```javascript
curl --location 'https://seerbitapi.com/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ENCRYPTED_KEY' \
--data-raw '{
    "publicKey":"YOUR_PUBLIC_KEY",
    "orderNo": "333333221321",
    "dueDate": "2022-10-23",
    "currency": "NGN",
    "receiversName": "Jane Smith",
    "customerEmail": "janesmith@emaildomain.com",
    "invoiceItems": [
        {
            "itemName": "Bluetooth Pods",
            "quantity": 1,
            "rate": 25000,
            "tax": 7.5
        },
        {
            "itemName": "Quest 10",
            "quantity": 4,
            "rate": 100000,
            "tax": 7.5
        }
    ]
}'
```

{% endtab %}

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

```javascript
{
    "message": "Invoice created successfully ",
    "payload": {
        "InvoiceID": 92,
        "InvoiceNo": "SBT-INV-000092"
    },
    "code": "00"
}
```

{% 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://apis.seerbit.com/api-endpoints/invoices/create-invoice.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.
