Create Invoice
Endpoint for creating an Invoice.
info
Please be aware that this endpoint requires a Manage Invoices API Key.
POST /api/v1/groups/{group_id}/invoices
Request Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| note | The Note added for the invoice. It will be seen by end-users, make sure it is recognizable. | string | |
| external_id | The external ID of the invoice. | string | |
| due_date | The due date of the invoice. After the given date the pending status will be changed to past_due. | string (YYYY-MM-DD) | Required |
| send_email | If true, the end-user will be notified about the invoice creation via e-mail. | bool | |
| processor_id | Processor ID used for the transaction. | string | Required |
| card_enabled | If true, Card payment option will be shown on the public page. | bool | Required |
| ach_enabled | If true, ACH payment option will be shown on the public page. | bool | Required |
| partner_id | The partner ID used for populating the billing information of the invoice. Also used for transaction billing details. | string | Required |
| products | The list of the products attached to the invoice. | object array | Required |
| products[].product_id | The unique ID of a previously created product attached to the invoice. | string | Required |
| products[].name | The name of a previously created product. Cannot be changed during invoice creation. | string | Required |
| products[].description | The description of a previously created product. Cannot be changed during invoice creation. | string | Required |
| products[].amount | The amount of a previously created product. Cannot be changed during invoice creation. | string | Required |
| products[].included_tax_amount | The included tax amount of a previously created product. Cannot be changed during invoice creation. | string | Required |
| products[].unit_of_measure | The unit of measurement of a previously created product. Cannot be changed during invoice creation. Accepted units of measure: pc. | string | Required |
| products[].quantity | The quantity of a previously created product. | uint64 | Required |
Response
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request / Validation error |
| 500 | Internal Error |
Example Usage
- JavaScript
- Python
- Go
plans.js
var headers = new Headers();
headers.append('Authorization', 'API_KEY');
var requestOptions = {
method: 'POST',
headers: headers,
redirect: 'follow',
body: {
// request body data
}
};
const group_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/invoices`;
fetch(url, requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
plans.py
import requests
group_id = ""
url = "https://api.reverepayments.dev/api/v1/groups/"+group_id+"/invoices"
headers = {
'Authorization': 'API_KEY'
}
response = requests.request("POST", url, headers=headers, json={
// request body data
})
print(response.text)
plans.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
const group_id = ""
url := "https://api.reverepayments.dev/api/v1/groups/" + group_id + "/invoices"
client := &http.Client{}
body := bytes.NewBuffer(nil)
_ = json.NewEncoder(body).Encode(map[string]any{
// body data
})
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Authorization", "API_KEY")
res, _ := client.Do(req)
defer res.Body.Close()
bytes, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println(string(bytes))
}
Example Request
{
"external_id": "48a0f2dc-e7f1-42bb-a237-128990fa69e",
"note": "Thank you for your purchase!",
"due_date": "2025-12-18T00:00:00.000Z",
"send_email": false,
"processor_id": "fbf2e44a-eed6-426f-b0e2-a3a5b34377c0",
"card_enabled": true,
"ach_enabled": true,
"partner_id": "8d7fbc56-b2e1-4e33-8d52-e93bb9a91ab7",
"products": [
{
"product_id": "3c35ec5c-843d-46a5-aba9-0180b0ad451d",
"name": "Steak",
"description": "",
"amount": 5000,
"included_tax_amount": 200,
"unit_of_measure": "pc",
"quantity": 2
},
{
"product_id": "4d685310-210f-4a62-924e-88d2bcc97783",
"name": "French fries",
"description": "",
"amount": 500,
"included_tax_amount": 0,
"unit_of_measure": "pc",
"quantity": 4
},
{
"product_id": "2237b93b-b27a-4d44-a474-78b83446f051",
"name": "Hamburger",
"description": "",
"amount": 1200,
"included_tax_amount": 0,
"unit_of_measure": "pc",
"quantity": 1
},
{
"product_id": "e4f73d6e-e132-4d74-97ac-80ff4803c4c3",
"name": "Hot-Dog",
"description": "",
"amount": 700,
"included_tax_amount": 0,
"unit_of_measure": "pc",
"quantity": 1
},
{
"product_id": "0f3385f6-f522-402c-ad5d-0dc1bd04eb3f",
"name": "Sandwich",
"description": "",
"amount": 1000,
"included_tax_amount": 20,
"unit_of_measure": "pc",
"quantity": 1
},
{
"product_id": "03e67641-d83a-461e-bfce-660386a6fbbc",
"name": "Tea",
"description": "",
"amount": 300,
"included_tax_amount": 0,
"unit_of_measure": "pc",
"quantity": 5
}
]
}
Example Success Response
{
"id": "7e44c370-078e-4fa3-9909-bdd8554eb068",
"invoice_number": "MY-2025-002-INV",
"group_id": "8059f5c6-e1cd-4e46-9196-1d7e47401a3e",
"slug": "8059f5c6-e1cd-4e46-9196-1d7e47401a3e/MY-2025-002-INV",
"invoice_number_numeric": "002",
"year": "2025",
"note": "Thank you for your purchase!",
"external_id": "48a0f2dc-e7f1-42bb-a237-128990fa69e",
"due_date": "2025-12-18T00:00:00Z",
"send_email": false,
"processor_id": "fbf2e44a-eed6-426f-b0e2-a3a5b34377c0",
"card_enabled": true,
"ach_enabled": true,
"partner": {
"id": "8d7fbc56-b2e1-4e33-8d52-e93bb9a91ab7",
"group_id": "8059f5c6-e1cd-4e46-9196-1d7e47401a3e",
"company": "Dan The Man Co.",
"first_name": "Dan",
"last_name": "Humphrey",
"email": "test@example.com",
"line_1": "E 123 22",
"line_2": "",
"city": "Brooklyn",
"country": "US",
"subdivision": "NY",
"postal_code": "11001",
"created_at": "2025-10-09T10:07:00.597584Z",
"updated_at": "2025-10-09T10:07:00.597584Z"
},
"products": [
{
"id": "71169f53-ffae-4457-a0a8-cfdb0910dd58",
"product_id": "3c35ec5c-843d-46a5-aba9-0180b0ad451d",
"name": "Steak",
"description": "",
"amount": 5000,
"included_tax_amount": 200,
"unit_of_measure": "pc",
"quantity": 2,
"created_at": "2025-11-18T14:27:10.684702633Z",
"updated_at": "2025-11-18T14:27:10.684702633Z"
},
{
"id": "0594c1c0-32b2-4d11-866c-29cb5c33f6fc",
"product_id": "4d685310-210f-4a62-924e-88d2bcc97783",
"name": "French fries",
"description": "",
"amount": 500,
"included_tax_amount": 0,
"unit_of_measure": "pc",
"quantity": 4,
"created_at": "2025-11-18T14:27:10.687571196Z",
"updated_at": "2025-11-18T14:27:10.687571196Z"
},
{
"id": "16340baa-d8d6-4e85-a745-ef95f38dd7dd",
"product_id": "2237b93b-b27a-4d44-a474-78b83446f051",
"name": "Hamburger",
"description": "",
"amount": 1200,
"included_tax_amount": 0,
"unit_of_measure": "pc",
"quantity": 1,
"created_at": "2025-11-18T14:27:10.69005105Z",
"updated_at": "2025-11-18T14:27:10.69005105Z"
},
{
"id": "ae0cdb74-9310-40b7-8f86-4917d03ba46d",
"product_id": "e4f73d6e-e132-4d74-97ac-80ff4803c4c3",
"name": "Hot-Dog",
"description": "",
"amount": 700,
"included_tax_amount": 0,
"unit_of_measure": "pc",
"quantity": 1,
"created_at": "2025-11-18T14:27:10.692558798Z",
"updated_at": "2025-11-18T14:27:10.692558798Z"
},
{
"id": "5862120f-ea3c-46c2-8deb-aeb2d8ff31e0",
"product_id": "0f3385f6-f522-402c-ad5d-0dc1bd04eb3f",
"name": "Sandwich",
"description": "",
"amount": 1000,
"included_tax_amount": 20,
"unit_of_measure": "pc",
"quantity": 1,
"created_at": "2025-11-18T14:27:10.695220961Z",
"updated_at": "2025-11-18T14:27:10.695220961Z"
},
{
"id": "60f1dbdd-a17f-426b-9751-b6686f97a8fe",
"product_id": "03e67641-d83a-461e-bfce-660386a6fbbc",
"name": "Tea",
"description": "",
"amount": 300,
"included_tax_amount": 0,
"unit_of_measure": "pc",
"quantity": 5,
"created_at": "2025-11-18T14:27:10.697748769Z",
"updated_at": "2025-11-18T14:27:10.697748769Z"
}
],
"amount": 16400,
"status": "pending",
"created_at": "2025-11-18T14:27:10.661796389Z",
"updated_at": "2025-11-18T14:27:10.661796389Z"
}