- BeaconX e-Invoice API Documentation
- API Endpoints
- B2B e-Invoicing
- B2C Receipt
- TaxPayer
- Lists
- Articles
Create a Receipt
POST
/receipts
Receipt
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Header Params
Accept
string
optional
Example:
application/json
Body Params application/json
buyer
object
required
tin
string
required
name
string
required
email
string
required
address1
string
required
address2
string
required
address3
string
required
city
string
required
postcode
string
required
state
string
required
country
string
required
contact
string
required
id_number
string
required
id_type
string
required
sst_number
string
required
membership_id
string
required
reference_number
string
required
invoice_number
string
required
original_einvoice_ref_number
string
optional
outlet_code
string
required
dept_code
string
optional
pos_id
string
required
source
string
required
issued_at
string
required
status
string
required
subtotal
number
required
discount_rate
number
required
discount_amount
number
required
service_fee_rate
number
required
service_fee_amount
number
required
total_excl_tax
number
required
sales_tax_amount
number
required
service_tax_amount
number
required
gst_amount
number
required
ttx_amount
number
required
hvgt_amount
number
required
lvst_amount
number
required
total_tax_amount
number
required
total_incl_tax
number
required
rounding
number
required
total_payable_amount
number
required
currency_code
string
required
currency_rate
number
required
footer_notes
string
optional
suppliers_bank_account_number
string
optional
Supplier's Bank Account Number that facilitates payment, where applicable.
payment_mode
string
optional
Applicable for retail purchases.
02 Cheque
03 Bank Transfer
04 Credit Card
05 Debit Card
06 e-Wallet / Digital Wallet
07 Digital Bank
08 Others
payment_terms
string
optional
An agreed-upon payment terms and conditions. e.g. "Cash Upfront"
prepayment_amount
number
optional
Amount paid upfront. Used for Cash Vouchers, Deposits, other amounts paid upfront.
prepayment_datetime
string
optional
Date/Time of amount paid upfront. Use YYYY-MM-DD HH:ii::ss or YYYY-MM-DD format.
prepayment_reference_number
string
optional
Transaction reference number of prepayment. e.g. Voucher Serial Number, etc
items
array [object {27}]
required
id
string
required
code
string
required
classification
string
required
unit_price
number
required
quantity
number
required
description
string
required
long_description
string
required
measurement
string
required
subtotal
number
required
discount_rate
number
required
discount_amount
number
required
service_fee_rate
number
required
service_fee_amount
number
required
total_excl_tax
number
required
sales_tax_rate
number
required
sales_tax_amount
number
required
service_tax_rate
number
required
service_tax_amount
number
required
gst_rate
number
required
gst_amount
number
required
ttx_rate
number
required
ttx_amount
number
required
hvgt_rate
number
required
hvgt_amount
number
required
lvst_rate
number
required
lvst_amount
number
required
total_incl_tax
number
required
Example
{
"reference_number": "OUTLET-POSID-1131",
"invoice_number": "OUTLET-POSID-1131",
"original_einvoice_ref_number": "",
"pos_id": "",
"source": "",
"issued_at": "2024-10-16",
"outlet_code": "SMG",
"status": "valid",
"quantity": 0,
"subtotal": 117.3,
"discount_rate": 0,
"discount_amount": 14.49,
"service_fee_rate": 0,
"service_fee_amount": 0,
"total_excl_tax": 0,
"sales_tax_amount": 0,
"service_tax_amount": 0,
"gst_amount": 0,
"ttx_amount": 0,
"hvgt_amount": 0,
"lvst_amount": 0,
"total_tax_amount": 0,
"total_incl_tax": 102.81,
"rounding": -0.01,
"currency_code": "MYR",
"currency_rate": 1,
"total_payable_amount": 102.8,
"suppliers_bank_account_number": "",
"payment_method": "",
"payment_terms": "",
"prepayment_amount": "",
"prepayment_datetime": "",
"prepayment_reference_number": "",
"footer_notes": "",
"items": [
{
"id": "50000",
"code": "SKU001",
"classification": "",
"unit_price": 6.9,
"quantity": 6,
"description": "MATEMATIK - S - MMP",
"long_description": "",
"measurement": "",
"subtotal": 41.4,
"discount_rate": 0,
"discount_amount": 6.21,
"total_excl_tax": 0,
"service_fee_rate": 0,
"service_fee_amount": 0,
"sales_tax_rate": 0,
"sales_tax_amount": 0,
"service_tax_rate": 0,
"service_tax_amount": 0,
"gst_rate": 0,
"gst_amount": 0,
"ttx_rate": 0,
"ttx_amount": 0,
"hvgt_rate": 0,
"hvgt_amount": 0,
"lvst_rate": 0,
"lvst_amount": 0,
"tax_exempt_amount": 0,
"total_incl_tax": 35.19
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://einvoice-api.beaconx.com.my/receipts' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"reference_number": "OUTLET-POSID-1131",
"invoice_number": "OUTLET-POSID-1131",
"original_einvoice_ref_number": "",
"pos_id": "",
"source": "",
"issued_at": "2024-10-16",
"outlet_code": "SMG",
"status": "valid",
"quantity": 0,
"subtotal": 117.3,
"discount_rate": 0,
"discount_amount": 14.49,
"service_fee_rate": 0,
"service_fee_amount": 0,
"total_excl_tax": 0,
"sales_tax_amount": 0,
"service_tax_amount": 0,
"gst_amount": 0,
"ttx_amount": 0,
"hvgt_amount": 0,
"lvst_amount": 0,
"total_tax_amount": 0,
"total_incl_tax": 102.81,
"rounding": -0.01,
"currency_code": "MYR",
"currency_rate": 1,
"total_payable_amount": 102.80,
"suppliers_bank_account_number": "",
"payment_method": "",
"payment_terms": "",
"prepayment_amount": "",
"prepayment_datetime": "",
"prepayment_reference_number": "",
"footer_notes": "",
"items": [
{
"id": "50000",
"code": "SKU001",
"classification": "",
"unit_price": 6.9,
"quantity": 6,
"description": "MATEMATIK - S - MMP",
"long_description": "",
"measurement": "",
"subtotal": 41.4,
"discount_rate": 0,
"discount_amount": 6.21,
"total_excl_tax": 0,
"service_fee_rate": 0,
"service_fee_amount": 0,
"sales_tax_rate": 0,
"sales_tax_amount": 0,
"service_tax_rate": 0,
"service_tax_amount": 0,
"gst_rate": 0,
"gst_amount": 0,
"ttx_rate": 0,
"ttx_amount": 0,
"hvgt_rate": 0,
"hvgt_amount": 0,
"lvst_rate": 0,
"lvst_amount": 0,
"tax_exempt_amount": 0,
"total_incl_tax": 35.19
}
]
}'
Responses
🟢200OK
application/json
Body
status
string
optional
message
string
optional
data
object
optional
success
array[string]
optional
failed
array [object {2}]
optional
Example
{
"status": "OK",
"message": "",
"data": {
"success": [
{
"invoice_number": "RCPT005",
"reference_number": "RCPT005",
"outlet_code": "001",
"source": "",
"pos_id": "P0302",
"issued_at": "2024-04-30",
"status": "valid",
"quantity": 0,
"subtotal": 117.3,
"discount_rate": 0,
"discount_amount": 14.49,
"total_excl_tax": 0,
"sales_tax_amount": 0,
"service_tax_amount": 0,
"gst_amount": 0,
"ttx_amount": 0,
"hvgt_amount": 0,
"lvst_amount": 0,
"total_incl_tax": 102.81,
"total_tax_amount": 0,
"rounding": 0,
"total_payable_amount": 102.81,
"currency_code": "MYR",
"currency_rate": 1,
"items": [
{
"id": "50000",
"classification": "",
"unit_price": 6.9,
"quantity": 6,
"description": "MATEMATIK - S - MMP 新北市22069板桥区三民路二段",
"long_description": "",
"measurement": "",
"subtotal": 41.4,
"discount_rate": 0,
"discount_amount": 6.21,
"total_excl_tax": 0,
"sales_tax_rate": 0,
"sales_tax_amount": 0,
"service_tax_rate": 0,
"service_tax_amount": 0,
"gst_rate": 0,
"gst_amount": 0,
"ttx_rate": 0,
"ttx_amount": 0,
"hvgt_rate": 0,
"hvgt_amount": 0,
"lvst_rate": 0,
"lvst_amount": 0,
"total_incl_tax": 35.19
}
],
"service_fee_rate": 0,
"service_fee_amount": 0,
"sst_rate": 0,
"sst_amount": 0,
"buyer": {
"membership_id": "",
"name": "",
"tin": "",
"id_number": "",
"sst_number": "",
"email": "",
"address": "",
"contact": ""
},
"id": "9d5235b0-3195-454e-a05e-fa61b8fab680",
"url": "https://iserve.beaconx.com.my/beacon/001/9d5235b0-3195-454e-a05e-fa61b8fab680",
"document": []
}
],
"failed": []
}
}
🟢200Rejected Error
🟠429Rate Limit Error
🔴500Server Error
Modified at 2024-12-31 02:22:46