- BeaconX e-Invoice API Documentation
- API Endpoints
- B2B e-Invoicing
- B2C Receipt
- TaxPayer
- Lists
- Articles
Create Invoice from Receipt
POST
/einvoices/{reference_number}/create
LHDNReceipt
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
reference_number
string
required
Example:
VGSP007362828
Header Params
Accept
string
optional
Example:
application/json
Body Params application/json
Any information provided shall be used as a prefill in iServe
buyer
object
required
code
string
required
id_type
string
required
tin
string
required
id_number
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
sst_number
string
required
phone
string
required
membership_id
string
required
is_foreign
string
required
shipping
object
required
code
string
required
id_type
string
required
tin
string
required
id_number
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
Example
{
"buyer": {
"code": "",
"id_type": "BRN",
"tin": "C61901366810",
"id_number": "201903007118",
"name": "MEDHURST, GRIMES AND SIPES SDN. BHD.",
"email": "kendall.purdy@reilly.net",
"address1": "72684 Murl Light Apt. 668",
"address2": "",
"address3": "",
"city": "Lake Tedfort",
"postcode": "29311",
"state": "01",
"country": "MYS",
"sst_number": "W10-1060-26389071",
"phone": "0125168978",
"membership_id": "MYS",
"is_foreign": "false"
},
"shipping": {
"code": "",
"id_type": "",
"tin": "",
"id_number": "",
"name": "",
"email": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"postcode": "",
"state": "",
"country": "MYS"
}
}
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/einvoices/VGSP007362828/create' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"buyer": {
"code": "",
"id_type": "BRN",
"tin": "C61901366810",
"id_number": "201903007118",
"name": "MEDHURST, GRIMES AND SIPES SDN. BHD.",
"email": "kendall.purdy@reilly.net",
"address1": "72684 Murl Light Apt. 668",
"address2": "",
"address3": "",
"city": "Lake Tedfort",
"postcode": "29311",
"state": "01",
"country": "MYS",
"sst_number": "W10-1060-26389071",
"phone": "0125168978",
"membership_id": "MYS",
"is_foreign": "false"
},
"shipping": {
"code": "",
"id_type": "",
"tin": "",
"id_number": "",
"name": "",
"email": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"postcode": "",
"state": "",
"country": "MYS"
}
}'
Responses
🟢200OK
application/json
Body
status
string
required
message
string
required
data
object
required
items
array [object {10}]
required
total
number
required
pos_id
string
required
status
string
required
quantity
number
required
rounding
number
required
sst_rate
integer
required
issued_at
string
required
sub_total
number
required
sst_amount
integer
required
buyer_email
string
required
buyer_phone
string
required
outlet_code
string
required
currency_code
string
required
currency_rate
integer
required
membership_id
string
required
invoice_number
string
required
discount_amount
integer
required
reference_number
string
required
service_charge_rate
integer
required
service_charge_amount
integer
required
id
string
required
Example
{
"status": "OK",
"message": "",
"data": {
"items": [
{
"id": 1,
"quantity": 0.76,
"subtotal": 7.65,
"unit_price": 10.2,
"description": "CHICKEN THIGH",
"measurement": "KG",
"discount_rate": 0,
"total_excl_tax": 7.65,
"total_incl_tax": 7.65,
"discount_amount": 0
},
{
"id": 2,
"quantity": 1,
"subtotal": 10.99,
"unit_price": 16.99,
"description": "NESTLE CORNFLAKES 800G",
"measurement": "UNIT",
"discount_rate": 0.35,
"total_excl_tax": 10.99,
"total_incl_tax": 10.99,
"discount_amount": 6
}
],
"total": 18.65,
"pos_id": "05",
"status": "valid",
"quantity": 1.76,
"rounding": 0.01,
"sst_rate": 0,
"issued_at": "2024-01-20",
"sub_total": 18.64,
"sst_amount": 0,
"buyer_email": "",
"buyer_phone": "",
"outlet_code": "VGSP",
"currency_code": "MYR",
"currency_rate": 1,
"membership_id": "",
"invoice_number": "VGSP007362828",
"discount_amount": 6,
"reference_number": "VGSP007362828",
"service_charge_rate": 0,
"service_charge_amount": 0,
"id": "9b3986b2-8d6f-480e-89f4-74588e8d933a"
}
}
Modified at 2024-11-04 09:33:28