Skip to main content
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",
  "auto_create_payment": true,
  "other_amount": 0,
  "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": ""
    }
  ]
}'
{
"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

Authorization
string
header
required

Generate a JWT signed with the client_secret and include the client_id as a claim in its payload.

A-Signature
string
header
required

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.

A-Data
string
header
required

Include the email and tenant_id in the payload as Base64 encoded.

Body

application/json

Sales invoice details

customer_name
string
required
Example:

"Mira Ramadhani"

document_date
string<date-time>
required
Example:

"20/08/2025"

items
object[]
required
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": ""
}
]
auto_create_payment
boolean
Example:

true

other_amount
number
Example:

0

Response

Sales invoice created successfully

status
string
Example:

"00"

message
string
Example:

"success"

data
object