Create Sales Invoice
curl --request POST \
--url https://staging-openapi.accountingplus.id/v1/sales-invoices \
--header 'A-Data: <api-key>' \
--header 'A-Signature: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_name": "Mira Ramadhani",
"document_date": "20/08/2025",
"items": [
{
"item_code": "ITM00001",
"item_name": "Product A",
"quantity": 2,
"unit_of_measurement": "pcs",
"unit_price": 3000,
"discount_amount": 0,
"tax_code": ""
},
{
"item_code": "ITM00002",
"item_name": "Product B",
"quantity": 5,
"unit_of_measurement": "pcs",
"unit_price": 1500,
"discount_amount": 0,
"tax_code": ""
}
],
"auto_create_payment": true,
"other_amount": 0
}
'import requests
url = "https://staging-openapi.accountingplus.id/v1/sales-invoices"
payload = {
"customer_name": "Mira Ramadhani",
"document_date": "20/08/2025",
"items": [
{
"item_code": "ITM00001",
"item_name": "Product A",
"quantity": 2,
"unit_of_measurement": "pcs",
"unit_price": 3000,
"discount_amount": 0,
"tax_code": ""
},
{
"item_code": "ITM00002",
"item_name": "Product B",
"quantity": 5,
"unit_of_measurement": "pcs",
"unit_price": 1500,
"discount_amount": 0,
"tax_code": ""
}
],
"auto_create_payment": True,
"other_amount": 0
}
headers = {
"Authorization": "Bearer <token>",
"A-Signature": "<api-key>",
"A-Data": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'A-Signature': '<api-key>',
'A-Data': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_name: 'Mira Ramadhani',
document_date: '20/08/2025',
items: [
{
item_code: 'ITM00001',
item_name: 'Product A',
quantity: 2,
unit_of_measurement: 'pcs',
unit_price: 3000,
discount_amount: 0,
tax_code: ''
},
{
item_code: 'ITM00002',
item_name: 'Product B',
quantity: 5,
unit_of_measurement: 'pcs',
unit_price: 1500,
discount_amount: 0,
tax_code: ''
}
],
auto_create_payment: true,
other_amount: 0
})
};
fetch('https://staging-openapi.accountingplus.id/v1/sales-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://staging-openapi.accountingplus.id/v1/sales-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([
'customer_name' => 'Mira Ramadhani',
'document_date' => '20/08/2025',
'items' => [
[
'item_code' => 'ITM00001',
'item_name' => 'Product A',
'quantity' => 2,
'unit_of_measurement' => 'pcs',
'unit_price' => 3000,
'discount_amount' => 0,
'tax_code' => ''
],
[
'item_code' => 'ITM00002',
'item_name' => 'Product B',
'quantity' => 5,
'unit_of_measurement' => 'pcs',
'unit_price' => 1500,
'discount_amount' => 0,
'tax_code' => ''
]
],
'auto_create_payment' => true,
'other_amount' => 0
]),
CURLOPT_HTTPHEADER => [
"A-Data: <api-key>",
"A-Signature: <api-key>",
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://staging-openapi.accountingplus.id/v1/sales-invoices"
payload := strings.NewReader("{\n \"customer_name\": \"Mira Ramadhani\",\n \"document_date\": \"20/08/2025\",\n \"items\": [\n {\n \"item_code\": \"ITM00001\",\n \"item_name\": \"Product A\",\n \"quantity\": 2,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 3000,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n },\n {\n \"item_code\": \"ITM00002\",\n \"item_name\": \"Product B\",\n \"quantity\": 5,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 1500,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n }\n ],\n \"auto_create_payment\": true,\n \"other_amount\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("A-Signature", "<api-key>")
req.Header.Add("A-Data", "<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://staging-openapi.accountingplus.id/v1/sales-invoices")
.header("Authorization", "Bearer <token>")
.header("A-Signature", "<api-key>")
.header("A-Data", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customer_name\": \"Mira Ramadhani\",\n \"document_date\": \"20/08/2025\",\n \"items\": [\n {\n \"item_code\": \"ITM00001\",\n \"item_name\": \"Product A\",\n \"quantity\": 2,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 3000,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n },\n {\n \"item_code\": \"ITM00002\",\n \"item_name\": \"Product B\",\n \"quantity\": 5,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 1500,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n }\n ],\n \"auto_create_payment\": true,\n \"other_amount\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-openapi.accountingplus.id/v1/sales-invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["A-Signature"] = '<api-key>'
request["A-Data"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_name\": \"Mira Ramadhani\",\n \"document_date\": \"20/08/2025\",\n \"items\": [\n {\n \"item_code\": \"ITM00001\",\n \"item_name\": \"Product A\",\n \"quantity\": 2,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 3000,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n },\n {\n \"item_code\": \"ITM00002\",\n \"item_name\": \"Product B\",\n \"quantity\": 5,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 1500,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n }\n ],\n \"auto_create_payment\": true,\n \"other_amount\": 0\n}"
response = http.request(request)
puts response.read_body{
"status": "00",
"message": "success",
"data": {
"auto_create_payment": true,
"bank_account_code": "002",
"bank_account_name": "Bank",
"cancel_reason": "-",
"currency_code": "IDR",
"currency_name": "Rupiah Indonesia",
"customer_address": "Jl. Raya No. 123",
"customer_code": "00005",
"customer_name": "Mira Ramadhani",
"description": "From API Integration id 1754626495",
"discount_amount": 0,
"document_date": "2029-07-30T00:00:00Z",
"document_number": "00004/FPJ/07/29",
"document_status": "Final",
"due_date": "2023-11-07T05:31:56Z",
"other_amount": 0,
"outstanding_amount": 0,
"process_status": "Dibayarkan Sepenuhnya",
"rounding_amount": 0,
"sales_order_document_number": "",
"sales_person_code": "",
"sales_person_name": "",
"sub_total_amount": 13500,
"tax_included_indicator": false,
"total_amount": 13500,
"total_tax_amount": 0,
"items": [
{
"detail_number": "00001",
"discount_amount": 0,
"document_number": "00004/FPJ/07/29",
"item_code": "ITM00001",
"item_name": "Product A",
"quantity": 2,
"sub_total_amount": 6000,
"tax_code": "",
"tax_name": "",
"tax_rate": 0,
"total_amount": 6000,
"total_tax_amount": 0,
"unit_of_measurement_code": "PCS01",
"unit_of_measurement_name": "pcs",
"unit_price": 3000
},
{
"detail_number": "00002",
"discount_amount": 0,
"document_number": "00004/FPJ/07/29",
"item_code": "0745114900006",
"item_name": "Product B",
"quantity": 5,
"sub_total_amount": 5000,
"tax_code": "",
"tax_name": "",
"tax_rate": 0,
"total_amount": 5000,
"total_tax_amount": 0,
"unit_of_measurement_code": "PCS01",
"unit_of_measurement_name": "pcs",
"unit_price": 1000
}
]
}
}Faktur Penjualan
Create Sales Invoice
Create a new sales invoice
POST
/
v1
/
sales-invoices
Create Sales Invoice
curl --request POST \
--url https://staging-openapi.accountingplus.id/v1/sales-invoices \
--header 'A-Data: <api-key>' \
--header 'A-Signature: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_name": "Mira Ramadhani",
"document_date": "20/08/2025",
"items": [
{
"item_code": "ITM00001",
"item_name": "Product A",
"quantity": 2,
"unit_of_measurement": "pcs",
"unit_price": 3000,
"discount_amount": 0,
"tax_code": ""
},
{
"item_code": "ITM00002",
"item_name": "Product B",
"quantity": 5,
"unit_of_measurement": "pcs",
"unit_price": 1500,
"discount_amount": 0,
"tax_code": ""
}
],
"auto_create_payment": true,
"other_amount": 0
}
'import requests
url = "https://staging-openapi.accountingplus.id/v1/sales-invoices"
payload = {
"customer_name": "Mira Ramadhani",
"document_date": "20/08/2025",
"items": [
{
"item_code": "ITM00001",
"item_name": "Product A",
"quantity": 2,
"unit_of_measurement": "pcs",
"unit_price": 3000,
"discount_amount": 0,
"tax_code": ""
},
{
"item_code": "ITM00002",
"item_name": "Product B",
"quantity": 5,
"unit_of_measurement": "pcs",
"unit_price": 1500,
"discount_amount": 0,
"tax_code": ""
}
],
"auto_create_payment": True,
"other_amount": 0
}
headers = {
"Authorization": "Bearer <token>",
"A-Signature": "<api-key>",
"A-Data": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'A-Signature': '<api-key>',
'A-Data': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_name: 'Mira Ramadhani',
document_date: '20/08/2025',
items: [
{
item_code: 'ITM00001',
item_name: 'Product A',
quantity: 2,
unit_of_measurement: 'pcs',
unit_price: 3000,
discount_amount: 0,
tax_code: ''
},
{
item_code: 'ITM00002',
item_name: 'Product B',
quantity: 5,
unit_of_measurement: 'pcs',
unit_price: 1500,
discount_amount: 0,
tax_code: ''
}
],
auto_create_payment: true,
other_amount: 0
})
};
fetch('https://staging-openapi.accountingplus.id/v1/sales-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://staging-openapi.accountingplus.id/v1/sales-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([
'customer_name' => 'Mira Ramadhani',
'document_date' => '20/08/2025',
'items' => [
[
'item_code' => 'ITM00001',
'item_name' => 'Product A',
'quantity' => 2,
'unit_of_measurement' => 'pcs',
'unit_price' => 3000,
'discount_amount' => 0,
'tax_code' => ''
],
[
'item_code' => 'ITM00002',
'item_name' => 'Product B',
'quantity' => 5,
'unit_of_measurement' => 'pcs',
'unit_price' => 1500,
'discount_amount' => 0,
'tax_code' => ''
]
],
'auto_create_payment' => true,
'other_amount' => 0
]),
CURLOPT_HTTPHEADER => [
"A-Data: <api-key>",
"A-Signature: <api-key>",
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://staging-openapi.accountingplus.id/v1/sales-invoices"
payload := strings.NewReader("{\n \"customer_name\": \"Mira Ramadhani\",\n \"document_date\": \"20/08/2025\",\n \"items\": [\n {\n \"item_code\": \"ITM00001\",\n \"item_name\": \"Product A\",\n \"quantity\": 2,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 3000,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n },\n {\n \"item_code\": \"ITM00002\",\n \"item_name\": \"Product B\",\n \"quantity\": 5,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 1500,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n }\n ],\n \"auto_create_payment\": true,\n \"other_amount\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("A-Signature", "<api-key>")
req.Header.Add("A-Data", "<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://staging-openapi.accountingplus.id/v1/sales-invoices")
.header("Authorization", "Bearer <token>")
.header("A-Signature", "<api-key>")
.header("A-Data", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customer_name\": \"Mira Ramadhani\",\n \"document_date\": \"20/08/2025\",\n \"items\": [\n {\n \"item_code\": \"ITM00001\",\n \"item_name\": \"Product A\",\n \"quantity\": 2,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 3000,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n },\n {\n \"item_code\": \"ITM00002\",\n \"item_name\": \"Product B\",\n \"quantity\": 5,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 1500,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n }\n ],\n \"auto_create_payment\": true,\n \"other_amount\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-openapi.accountingplus.id/v1/sales-invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["A-Signature"] = '<api-key>'
request["A-Data"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_name\": \"Mira Ramadhani\",\n \"document_date\": \"20/08/2025\",\n \"items\": [\n {\n \"item_code\": \"ITM00001\",\n \"item_name\": \"Product A\",\n \"quantity\": 2,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 3000,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n },\n {\n \"item_code\": \"ITM00002\",\n \"item_name\": \"Product B\",\n \"quantity\": 5,\n \"unit_of_measurement\": \"pcs\",\n \"unit_price\": 1500,\n \"discount_amount\": 0,\n \"tax_code\": \"\"\n }\n ],\n \"auto_create_payment\": true,\n \"other_amount\": 0\n}"
response = http.request(request)
puts response.read_body{
"status": "00",
"message": "success",
"data": {
"auto_create_payment": true,
"bank_account_code": "002",
"bank_account_name": "Bank",
"cancel_reason": "-",
"currency_code": "IDR",
"currency_name": "Rupiah Indonesia",
"customer_address": "Jl. Raya No. 123",
"customer_code": "00005",
"customer_name": "Mira Ramadhani",
"description": "From API Integration id 1754626495",
"discount_amount": 0,
"document_date": "2029-07-30T00:00:00Z",
"document_number": "00004/FPJ/07/29",
"document_status": "Final",
"due_date": "2023-11-07T05:31:56Z",
"other_amount": 0,
"outstanding_amount": 0,
"process_status": "Dibayarkan Sepenuhnya",
"rounding_amount": 0,
"sales_order_document_number": "",
"sales_person_code": "",
"sales_person_name": "",
"sub_total_amount": 13500,
"tax_included_indicator": false,
"total_amount": 13500,
"total_tax_amount": 0,
"items": [
{
"detail_number": "00001",
"discount_amount": 0,
"document_number": "00004/FPJ/07/29",
"item_code": "ITM00001",
"item_name": "Product A",
"quantity": 2,
"sub_total_amount": 6000,
"tax_code": "",
"tax_name": "",
"tax_rate": 0,
"total_amount": 6000,
"total_tax_amount": 0,
"unit_of_measurement_code": "PCS01",
"unit_of_measurement_name": "pcs",
"unit_price": 3000
},
{
"detail_number": "00002",
"discount_amount": 0,
"document_number": "00004/FPJ/07/29",
"item_code": "0745114900006",
"item_name": "Product B",
"quantity": 5,
"sub_total_amount": 5000,
"tax_code": "",
"tax_name": "",
"tax_rate": 0,
"total_amount": 5000,
"total_tax_amount": 0,
"unit_of_measurement_code": "PCS01",
"unit_of_measurement_name": "pcs",
"unit_price": 1000
}
]
}
}Plain Signature
path=/v1/sales-invoices&token=YOUR_TOKEN&email=john@gmail.com&tenant_id=841eaf97-c428-47d1-9f6d-c61cc9df7bee
Authorizations
Generate a JWT signed with the client_secret and include the client_id as a claim in its payload.
Generate the signature by creating an SHA256-HMAC hash from the plain signature above, using the signature_secret as the key. Then, Base64-encode the resulting hash and place the final value in the A-Signature header.
Include the email and tenant_id in the payload as Base64 encoded.
Body
application/json
Sales invoice details
Example:
"Mira Ramadhani"
Example:
"20/08/2025"
Show child attributes
Show child attributes
Example:
[
{
"item_code": "ITM00001",
"item_name": "Product A",
"quantity": 2,
"unit_of_measurement": "pcs",
"unit_price": 3000,
"discount_amount": 0,
"tax_code": ""
},
{
"item_code": "ITM00002",
"item_name": "Product B",
"quantity": 5,
"unit_of_measurement": "pcs",
"unit_price": 1500,
"discount_amount": 0,
"tax_code": ""
}
]
Example:
true
Example:
0
⌘I