# 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 %}
