curl --request POST \
--url https://api.wizcommerce.com/v2/invoices \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reference_id": "INV-20250101",
"order_ids": [
"01f5d171-d3e3-4b2b-bd57-0727194b5bed"
],
"invoice_number": "INV-20250101",
"paid_amount": 0,
"due_date": "2025-01-01T00:00:00Z",
"items": [
{
"reference_id": "ITEM-20250101",
"sku": "SKU-20250101",
"quantity": 1000000,
"amount": 1000000,
"name": "Item Name",
"tax_charges": {
"tax_value": 10,
"tax_type": "percentage",
"discount_value": 5,
"discount_type": "value",
"shipping_charge_value": 15,
"shipping_charge_type": "value",
"additional_charge_name": "Handling Fee",
"additional_charge_value": 2.5,
"additional_charge_type": "value"
},
"item_status": {
"ordered_quantity": 10,
"shipped_quantity": 4,
"open_quantity": 6,
"ship_date": "2026-07-15T00:00:00Z",
"delivered_date": "2026-07-20T00:00:00Z",
"requested_ship_date": "2026-07-14T00:00:00Z",
"requested_delivery_date": "2026-07-21T00:00:00Z"
}
}
],
"status": "PAID",
"invoice_status": "SENT",
"payment_method": "card",
"payment_terms": "Net 30",
"po_number": "PO-2026-001",
"sales_rep_id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"shipped_date": "2026-07-15T00:00:00Z",
"shipping_method": "FedEx Ground",
"remarks": "Remarks",
"url": "https://example.com/invoice/INV-20250101",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z",
"charges": [
{
"name": "Tax",
"type": "tax",
"value_type": "value",
"amount": 100
}
],
"attributes": [
{
"name": "Spec Sheet",
"value": "https://example.com/spec.pdf",
"label": "Spec Sheet PDF"
}
]
}
'import requests
url = "https://api.wizcommerce.com/v2/invoices"
payload = {
"reference_id": "INV-20250101",
"order_ids": ["01f5d171-d3e3-4b2b-bd57-0727194b5bed"],
"invoice_number": "INV-20250101",
"paid_amount": 0,
"due_date": "2025-01-01T00:00:00Z",
"items": [
{
"reference_id": "ITEM-20250101",
"sku": "SKU-20250101",
"quantity": 1000000,
"amount": 1000000,
"name": "Item Name",
"tax_charges": {
"tax_value": 10,
"tax_type": "percentage",
"discount_value": 5,
"discount_type": "value",
"shipping_charge_value": 15,
"shipping_charge_type": "value",
"additional_charge_name": "Handling Fee",
"additional_charge_value": 2.5,
"additional_charge_type": "value"
},
"item_status": {
"ordered_quantity": 10,
"shipped_quantity": 4,
"open_quantity": 6,
"ship_date": "2026-07-15T00:00:00Z",
"delivered_date": "2026-07-20T00:00:00Z",
"requested_ship_date": "2026-07-14T00:00:00Z",
"requested_delivery_date": "2026-07-21T00:00:00Z"
}
}
],
"status": "PAID",
"invoice_status": "SENT",
"payment_method": "card",
"payment_terms": "Net 30",
"po_number": "PO-2026-001",
"sales_rep_id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"shipped_date": "2026-07-15T00:00:00Z",
"shipping_method": "FedEx Ground",
"remarks": "Remarks",
"url": "https://example.com/invoice/INV-20250101",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z",
"charges": [
{
"name": "Tax",
"type": "tax",
"value_type": "value",
"amount": 100
}
],
"attributes": [
{
"name": "Spec Sheet",
"value": "https://example.com/spec.pdf",
"label": "Spec Sheet PDF"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_id: 'INV-20250101',
order_ids: ['01f5d171-d3e3-4b2b-bd57-0727194b5bed'],
invoice_number: 'INV-20250101',
paid_amount: 0,
due_date: '2025-01-01T00:00:00Z',
items: [
{
reference_id: 'ITEM-20250101',
sku: 'SKU-20250101',
quantity: 1000000,
amount: 1000000,
name: 'Item Name',
tax_charges: {
tax_value: 10,
tax_type: 'percentage',
discount_value: 5,
discount_type: 'value',
shipping_charge_value: 15,
shipping_charge_type: 'value',
additional_charge_name: 'Handling Fee',
additional_charge_value: 2.5,
additional_charge_type: 'value'
},
item_status: {
ordered_quantity: 10,
shipped_quantity: 4,
open_quantity: 6,
ship_date: '2026-07-15T00:00:00Z',
delivered_date: '2026-07-20T00:00:00Z',
requested_ship_date: '2026-07-14T00:00:00Z',
requested_delivery_date: '2026-07-21T00:00:00Z'
}
}
],
status: 'PAID',
invoice_status: 'SENT',
payment_method: 'card',
payment_terms: 'Net 30',
po_number: 'PO-2026-001',
sales_rep_id: '01f5d171-d3e3-4b2b-bd57-0727194b5bed',
shipped_date: '2026-07-15T00:00:00Z',
shipping_method: 'FedEx Ground',
remarks: 'Remarks',
url: 'https://example.com/invoice/INV-20250101',
created_at: '2025-01-01T00:00:00Z',
updated_at: '2025-01-01T00:00:00Z',
charges: [{name: 'Tax', type: 'tax', value_type: 'value', amount: 100}],
attributes: [
{
name: 'Spec Sheet',
value: 'https://example.com/spec.pdf',
label: 'Spec Sheet PDF'
}
]
})
};
fetch('https://api.wizcommerce.com/v2/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizcommerce.com/v2/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reference_id' => 'INV-20250101',
'order_ids' => [
'01f5d171-d3e3-4b2b-bd57-0727194b5bed'
],
'invoice_number' => 'INV-20250101',
'paid_amount' => 0,
'due_date' => '2025-01-01T00:00:00Z',
'items' => [
[
'reference_id' => 'ITEM-20250101',
'sku' => 'SKU-20250101',
'quantity' => 1000000,
'amount' => 1000000,
'name' => 'Item Name',
'tax_charges' => [
'tax_value' => 10,
'tax_type' => 'percentage',
'discount_value' => 5,
'discount_type' => 'value',
'shipping_charge_value' => 15,
'shipping_charge_type' => 'value',
'additional_charge_name' => 'Handling Fee',
'additional_charge_value' => 2.5,
'additional_charge_type' => 'value'
],
'item_status' => [
'ordered_quantity' => 10,
'shipped_quantity' => 4,
'open_quantity' => 6,
'ship_date' => '2026-07-15T00:00:00Z',
'delivered_date' => '2026-07-20T00:00:00Z',
'requested_ship_date' => '2026-07-14T00:00:00Z',
'requested_delivery_date' => '2026-07-21T00:00:00Z'
]
]
],
'status' => 'PAID',
'invoice_status' => 'SENT',
'payment_method' => 'card',
'payment_terms' => 'Net 30',
'po_number' => 'PO-2026-001',
'sales_rep_id' => '01f5d171-d3e3-4b2b-bd57-0727194b5bed',
'shipped_date' => '2026-07-15T00:00:00Z',
'shipping_method' => 'FedEx Ground',
'remarks' => 'Remarks',
'url' => 'https://example.com/invoice/INV-20250101',
'created_at' => '2025-01-01T00:00:00Z',
'updated_at' => '2025-01-01T00:00:00Z',
'charges' => [
[
'name' => 'Tax',
'type' => 'tax',
'value_type' => 'value',
'amount' => 100
]
],
'attributes' => [
[
'name' => 'Spec Sheet',
'value' => 'https://example.com/spec.pdf',
'label' => 'Spec Sheet PDF'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v2/invoices"
payload := strings.NewReader("{\n \"reference_id\": \"INV-20250101\",\n \"order_ids\": [\n \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\"\n ],\n \"invoice_number\": \"INV-20250101\",\n \"paid_amount\": 0,\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"items\": [\n {\n \"reference_id\": \"ITEM-20250101\",\n \"sku\": \"SKU-20250101\",\n \"quantity\": 1000000,\n \"amount\": 1000000,\n \"name\": \"Item Name\",\n \"tax_charges\": {\n \"tax_value\": 10,\n \"tax_type\": \"percentage\",\n \"discount_value\": 5,\n \"discount_type\": \"value\",\n \"shipping_charge_value\": 15,\n \"shipping_charge_type\": \"value\",\n \"additional_charge_name\": \"Handling Fee\",\n \"additional_charge_value\": 2.5,\n \"additional_charge_type\": \"value\"\n },\n \"item_status\": {\n \"ordered_quantity\": 10,\n \"shipped_quantity\": 4,\n \"open_quantity\": 6,\n \"ship_date\": \"2026-07-15T00:00:00Z\",\n \"delivered_date\": \"2026-07-20T00:00:00Z\",\n \"requested_ship_date\": \"2026-07-14T00:00:00Z\",\n \"requested_delivery_date\": \"2026-07-21T00:00:00Z\"\n }\n }\n ],\n \"status\": \"PAID\",\n \"invoice_status\": \"SENT\",\n \"payment_method\": \"card\",\n \"payment_terms\": \"Net 30\",\n \"po_number\": \"PO-2026-001\",\n \"sales_rep_id\": \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\",\n \"shipped_date\": \"2026-07-15T00:00:00Z\",\n \"shipping_method\": \"FedEx Ground\",\n \"remarks\": \"Remarks\",\n \"url\": \"https://example.com/invoice/INV-20250101\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"charges\": [\n {\n \"name\": \"Tax\",\n \"type\": \"tax\",\n \"value_type\": \"value\",\n \"amount\": 100\n }\n ],\n \"attributes\": [\n {\n \"name\": \"Spec Sheet\",\n \"value\": \"https://example.com/spec.pdf\",\n \"label\": \"Spec Sheet PDF\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wizcommerce.com/v2/invoices")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference_id\": \"INV-20250101\",\n \"order_ids\": [\n \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\"\n ],\n \"invoice_number\": \"INV-20250101\",\n \"paid_amount\": 0,\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"items\": [\n {\n \"reference_id\": \"ITEM-20250101\",\n \"sku\": \"SKU-20250101\",\n \"quantity\": 1000000,\n \"amount\": 1000000,\n \"name\": \"Item Name\",\n \"tax_charges\": {\n \"tax_value\": 10,\n \"tax_type\": \"percentage\",\n \"discount_value\": 5,\n \"discount_type\": \"value\",\n \"shipping_charge_value\": 15,\n \"shipping_charge_type\": \"value\",\n \"additional_charge_name\": \"Handling Fee\",\n \"additional_charge_value\": 2.5,\n \"additional_charge_type\": \"value\"\n },\n \"item_status\": {\n \"ordered_quantity\": 10,\n \"shipped_quantity\": 4,\n \"open_quantity\": 6,\n \"ship_date\": \"2026-07-15T00:00:00Z\",\n \"delivered_date\": \"2026-07-20T00:00:00Z\",\n \"requested_ship_date\": \"2026-07-14T00:00:00Z\",\n \"requested_delivery_date\": \"2026-07-21T00:00:00Z\"\n }\n }\n ],\n \"status\": \"PAID\",\n \"invoice_status\": \"SENT\",\n \"payment_method\": \"card\",\n \"payment_terms\": \"Net 30\",\n \"po_number\": \"PO-2026-001\",\n \"sales_rep_id\": \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\",\n \"shipped_date\": \"2026-07-15T00:00:00Z\",\n \"shipping_method\": \"FedEx Ground\",\n \"remarks\": \"Remarks\",\n \"url\": \"https://example.com/invoice/INV-20250101\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"charges\": [\n {\n \"name\": \"Tax\",\n \"type\": \"tax\",\n \"value_type\": \"value\",\n \"amount\": 100\n }\n ],\n \"attributes\": [\n {\n \"name\": \"Spec Sheet\",\n \"value\": \"https://example.com/spec.pdf\",\n \"label\": \"Spec Sheet PDF\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v2/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_id\": \"INV-20250101\",\n \"order_ids\": [\n \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\"\n ],\n \"invoice_number\": \"INV-20250101\",\n \"paid_amount\": 0,\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"items\": [\n {\n \"reference_id\": \"ITEM-20250101\",\n \"sku\": \"SKU-20250101\",\n \"quantity\": 1000000,\n \"amount\": 1000000,\n \"name\": \"Item Name\",\n \"tax_charges\": {\n \"tax_value\": 10,\n \"tax_type\": \"percentage\",\n \"discount_value\": 5,\n \"discount_type\": \"value\",\n \"shipping_charge_value\": 15,\n \"shipping_charge_type\": \"value\",\n \"additional_charge_name\": \"Handling Fee\",\n \"additional_charge_value\": 2.5,\n \"additional_charge_type\": \"value\"\n },\n \"item_status\": {\n \"ordered_quantity\": 10,\n \"shipped_quantity\": 4,\n \"open_quantity\": 6,\n \"ship_date\": \"2026-07-15T00:00:00Z\",\n \"delivered_date\": \"2026-07-20T00:00:00Z\",\n \"requested_ship_date\": \"2026-07-14T00:00:00Z\",\n \"requested_delivery_date\": \"2026-07-21T00:00:00Z\"\n }\n }\n ],\n \"status\": \"PAID\",\n \"invoice_status\": \"SENT\",\n \"payment_method\": \"card\",\n \"payment_terms\": \"Net 30\",\n \"po_number\": \"PO-2026-001\",\n \"sales_rep_id\": \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\",\n \"shipped_date\": \"2026-07-15T00:00:00Z\",\n \"shipping_method\": \"FedEx Ground\",\n \"remarks\": \"Remarks\",\n \"url\": \"https://example.com/invoice/INV-20250101\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"charges\": [\n {\n \"name\": \"Tax\",\n \"type\": \"tax\",\n \"value_type\": \"value\",\n \"amount\": 100\n }\n ],\n \"attributes\": [\n {\n \"name\": \"Spec Sheet\",\n \"value\": \"https://example.com/spec.pdf\",\n \"label\": \"Spec Sheet PDF\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"reference_id": "INV-20250101",
"order_ids": [
"01f5d171-d3e3-4b2b-bd57-0727194b5bed"
],
"invoice_number": "INV-20250101",
"total_amount": 269.96,
"paid_amount": 100,
"invoice_status": "SENT",
"payment_method": "card",
"payment_terms": "Net 30",
"po_number": "PO-2026-001",
"sales_rep_id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"shipped_date": "2026-07-15T00:00:00Z",
"shipping_method": "FedEx Ground",
"status": "PAID",
"due_date": "2025-01-01T00:00:00Z",
"remarks": "Remarks",
"url": "https://example.com/invoice/INV-20250101",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z",
"items": [
{
"name": "Item Name",
"sku": "SKU-20250101",
"product_id": "1234567890",
"amount": 1000000,
"final_unit_price": 1100000,
"item_total": 1000000,
"tax_charges": {
"tax_value": 10,
"tax_type": "percentage",
"discount_value": 5,
"discount_type": "value",
"shipping_charge_value": 15,
"shipping_charge_type": "value",
"additional_charge_name": "Handling Fee",
"additional_charge_value": 2.5,
"additional_charge_type": "value"
},
"item_status": {
"ordered_quantity": 10,
"shipped_quantity": 4,
"open_quantity": 6,
"ship_date": "2026-07-15T00:00:00Z",
"delivered_date": "2026-07-20T00:00:00Z",
"requested_ship_date": "2026-07-14T00:00:00Z",
"requested_delivery_date": "2026-07-21T00:00:00Z"
},
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"quantity": 1000000,
"reference_id": "ITEM-20250101"
}
],
"charges": [
{
"name": "Tax",
"type": "tax",
"value_type": "value",
"amount": 100
}
],
"attributes": [
{
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"name": "Color",
"value": "Red",
"created_by": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"updated_by": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
]
}
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Create Invoice
Create an invoice linked to one or more orders
curl --request POST \
--url https://api.wizcommerce.com/v2/invoices \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reference_id": "INV-20250101",
"order_ids": [
"01f5d171-d3e3-4b2b-bd57-0727194b5bed"
],
"invoice_number": "INV-20250101",
"paid_amount": 0,
"due_date": "2025-01-01T00:00:00Z",
"items": [
{
"reference_id": "ITEM-20250101",
"sku": "SKU-20250101",
"quantity": 1000000,
"amount": 1000000,
"name": "Item Name",
"tax_charges": {
"tax_value": 10,
"tax_type": "percentage",
"discount_value": 5,
"discount_type": "value",
"shipping_charge_value": 15,
"shipping_charge_type": "value",
"additional_charge_name": "Handling Fee",
"additional_charge_value": 2.5,
"additional_charge_type": "value"
},
"item_status": {
"ordered_quantity": 10,
"shipped_quantity": 4,
"open_quantity": 6,
"ship_date": "2026-07-15T00:00:00Z",
"delivered_date": "2026-07-20T00:00:00Z",
"requested_ship_date": "2026-07-14T00:00:00Z",
"requested_delivery_date": "2026-07-21T00:00:00Z"
}
}
],
"status": "PAID",
"invoice_status": "SENT",
"payment_method": "card",
"payment_terms": "Net 30",
"po_number": "PO-2026-001",
"sales_rep_id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"shipped_date": "2026-07-15T00:00:00Z",
"shipping_method": "FedEx Ground",
"remarks": "Remarks",
"url": "https://example.com/invoice/INV-20250101",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z",
"charges": [
{
"name": "Tax",
"type": "tax",
"value_type": "value",
"amount": 100
}
],
"attributes": [
{
"name": "Spec Sheet",
"value": "https://example.com/spec.pdf",
"label": "Spec Sheet PDF"
}
]
}
'import requests
url = "https://api.wizcommerce.com/v2/invoices"
payload = {
"reference_id": "INV-20250101",
"order_ids": ["01f5d171-d3e3-4b2b-bd57-0727194b5bed"],
"invoice_number": "INV-20250101",
"paid_amount": 0,
"due_date": "2025-01-01T00:00:00Z",
"items": [
{
"reference_id": "ITEM-20250101",
"sku": "SKU-20250101",
"quantity": 1000000,
"amount": 1000000,
"name": "Item Name",
"tax_charges": {
"tax_value": 10,
"tax_type": "percentage",
"discount_value": 5,
"discount_type": "value",
"shipping_charge_value": 15,
"shipping_charge_type": "value",
"additional_charge_name": "Handling Fee",
"additional_charge_value": 2.5,
"additional_charge_type": "value"
},
"item_status": {
"ordered_quantity": 10,
"shipped_quantity": 4,
"open_quantity": 6,
"ship_date": "2026-07-15T00:00:00Z",
"delivered_date": "2026-07-20T00:00:00Z",
"requested_ship_date": "2026-07-14T00:00:00Z",
"requested_delivery_date": "2026-07-21T00:00:00Z"
}
}
],
"status": "PAID",
"invoice_status": "SENT",
"payment_method": "card",
"payment_terms": "Net 30",
"po_number": "PO-2026-001",
"sales_rep_id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"shipped_date": "2026-07-15T00:00:00Z",
"shipping_method": "FedEx Ground",
"remarks": "Remarks",
"url": "https://example.com/invoice/INV-20250101",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z",
"charges": [
{
"name": "Tax",
"type": "tax",
"value_type": "value",
"amount": 100
}
],
"attributes": [
{
"name": "Spec Sheet",
"value": "https://example.com/spec.pdf",
"label": "Spec Sheet PDF"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_id: 'INV-20250101',
order_ids: ['01f5d171-d3e3-4b2b-bd57-0727194b5bed'],
invoice_number: 'INV-20250101',
paid_amount: 0,
due_date: '2025-01-01T00:00:00Z',
items: [
{
reference_id: 'ITEM-20250101',
sku: 'SKU-20250101',
quantity: 1000000,
amount: 1000000,
name: 'Item Name',
tax_charges: {
tax_value: 10,
tax_type: 'percentage',
discount_value: 5,
discount_type: 'value',
shipping_charge_value: 15,
shipping_charge_type: 'value',
additional_charge_name: 'Handling Fee',
additional_charge_value: 2.5,
additional_charge_type: 'value'
},
item_status: {
ordered_quantity: 10,
shipped_quantity: 4,
open_quantity: 6,
ship_date: '2026-07-15T00:00:00Z',
delivered_date: '2026-07-20T00:00:00Z',
requested_ship_date: '2026-07-14T00:00:00Z',
requested_delivery_date: '2026-07-21T00:00:00Z'
}
}
],
status: 'PAID',
invoice_status: 'SENT',
payment_method: 'card',
payment_terms: 'Net 30',
po_number: 'PO-2026-001',
sales_rep_id: '01f5d171-d3e3-4b2b-bd57-0727194b5bed',
shipped_date: '2026-07-15T00:00:00Z',
shipping_method: 'FedEx Ground',
remarks: 'Remarks',
url: 'https://example.com/invoice/INV-20250101',
created_at: '2025-01-01T00:00:00Z',
updated_at: '2025-01-01T00:00:00Z',
charges: [{name: 'Tax', type: 'tax', value_type: 'value', amount: 100}],
attributes: [
{
name: 'Spec Sheet',
value: 'https://example.com/spec.pdf',
label: 'Spec Sheet PDF'
}
]
})
};
fetch('https://api.wizcommerce.com/v2/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizcommerce.com/v2/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reference_id' => 'INV-20250101',
'order_ids' => [
'01f5d171-d3e3-4b2b-bd57-0727194b5bed'
],
'invoice_number' => 'INV-20250101',
'paid_amount' => 0,
'due_date' => '2025-01-01T00:00:00Z',
'items' => [
[
'reference_id' => 'ITEM-20250101',
'sku' => 'SKU-20250101',
'quantity' => 1000000,
'amount' => 1000000,
'name' => 'Item Name',
'tax_charges' => [
'tax_value' => 10,
'tax_type' => 'percentage',
'discount_value' => 5,
'discount_type' => 'value',
'shipping_charge_value' => 15,
'shipping_charge_type' => 'value',
'additional_charge_name' => 'Handling Fee',
'additional_charge_value' => 2.5,
'additional_charge_type' => 'value'
],
'item_status' => [
'ordered_quantity' => 10,
'shipped_quantity' => 4,
'open_quantity' => 6,
'ship_date' => '2026-07-15T00:00:00Z',
'delivered_date' => '2026-07-20T00:00:00Z',
'requested_ship_date' => '2026-07-14T00:00:00Z',
'requested_delivery_date' => '2026-07-21T00:00:00Z'
]
]
],
'status' => 'PAID',
'invoice_status' => 'SENT',
'payment_method' => 'card',
'payment_terms' => 'Net 30',
'po_number' => 'PO-2026-001',
'sales_rep_id' => '01f5d171-d3e3-4b2b-bd57-0727194b5bed',
'shipped_date' => '2026-07-15T00:00:00Z',
'shipping_method' => 'FedEx Ground',
'remarks' => 'Remarks',
'url' => 'https://example.com/invoice/INV-20250101',
'created_at' => '2025-01-01T00:00:00Z',
'updated_at' => '2025-01-01T00:00:00Z',
'charges' => [
[
'name' => 'Tax',
'type' => 'tax',
'value_type' => 'value',
'amount' => 100
]
],
'attributes' => [
[
'name' => 'Spec Sheet',
'value' => 'https://example.com/spec.pdf',
'label' => 'Spec Sheet PDF'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v2/invoices"
payload := strings.NewReader("{\n \"reference_id\": \"INV-20250101\",\n \"order_ids\": [\n \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\"\n ],\n \"invoice_number\": \"INV-20250101\",\n \"paid_amount\": 0,\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"items\": [\n {\n \"reference_id\": \"ITEM-20250101\",\n \"sku\": \"SKU-20250101\",\n \"quantity\": 1000000,\n \"amount\": 1000000,\n \"name\": \"Item Name\",\n \"tax_charges\": {\n \"tax_value\": 10,\n \"tax_type\": \"percentage\",\n \"discount_value\": 5,\n \"discount_type\": \"value\",\n \"shipping_charge_value\": 15,\n \"shipping_charge_type\": \"value\",\n \"additional_charge_name\": \"Handling Fee\",\n \"additional_charge_value\": 2.5,\n \"additional_charge_type\": \"value\"\n },\n \"item_status\": {\n \"ordered_quantity\": 10,\n \"shipped_quantity\": 4,\n \"open_quantity\": 6,\n \"ship_date\": \"2026-07-15T00:00:00Z\",\n \"delivered_date\": \"2026-07-20T00:00:00Z\",\n \"requested_ship_date\": \"2026-07-14T00:00:00Z\",\n \"requested_delivery_date\": \"2026-07-21T00:00:00Z\"\n }\n }\n ],\n \"status\": \"PAID\",\n \"invoice_status\": \"SENT\",\n \"payment_method\": \"card\",\n \"payment_terms\": \"Net 30\",\n \"po_number\": \"PO-2026-001\",\n \"sales_rep_id\": \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\",\n \"shipped_date\": \"2026-07-15T00:00:00Z\",\n \"shipping_method\": \"FedEx Ground\",\n \"remarks\": \"Remarks\",\n \"url\": \"https://example.com/invoice/INV-20250101\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"charges\": [\n {\n \"name\": \"Tax\",\n \"type\": \"tax\",\n \"value_type\": \"value\",\n \"amount\": 100\n }\n ],\n \"attributes\": [\n {\n \"name\": \"Spec Sheet\",\n \"value\": \"https://example.com/spec.pdf\",\n \"label\": \"Spec Sheet PDF\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wizcommerce.com/v2/invoices")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference_id\": \"INV-20250101\",\n \"order_ids\": [\n \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\"\n ],\n \"invoice_number\": \"INV-20250101\",\n \"paid_amount\": 0,\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"items\": [\n {\n \"reference_id\": \"ITEM-20250101\",\n \"sku\": \"SKU-20250101\",\n \"quantity\": 1000000,\n \"amount\": 1000000,\n \"name\": \"Item Name\",\n \"tax_charges\": {\n \"tax_value\": 10,\n \"tax_type\": \"percentage\",\n \"discount_value\": 5,\n \"discount_type\": \"value\",\n \"shipping_charge_value\": 15,\n \"shipping_charge_type\": \"value\",\n \"additional_charge_name\": \"Handling Fee\",\n \"additional_charge_value\": 2.5,\n \"additional_charge_type\": \"value\"\n },\n \"item_status\": {\n \"ordered_quantity\": 10,\n \"shipped_quantity\": 4,\n \"open_quantity\": 6,\n \"ship_date\": \"2026-07-15T00:00:00Z\",\n \"delivered_date\": \"2026-07-20T00:00:00Z\",\n \"requested_ship_date\": \"2026-07-14T00:00:00Z\",\n \"requested_delivery_date\": \"2026-07-21T00:00:00Z\"\n }\n }\n ],\n \"status\": \"PAID\",\n \"invoice_status\": \"SENT\",\n \"payment_method\": \"card\",\n \"payment_terms\": \"Net 30\",\n \"po_number\": \"PO-2026-001\",\n \"sales_rep_id\": \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\",\n \"shipped_date\": \"2026-07-15T00:00:00Z\",\n \"shipping_method\": \"FedEx Ground\",\n \"remarks\": \"Remarks\",\n \"url\": \"https://example.com/invoice/INV-20250101\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"charges\": [\n {\n \"name\": \"Tax\",\n \"type\": \"tax\",\n \"value_type\": \"value\",\n \"amount\": 100\n }\n ],\n \"attributes\": [\n {\n \"name\": \"Spec Sheet\",\n \"value\": \"https://example.com/spec.pdf\",\n \"label\": \"Spec Sheet PDF\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v2/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_id\": \"INV-20250101\",\n \"order_ids\": [\n \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\"\n ],\n \"invoice_number\": \"INV-20250101\",\n \"paid_amount\": 0,\n \"due_date\": \"2025-01-01T00:00:00Z\",\n \"items\": [\n {\n \"reference_id\": \"ITEM-20250101\",\n \"sku\": \"SKU-20250101\",\n \"quantity\": 1000000,\n \"amount\": 1000000,\n \"name\": \"Item Name\",\n \"tax_charges\": {\n \"tax_value\": 10,\n \"tax_type\": \"percentage\",\n \"discount_value\": 5,\n \"discount_type\": \"value\",\n \"shipping_charge_value\": 15,\n \"shipping_charge_type\": \"value\",\n \"additional_charge_name\": \"Handling Fee\",\n \"additional_charge_value\": 2.5,\n \"additional_charge_type\": \"value\"\n },\n \"item_status\": {\n \"ordered_quantity\": 10,\n \"shipped_quantity\": 4,\n \"open_quantity\": 6,\n \"ship_date\": \"2026-07-15T00:00:00Z\",\n \"delivered_date\": \"2026-07-20T00:00:00Z\",\n \"requested_ship_date\": \"2026-07-14T00:00:00Z\",\n \"requested_delivery_date\": \"2026-07-21T00:00:00Z\"\n }\n }\n ],\n \"status\": \"PAID\",\n \"invoice_status\": \"SENT\",\n \"payment_method\": \"card\",\n \"payment_terms\": \"Net 30\",\n \"po_number\": \"PO-2026-001\",\n \"sales_rep_id\": \"01f5d171-d3e3-4b2b-bd57-0727194b5bed\",\n \"shipped_date\": \"2026-07-15T00:00:00Z\",\n \"shipping_method\": \"FedEx Ground\",\n \"remarks\": \"Remarks\",\n \"url\": \"https://example.com/invoice/INV-20250101\",\n \"created_at\": \"2025-01-01T00:00:00Z\",\n \"updated_at\": \"2025-01-01T00:00:00Z\",\n \"charges\": [\n {\n \"name\": \"Tax\",\n \"type\": \"tax\",\n \"value_type\": \"value\",\n \"amount\": 100\n }\n ],\n \"attributes\": [\n {\n \"name\": \"Spec Sheet\",\n \"value\": \"https://example.com/spec.pdf\",\n \"label\": \"Spec Sheet PDF\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"reference_id": "INV-20250101",
"order_ids": [
"01f5d171-d3e3-4b2b-bd57-0727194b5bed"
],
"invoice_number": "INV-20250101",
"total_amount": 269.96,
"paid_amount": 100,
"invoice_status": "SENT",
"payment_method": "card",
"payment_terms": "Net 30",
"po_number": "PO-2026-001",
"sales_rep_id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"shipped_date": "2026-07-15T00:00:00Z",
"shipping_method": "FedEx Ground",
"status": "PAID",
"due_date": "2025-01-01T00:00:00Z",
"remarks": "Remarks",
"url": "https://example.com/invoice/INV-20250101",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z",
"items": [
{
"name": "Item Name",
"sku": "SKU-20250101",
"product_id": "1234567890",
"amount": 1000000,
"final_unit_price": 1100000,
"item_total": 1000000,
"tax_charges": {
"tax_value": 10,
"tax_type": "percentage",
"discount_value": 5,
"discount_type": "value",
"shipping_charge_value": 15,
"shipping_charge_type": "value",
"additional_charge_name": "Handling Fee",
"additional_charge_value": 2.5,
"additional_charge_type": "value"
},
"item_status": {
"ordered_quantity": 10,
"shipped_quantity": 4,
"open_quantity": 6,
"ship_date": "2026-07-15T00:00:00Z",
"delivered_date": "2026-07-20T00:00:00Z",
"requested_ship_date": "2026-07-14T00:00:00Z",
"requested_delivery_date": "2026-07-21T00:00:00Z"
},
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"quantity": 1000000,
"reference_id": "ITEM-20250101"
}
],
"charges": [
{
"name": "Tax",
"type": "tax",
"value_type": "value",
"amount": 100
}
],
"attributes": [
{
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"name": "Color",
"value": "Red",
"created_by": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"updated_by": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
]
}
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Authorizations
API Key for authentication
Body
Invoice
255"INV-20250101"
All orders covered by this invoice; the first entry is treated as the primary order.
1["01f5d171-d3e3-4b2b-bd57-0727194b5bed"]
255"INV-20250101"
x >= 00
"2025-01-01T00:00:00Z"
Show child attributes
Show child attributes
PAID, PENDING, PARTIALLY_PAID, OVERPAID "PAID"
Lifecycle status of the invoice. Omit on update to leave the stored value unchanged.
DRAFT, OPEN, SENT, PARTIALLY_PAID, CLOSED, OVERDUE, CANCELLED, CREDIT_NOTE_ISSUED "SENT"
Omit on update to leave unchanged.
64"card"
Omit on update to leave unchanged.
255"Net 30"
Customer PO number. Omit on update to leave unchanged.
255"PO-2026-001"
User id the invoice was created for. Omit on update to leave unchanged.
"01f5d171-d3e3-4b2b-bd57-0727194b5bed"
Date the invoice shipped (stored as a date). Omit on update to leave unchanged.
"2026-07-15T00:00:00Z"
Omit on update to leave unchanged.
255"FedEx Ground"
255"Remarks"
"https://example.com/invoice/INV-20250101"
"2025-01-01T00:00:00Z"
Updated at must be later than the order creation date
"2025-01-01T00:00:00Z"
On update the array is the full desired set: charges missing from it are removed. Omit the key to leave charges untouched.
Show child attributes
Show child attributes
Custom invoice attributes by name; the attribute must exist for the tenant (entity type "invoice"). Upsert-only on update: listed attributes are added or overwritten, attributes missing from the list are left unchanged and cannot be removed.
Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
Was this page helpful?
